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

#   Product with custom fields, wrong total price

##

- **[sokartch](/forum/user/4482-sokartch "View sokartch's Profile")**
- [![sokartch's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4482.jpg)](/forum/user/4482-sokartch "View sokartch's Profile") Topic Author
- [ Offline](/forum/user/4482-sokartch)

Less More

- Posts: 73
- Thank you received: 0
-
-

11 years 4 months ago [\#205769](#205769) by [sokartch](/forum/user/4482-sokartch "View sokartch's Profile")  *[Product with custom fields, wrong total price](/forum/25-install-update/877706-product-with-custom-fields-wrong-total-price#205769 "-- HikaShop version -- : 2.5.0  Hello I have product with custom fields. I add this product twice to cart (with different options). I got one error in the total price. It seems that the total price in this case contain the tax again. Also the tax is not correct. Regards, Petar Ristanovic   www.sokart.ch")* was created by *[sokartch](/forum/user/4482-sokartch "View sokartch's Profile")*

-- HikaShop version -- : 2.5.0

Hello
I have product with custom fields. I add this product twice to cart (with different options). I got one error in the total price. It seems that the total price in this case contain the tax again. Also the tax is not correct.
Regards,
Petar Ristanovic
[ www.sokart.ch](http://www.sokart.ch)
[ ![Variants.jpg](/forum/attachment/25053) ](/forum/attachment/25053 "Variants.jpg")

- [ ![Variants.jpg](/forum/attachment/25053) ](/forum/attachment/25053 "Variants.jpg") [ ](/forum/attachment/25053?download=1 "Variants.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3NzcwNi1wcm9kdWN0LXdpdGgtY3VzdG9tLWZpZWxkcy13cm9uZy10b3RhbC1wcmljZT90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

11 years 4 months ago [\#205770](#205770) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product with custom fields, wrong total price](/forum/25-install-update/877706-product-with-custom-fields-wrong-total-price#205770 "-- HikaShop version -- : 2.5.0  Hello I have product with custom fields. I add this product twice to cart (with different options). I got one error in the total price. It seems that the total price in this case contain the tax again. Also the tax is not correct. Regards, Petar Ristanovic   www.sokart.ch")*

Hi,

We would need more information on the issue to be able to say anything.
Could you do a screenshot of the settings of your product ?
Could you give a direct link to that product ?
Could you provide a screenshot of your tax rules listing (menu System&gt;Taxes) so that we can see how you configured your taxes ?

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

- **[sokartch](/forum/user/4482-sokartch "View sokartch's Profile")**
- [![sokartch's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4482.jpg)](/forum/user/4482-sokartch "View sokartch's Profile") Topic Author
- [ Offline](/forum/user/4482-sokartch)

Less More

- Posts: 73
- Thank you received: 0
-
-

11 years 4 months ago -  11 years 4 months ago [\#205836](#205836) by [sokartch](/forum/user/4482-sokartch "View sokartch's Profile")  Replied by *[sokartch](/forum/user/4482-sokartch "View sokartch's Profile")* on topic *[Product with custom fields, wrong total price](/forum/25-install-update/877706-product-with-custom-fields-wrong-total-price#205836 "-- HikaShop version -- : 2.5.0  Hello I have product with custom fields. I add this product twice to cart (with different options). I got one error in the total price. It seems that the total price in this case contain the tax again. Also the tax is not correct. Regards, Petar Ristanovic   www.sokart.ch")*

Hi,

Please move this topic to the right category ![:)](/media/kunena/emoticons/8.png ":)")
Product settings are attached. (first four)
Direkt link:
[ www.sokart.ch/cms/e-shop/nach-kategorien...asergravur-kleopatra](http://www.sokart.ch/cms/e-shop/nach-kategorien/kat-sektglaeser/product/813-lasergravur-kleopatra)
Tax settings are attached. (last two). Info: **If I set Tax to 0% then is the total price OK!**

[ ![Unbenannt-1.jpg](/forum/attachment/25079) ](/forum/attachment/25079 "Unbenannt-1.jpg")

[ ![Unbenannt-2.jpg](/forum/attachment/25080) ](/forum/attachment/25080 "Unbenannt-2.jpg")

[ ![Unbenannt-3.jpg](/forum/attachment/25081) ](/forum/attachment/25081 "Unbenannt-3.jpg")

[ ![Unbenannt-4.jpg](/forum/attachment/25082) ](/forum/attachment/25082 "Unbenannt-4.jpg")

[ ![Unbenannt-5.jpg](/forum/attachment/25083) ](/forum/attachment/25083 "Unbenannt-5.jpg")

[ ![Unbenannt-6.jpg](/forum/attachment/25084) ](/forum/attachment/25084 "Unbenannt-6.jpg")

Regards,
Petar Ristanovic

- [ ![Unbenannt-1.jpg](/forum/attachment/25079) ](/forum/attachment/25079 "Unbenannt-1.jpg") [ ](/forum/attachment/25079?download=1 "Unbenannt-1.jpg")
- [ ![Unbenannt-2.jpg](/forum/attachment/25080) ](/forum/attachment/25080 "Unbenannt-2.jpg") [ ](/forum/attachment/25080?download=1 "Unbenannt-2.jpg")
- [ ![Unbenannt-3.jpg](/forum/attachment/25081) ](/forum/attachment/25081 "Unbenannt-3.jpg") [ ](/forum/attachment/25081?download=1 "Unbenannt-3.jpg")
- [ ![Unbenannt-4.jpg](/forum/attachment/25082) ](/forum/attachment/25082 "Unbenannt-4.jpg") [ ](/forum/attachment/25082?download=1 "Unbenannt-4.jpg")
- [ ![Unbenannt-5.jpg](/forum/attachment/25083) ](/forum/attachment/25083 "Unbenannt-5.jpg") [ ](/forum/attachment/25083?download=1 "Unbenannt-5.jpg")
- [ ![Unbenannt-6.jpg](/forum/attachment/25084) ](/forum/attachment/25084 "Unbenannt-6.jpg") [ ](/forum/attachment/25084?download=1 "Unbenannt-6.jpg")

Last edit: 11 years 4 months ago by [sokartch](/forum/user/4482-sokartch "View sokartch's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3NzcwNi1wcm9kdWN0LXdpdGgtY3VzdG9tLWZpZWxkcy13cm9uZy10b3RhbC1wcmljZT90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

11 years 4 months ago [\#205958](#205958) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product with custom fields, wrong total price](/forum/25-install-update/877706-product-with-custom-fields-wrong-total-price#205958 "-- HikaShop version -- : 2.5.0  Hello I have product with custom fields. I add this product twice to cart (with different options). I got one error in the total price. It seems that the total price in this case contain the tax again. Also the tax is not correct. Regards, Petar Ristanovic   www.sokart.ch")*

Hi,

Could you try switching the "round prices during calculations" setting and/or the "floating taxed prices" setting of the HikaShop configuration ?

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

- **[sokartch](/forum/user/4482-sokartch "View sokartch's Profile")**
- [![sokartch's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4482.jpg)](/forum/user/4482-sokartch "View sokartch's Profile") Topic Author
- [ Offline](/forum/user/4482-sokartch)

Less More

- Posts: 73
- Thank you received: 0
-
-

11 years 4 months ago -  11 years 4 months ago [\#206100](#206100) by [sokartch](/forum/user/4482-sokartch "View sokartch's Profile")  Replied by *[sokartch](/forum/user/4482-sokartch "View sokartch's Profile")* on topic *[Product with custom fields, wrong total price](/forum/25-install-update/877706-product-with-custom-fields-wrong-total-price#206100 "-- HikaShop version -- : 2.5.0  Hello I have product with custom fields. I add this product twice to cart (with different options). I got one error in the total price. It seems that the total price in this case contain the tax again. Also the tax is not correct. Regards, Petar Ristanovic   www.sokart.ch")*

Hi

When I "order" two items of the same product with different user defined fields data 25 pieces * 4 francs + 25 pieces * 4 francs = 200 francs

Without "Round prices during calculations"
Zwischensumme 555,56 CHF
MwSt. 370,37 CHF
Summe 555,56 CHF (instead of 200.00)

Wihh "Round prices during calculations"
Zwischensumme 560,00 CHF
MwSt. 375,00 CHF
Summe 560,00 CHF (instead of 200.00)

If I "order" 50 pieces * 4 francs = 200 francs
Zwischensumme 200,00 CHF
MwSt. 14,81 CHF
Summe 200,00 CHF

When I choose tax category for product with 0% tax (instead of 8%)
Summe 185,19 CHF

Direct link to product:
[ sokart.ch/cms/e-shop/nach-kategorien/kat...asergravur-kleopatra](http://sokart.ch/cms/e-shop/nach-kategorien/kat-sektglaeser/product/813-lasergravur-kleopatra)

Last edit: 11 years 4 months ago by [sokartch](/forum/user/4482-sokartch "View sokartch's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3NzcwNi1wcm9kdWN0LXdpdGgtY3VzdG9tLWZpZWxkcy13cm9uZy10b3RhbC1wcmljZT90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

11 years 4 months ago [\#206251](#206251) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product with custom fields, wrong total price](/forum/25-install-update/877706-product-with-custom-fields-wrong-total-price#206251 "-- HikaShop version -- : 2.5.0  Hello I have product with custom fields. I add this product twice to cart (with different options). I got one error in the total price. It seems that the total price in this case contain the tax again. Also the tax is not correct. Regards, Petar Ristanovic   www.sokart.ch")*

As we're not able to reproduce the issue on our end, could you provide a backend access along with a link to this thread via our contact form so that we could check your settings ?
[ www.hikashop.com/support/contact-us.html](http://www.hikashop.com/support/contact-us.html)

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

- **[sokartch](/forum/user/4482-sokartch "View sokartch's Profile")**
- [![sokartch's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4482.jpg)](/forum/user/4482-sokartch "View sokartch's Profile") Topic Author
- [ Offline](/forum/user/4482-sokartch)

Less More

- Posts: 73
- Thank you received: 0
-
-

11 years 4 months ago -  11 years 4 months ago [\#206600](#206600) by [sokartch](/forum/user/4482-sokartch "View sokartch's Profile")  Replied by *[sokartch](/forum/user/4482-sokartch "View sokartch's Profile")* on topic *[Product with custom fields, wrong total price](/forum/25-install-update/877706-product-with-custom-fields-wrong-total-price#206600 "-- HikaShop version -- : 2.5.0  Hello I have product with custom fields. I add this product twice to cart (with different options). I got one error in the total price. It seems that the total price in this case contain the tax again. Also the tax is not correct. Regards, Petar Ristanovic   www.sokart.ch")*

Ok, I wrote email... last friday

Additionaly: If an item has custom fields "After a product is added to the cart" is meaningless. It always jumps in the cart.

[ ![Stay.jpg](/forum/attachment/25241) ](/forum/attachment/25241 "Stay.jpg")

- [ ![Stay.jpg](/forum/attachment/25241) ](/forum/attachment/25241 "Stay.jpg") [ ](/forum/attachment/25241?download=1 "Stay.jpg")

Last edit: 11 years 4 months ago by [sokartch](/forum/user/4482-sokartch "View sokartch's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3NzcwNi1wcm9kdWN0LXdpdGgtY3VzdG9tLWZpZWxkcy13cm9uZy10b3RhbC1wcmljZT90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14276
-
-

11 years 4 months ago [\#206732](#206732) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product with custom fields, wrong total price](/forum/25-install-update/877706-product-with-custom-fields-wrong-total-price#206732 "-- HikaShop version -- : 2.5.0  Hello I have product with custom fields. I add this product twice to cart (with different options). I got one error in the total price. It seems that the total price in this case contain the tax again. Also the tax is not correct. Regards, Petar Ristanovic   www.sokart.ch")*

Hi,

Please understand that such issues require time to debug as they are quite complex.
It seems to come from a bug with some versions of PHP where the cloning of objects is not done properly.

Change the code: Code:

$element-&gt;prices[]=(!HIKASHOP_PHP5) ? $price : clone($price);

to: Code:

$element-&gt;prices[] = $this-&gt;_copy($price);

and add the code: Code:

function _copy(&amp;$src){ if(is_array($src)){ $array = array(); foreach($src as $k =&gt; $v){ $array[$k]=$this-&gt;_copy($v); } return $array; }elseif(is_object($src)){ $obj = new stdClass(); foreach(get_object_vars($src) as $k =&gt; $v){ $obj-&gt;$k=$this-&gt;_copy($v); } return $obj; }else{ return $src; } }

before the line: Code:

function convertPrice(&amp;$element,&amp;$currencies,$currency_id,$main_currency){

in the file administrator/components/com_hikashop/classes/currency.php and that should fix the problem.

For the other issue, please try to create new threads for new questions. I tried to look at that other issue on your website but I wasn't able to access your HikaShop configuration with the user access you provided which is a requirement to be able to look at the problem.

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

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

- **[sokartch](/forum/user/4482-sokartch "View sokartch's Profile")**
- [![sokartch's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4482.jpg)](/forum/user/4482-sokartch "View sokartch's Profile") Topic Author
- [ Offline](/forum/user/4482-sokartch)

Less More

- Posts: 73
- Thank you received: 0
-
-

11 years 3 months ago [\#206870](#206870) by [sokartch](/forum/user/4482-sokartch "View sokartch's Profile")  Replied by *[sokartch](/forum/user/4482-sokartch "View sokartch's Profile")* on topic *[Product with custom fields, wrong total price](/forum/25-install-update/877706-product-with-custom-fields-wrong-total-price#206870 "-- HikaShop version -- : 2.5.0  Hello I have product with custom fields. I add this product twice to cart (with different options). I got one error in the total price. It seems that the total price in this case contain the tax again. Also the tax is not correct. Regards, Petar Ristanovic   www.sokart.ch")*

Hi

&gt; Please understand that such issues require time to debug as they are quite complex.
OK, I see.

The prices are now OK. Thank YOU!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg3NzcwNi1wcm9kdWN0LXdpdGgtY3VzdG9tLWZpZWxkcy13cm9uZy10b3RhbC1wcmljZT90bXBsPW1hcmtkb3du) 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.177 seconds

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

[](#top)
