[Skip to main content](#vessel-content)

#   Price per item show total price when item has options

##

- **[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")**
- [![nico.van.leeuwen's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile") Topic Author
- [ Offline](/forum/user/12404-nico-van-leeuwen)

Less More

- Posts: 343
- Thank you received: 28
-
-
- [](http://www.delinie-ict.nl)
-

5 years 9 months ago -  5 years 9 months ago [\#328365](#328365) by [nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")  *[Price per item show total price when item has options](/forum/25-install-update/901683-price-per-item-show-total-price-when-item-has-options#328365 "-- 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 &quot;red car&quot; 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 :)")* was created by *[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")*

-- 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 :

| 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 ![:)](/media/kunena/emoticons/3.png ":)")

Last edit: 5 years 9 months ago by [nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile"). Reason: solved

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwMTY4My1wcmljZS1wZXItaXRlbS1zaG93LXRvdGFsLXByaWNlLXdoZW4taXRlbS1oYXMtb3B0aW9ucz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

5 years 9 months ago [\#328381](#328381) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Price per item show total price when item has options](/forum/25-install-update/901683-price-per-item-show-total-price-when-item-has-options#328381 "-- 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 &quot;red car&quot; 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 :)")*

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.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwMTY4My1wcmljZS1wZXItaXRlbS1zaG93LXRvdGFsLXByaWNlLXdoZW4taXRlbS1oYXMtb3B0aW9ucz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")**
- [![nico.van.leeuwen's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile") Topic Author
- [ Offline](/forum/user/12404-nico-van-leeuwen)

Less More

- Posts: 343
- Thank you received: 28
-
-
- [](http://www.delinie-ict.nl)
-

5 years 9 months ago [\#328389](#328389) by [nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")  Replied by *[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")* on topic *[Price per item show total price when item has options](/forum/25-install-update/901683-price-per-item-show-total-price-when-item-has-options#328389 "-- 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 &quot;red car&quot; 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 :)")*

Hi, I've send an account to your mailbox with a few links and extra explanation.
Hope this makes it clear.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwMTY4My1wcmljZS1wZXItaXRlbS1zaG93LXRvdGFsLXByaWNlLXdoZW4taXRlbS1oYXMtb3B0aW9ucz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

5 years 9 months ago [\#328391](#328391) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Price per item show total price when item has options](/forum/25-install-update/901683-price-per-item-show-total-price-when-item-has-options#328391 "-- 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 &quot;red car&quot; 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 :)")*

Hi,

I see what is the issue.
Edit the file show_block_cart.php via the menu Display&gt;Views and add the code: Code:

$product-&gt;prices[0]-&gt;unit_price = new stdClass(); $product-&gt;prices[0]-&gt;unit_price-&gt;price_value = 0; $product-&gt;prices[0]-&gt;unit_price-&gt;price_value_with_tax = 0.0; $product-&gt;prices[0]-&gt;unit_price-&gt;price_currency_id = hikashop_getCurrency();

after the code: Code:

$product-&gt;prices[0]-&gt;price_currency_id = hikashop_getCurrency();

It should then display properly.
We'll add that patch on our end too.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwMTY4My1wcmljZS1wZXItaXRlbS1zaG93LXRvdGFsLXByaWNlLXdoZW4taXRlbS1oYXMtb3B0aW9ucz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")**
- [![nico.van.leeuwen's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile") Topic Author
- [ Offline](/forum/user/12404-nico-van-leeuwen)

Less More

- Posts: 343
- Thank you received: 28
-
-
- [](http://www.delinie-ict.nl)
-

5 years 9 months ago [\#328415](#328415) by [nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")  Replied by *[nico.van.leeuwen](/forum/user/12404-nico-van-leeuwen "View nico.van.leeuwen's Profile")* on topic *[Price per item show total price when item has options](/forum/25-install-update/901683-price-per-item-show-total-price-when-item-has-options#328415 "-- 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 &quot;red car&quot; 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 :)")*

Thank you Nicolas,
The patch works perfectly.

Have a nice day !

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwMTY4My1wcmljZS1wZXItaXRlbS1zaG93LXRvdGFsLXByaWNlLXdoZW4taXRlbS1oYXMtb3B0aW9ucz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.064 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
