Price per item show total price when item has options
- nico.van.leeuwen
-
Topic Author
- Offline
Less
More
5 years 9 months ago - 5 years 9 months ago #328365
by nico.van.leeuwen
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.24
-- PHP version -- : 7.4
Hi,
I found that when you have products that has no price but get the price through the options it's not showing the price per item in the cart but the total of the items.
Example:
Product 1 has no price but options of 10 euro per option.
If you buy 2 items at 10 euro a piece that the cart show 2 times the 20 euro amount instead of the expected 10 per item and a total of 20 for 2 items.
My cart now looks like this for a product called "red car" with a price of 10 euro's :
Is there an option / view that I could change to make it show the singel price instead of the total?
Not sure if this is a little bug or a feature I didn't know about
-- Joomla version -- : 3.9.24
-- PHP version -- : 7.4
Hi,
I found that when you have products that has no price but get the price through the options it's not showing the price per item in the cart but the total of the items.
Example:
Product 1 has no price but options of 10 euro per option.
If you buy 2 items at 10 euro a piece that the cart show 2 times the 20 euro amount instead of the expected 10 per item and a total of 20 for 2 items.
My cart now looks like this for a product called "red car" with a price of 10 euro's :
| Product | Name | Price per single item | Amount | Total |
| Product1 | red car | 20 | 2 | 20 |
Is there an option / view that I could change to make it show the singel price instead of the total?
Not sure if this is a little bug or a feature I didn't know about
Last edit: 5 years 9 months ago by nico.van.leeuwen. Reason: solved
Please Log in or Create an account to join the conversation.
5 years 9 months ago #328381
by nicolas
Replied by nicolas on topic Price per item show total price when item has options
Hi,
The unit price is supposed to be the sum of the unit price of the main product plus the unit price of each option selected.
There is no option to change that.
If that's not what you see, we would need more information from you to reproduce the issue on your website in odrder to better understand the situation.
The unit price is supposed to be the sum of the unit price of the main product plus the unit price of each option selected.
There is no option to change that.
If that's not what you see, we would need more information from you to reproduce the issue on your website in odrder to better understand the situation.
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
5 years 9 months ago #328389
by nico.van.leeuwen
Replied by nico.van.leeuwen on topic Price per item show total price when item has options
Hi, I've send an account to your mailbox with a few links and extra explanation.
Hope this makes it clear.
Hope this makes it clear.
Please Log in or Create an account to join the conversation.
5 years 9 months ago #328391
by nicolas
Replied by nicolas on topic Price per item show total price when item has options
Hi,
I see what is the issue.
Edit the file show_block_cart.php via the menu Display>Views and add the code:
after the code:
It should then display properly.
We'll add that patch on our end too.
I see what is the issue.
Edit the file show_block_cart.php via the menu Display>Views and add the code:
Code:
$product->prices[0]->unit_price = new stdClass();
$product->prices[0]->unit_price->price_value = 0;
$product->prices[0]->unit_price->price_value_with_tax = 0.0;
$product->prices[0]->unit_price->price_currency_id = hikashop_getCurrency();
Code:
$product->prices[0]->price_currency_id = hikashop_getCurrency();
We'll add that patch on our end too.
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
5 years 9 months ago #328415
by nico.van.leeuwen
Replied by nico.van.leeuwen on topic Price per item show total price when item has options
Thank you Nicolas,
The patch works perfectly.
Have a nice day !
The patch works perfectly.
Have a nice day !
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.058 seconds