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

#   Characteristic price is wrong when go back

##

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

Less More

- Posts: 1191
- Thank you received: 13
-
-

3 years 1 month ago [\#355286](#355286) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355286 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")* was created by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")*

-- HikaShop version -- : 5.0.0
-- Joomla version -- : 4.3.4

Hello!

I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.

Thank you

- [ ![correct-price.jpg](/forum/attachment/57869) ](/forum/attachment/57869 "correct-price.jpg") [ ](/forum/attachment/57869?download=1 "correct-price.jpg")
- [ ![when-go-back.jpg](/forum/attachment/57870) ](/forum/attachment/57870 "when-go-back.jpg") [ ](/forum/attachment/57870?download=1 "when-go-back.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcwMjctY2hhcmFjdGVyaXN0aWMtcHJpY2UtaXMtd3Jvbmctd2hlbi1nby1iYWNrP3RtcGw9bWFya2Rvd24=) 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: 86316
- Thank you received: 14276
-
-

3 years 1 month ago [\#355288](#355288) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355288 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi,

I'm sorry but I don't see the problem.
If I go back to the product from the checkout page on your website and reselect the same variant, I see the same price as the first time I selected the variant.
It seems to work fine.
Also, your two screenshots have the same price too.
Could you provide more information on how to reproduce the problem and what the problem is ?

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

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

Less More

- Posts: 1191
- Thank you received: 13
-
-

3 years 1 month ago [\#355296](#355296) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355296 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi,

I'm sending the correct screenshot, my bad!
If you go back you will see the correct selection but no add to cart button cause there's a 0 stock characteristic option for "Please select".
It's not about reselecting characteristics when you go back but about what you see (meaning the selection you made).

Thank you

- [ ![correct-price&#95;2023-09-22.jpg](/forum/attachment/57877) ](/forum/attachment/57877 "...2023-09-22.jpg") [ ](/forum/attachment/57877?download=1 "...2023-09-22.jpg")
- [ ![when-go-back&#95;2023-09-22.jpg](/forum/attachment/57878) ](/forum/attachment/57878 "...2023-09-22.jpg") [ ](/forum/attachment/57878?download=1 "...2023-09-22.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcwMjctY2hhcmFjdGVyaXN0aWMtcHJpY2UtaXMtd3Jvbmctd2hlbi1nby1iYWNrP3RtcGw9bWFya2Rvd24=) 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: 86316
- Thank you received: 14276
-
-

3 years 1 month ago [\#355297](#355297) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355297 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi,

That's normal.
If you want to see what you had selected, you need to turn off the "remove category and product id in the URLs" setting in the HikaShop configuration.
That way, provided that the "force canonical URLs on listings" setting is not activated, HikaShop will include the id of the variant in the URL of the product from the checkout and thus the system will automatically reselect the corresponding variant, and display the corresponding information on the product page.

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

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

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

Less More

- Posts: 1191
- Thank you received: 13
-
-

3 years 1 month ago [\#355323](#355323) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355323 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi,

I deactivated the "remove category and product id in the URLs" setting.
the "force canonical URLs on listings" setting is set as "Use canonical URL if specified".
Still not working.
Could you take a look Nicolas?

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcwMjctY2hhcmFjdGVyaXN0aWMtcHJpY2UtaXMtd3Jvbmctd2hlbi1nby1iYWNrP3RtcGw9bWFya2Rvd24=) 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: 86316
- Thank you received: 14276
-
-

3 years 1 month ago [\#355332](#355332) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355332 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi,

As I said, you need to turn off the "force canonical URLs on listings" setting. The "Use canonical URL if specified" choice still means that the system takes into accoun the canonical URL.

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

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

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

Less More

- Posts: 1191
- Thank you received: 13
-
-

3 years 1 month ago [\#355343](#355343) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355343 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

I turned it off but the same thing keeps happenning.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcwMjctY2hhcmFjdGVyaXN0aWMtcHJpY2UtaXMtd3Jvbmctd2hlbi1nby1iYWNrP3RtcGw9bWFya2Rvd24=) 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: 86316
- Thank you received: 14276
-
-

3 years 1 month ago [\#355345](#355345) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355345 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi,

I don't see what you're talking about on your website now.
For example, I have this cart:
[ i.imgur.com/LT7Tn1H.png](https://i.imgur.com/LT7Tn1H.png)
The link on the first one is: index.php/metallika-epipla/krevatia/stromata-ypnou/product/1894-stroma-ypnou-candia-perfect
When I use it, I arrive on the page with 80*190 preselected and the price of 182€ displayed
The link on the second one is: index.php/metallika-epipla/krevatia/stromata-ypnou/product/1907-stroma-ypnou-candia-perfect
When I use it, I arrive on the page with 120*200 preselected and the price of 235€ displayed
Isn't that what you wanted to have ?
Or maybe I didn't understand what you meant ?

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

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

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

Less More

- Posts: 1191
- Thank you received: 13
-
-

3 years 1 month ago [\#355372](#355372) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355372 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi nicolas!

You are at [ this product](https://www.art-metal.gr/joomla4/index.php/metallika-epipla/krevatia/stromata-ypnou/product/1893-stroma-ypnou-candia-perfect) and you add to cart the 140cm Πλάτος στρώματος and 200cm Μήκος Στρώματος product so the price for that is 270,00 €.
You click on "complete checkout" and you are at the checkout page.
Then you click the Back arrow on the browser and you go back at the product page, you will see there the characteristic options selected correctly but there will be no price or the "add to cart button" available.

I don't know if i'm not explaining it accurately, see the screenshots.

Thank you

- [ ![when-go-back&#95;2023-09-26.jpg](/forum/attachment/57895) ](/forum/attachment/57895 "...2023-09-26.jpg") [ ](/forum/attachment/57895?download=1 "...2023-09-26.jpg")
- [ ![correct-price&#95;2023-09-26.jpg](/forum/attachment/57896) ](/forum/attachment/57896 "...2023-09-26.jpg") [ ](/forum/attachment/57896?download=1 "...2023-09-26.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcwMjctY2hhcmFjdGVyaXN0aWMtcHJpY2UtaXMtd3Jvbmctd2hlbi1nby1iYWNrP3RtcGw9bWFya2Rvd24=) 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: 86316
- Thank you received: 14276
-
-

3 years 1 month ago -  3 years 1 month ago [\#355377](#355377) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355377 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi,

Ok, I see what you mean. It's an artifact of the browser loading the page from the history.
Edit the file components/com_hikashop/views/product/tmpl/show_block_characteristic.php and change the code: Code:

&lt;?php if(($characteristics_dynamic_display &amp;&amp; $count &gt; 1) &#124;&#124; $characteristics_dynamic_display &gt; 1) { ?&gt; window.hikashop.ready( function() { initVariants(); }); &lt;?php } ?&gt;

to: Code:

window.hikashop.ready( function() { // register the default values on the charactersitics var elements = document.querySelectorAll('[data-characteristic="1"]'); if(elements &amp;&amp; elements.length == 1) { for (index = 0; index &lt; elements.length; ++index) { elements[index].dataset.default = elements[index].selectedIndex; } } elements = document.querySelector('[data-characrow="1"] input'); if(elements &amp;&amp; elements.length == 1) { for (index = 0; index &lt; elements.length; ++index) { if(elements[index].checked) elements[index].dataset.defaultchecked = true; else elements[index].dataset.defaultchecked = false; } } // reset the dropdowns and checkboxes when the page changes window.addEventListener('beforeunload', (event) =&gt; { var elements = document.querySelectorAll('[data-characteristic="1"]'); if(elements &amp;&amp; elements.length == 1) { for (index = 0; index &lt; elements.length; ++index) { if(elements[index].tagName.toLowerCase() == 'select') { elements[index].selectedIndex = elements[index].dataset.default; } } } elements = document.querySelector('[data-characrow="1"] input'); if(elements &amp;&amp; elements.length == 1) { for (index = 0; index &lt; elements.length; ++index) { elements[index].checked = elements[index].dataset.defaultchecked; } } }); &lt;?php if(($characteristics_dynamic_display &amp;&amp; $count &gt; 1) &#124;&#124; $characteristics_dynamic_display &gt; 1) { ?&gt; initVariants(); &lt;?php } ?&gt; });

it should prevent the problem from happening.

Last edit: 3 years 1 month ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

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

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

Less More

- Posts: 1191
- Thank you received: 13
-
-

3 years 1 month ago [\#355385](#355385) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355385 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi,

I did it but still no change!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcwMjctY2hhcmFjdGVyaXN0aWMtcHJpY2UtaXMtd3Jvbmctd2hlbi1nby1iYWNrP3RtcGw9bWFya2Rvd24=) 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: 86316
- Thank you received: 14276
-
-

3 years 1 month ago [\#355388](#355388) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355388 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi

You have a javascript error on your page which comes from the code: Code:

&lt;script&gt; jQuery(function($) { $('#tm-dialog-mobile .uk-nav-default, #tm-dialog-mobile .uk-nav-sub').addClass('uk-nav-parent-icon').attr('uk-nav', ''); $('#tm-dialog-mobile .uk-nav-default .uk-parent &gt; a, #tm-dialog-mobile .uk-nav-sub .uk-parent &gt; a').append('&lt;span uk-nav-parent-icon&gt;&lt;/span&gt;'); $('.uk-parent:has(.uk-active)').addClass('uk-active'); }); &lt;script id="mcjs"&gt;!function(c,h,i,m,p){m=c.createElement(h),p=c.getElementsByTagName(h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,"script","https://chimpstatic.com/mcjs-connected/js/users/13956b617854c6a4f34c1e258/f7cfc75ded658143d0579e29d.js"); &lt;/script&gt;

As you can see, you have a script tag inside a script tag, and that's not valid.

Because of that, the code I provided is not run by your browser and so it doesn't change anything.

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

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

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

Less More

- Posts: 1191
- Thank you received: 13
-
-

3 years 1 month ago [\#355394](#355394) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355394 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Nicolas,

I removed that code and i still see the same thing.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcwMjctY2hhcmFjdGVyaXN0aWMtcHJpY2UtaXMtd3Jvbmctd2hlbi1nby1iYWNrP3RtcGw9bWFya2Rvd24=) 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: 86316
- Thank you received: 14276
-
-

3 years 1 month ago [\#355405](#355405) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355405 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi,

Indeed, I don't see that javascript error anymore.
However, I don't see the code I provided on your page.
Could it be that you have already a view override for show_block_characteristic ?
In that case, you also need to do the same change to the override of show_block_characteristic via the menu Display&gt;Views of the HikaShop backend.

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

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

Less More

- Posts: 1191
- Thank you received: 13
-
-

3 years 1 month ago [\#355410](#355410) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355410 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi!

There are two more line with the code Code:

&lt;?php if(($characteristics_dynamic_display &amp;&amp; $count &gt; 1) &#124;&#124; $characteristics_dynamic_display &gt; 1) { ?&gt;

Should i do something there also?

This is what i have now:
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 4.6.2 * @author hikashop.com * @copyright (C) 2010-2022 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php if(empty($this-&gt;element-&gt;characteristics)) return; ?&gt; &lt;div id="hikashop_product_characteristics" class="hikashop_product_characteristics"&gt; &lt;?php if($this-&gt;params-&gt;get('characteristic_display') != 'list') { $app = JFactory::getApplication(); $config = hikashop_config(); $characteristics_dynamic_display = $config-&gt;get('characteristics_dynamic_display', 1); $this-&gt;characteristics=&amp;$this-&gt;element-&gt;main-&gt;characteristics; foreach($this-&gt;characteristics as $k =&gt; $characteristic) { if(empty($this-&gt;characteristics[$k]-&gt;characteristic_display_method)) { $this-&gt;characteristics[$k]-&gt;characteristic_display_method = $this-&gt;params-&gt;get('characteristic_display'); } } $chromePath = JPATH_THEMES . DS . $app-&gt;getTemplate() . DS . 'html' . DS . 'hikashop_characteristics.php'; if(file_exists($chromePath)) { require_once ($chromePath); if(function_exists('hikashop_characteristics_html')) { echo hikashop_characteristics_html($this-&gt;element, $params, $this); echo '&lt;/div&gt;'; return; } } $html = ''; $js = ''; $ids = array_keys($this-&gt;characteristics); $list = '[\''.implode('\',\'',$ids).'\']'; switch($this-&gt;params-&gt;get('characteristic_display')){ case 'table': if(count($this-&gt;characteristics) == 2) { $html = ''; $firstCharacteristic = reset($this-&gt;characteristics); $secondCharacteristic = end($this-&gt;characteristics); $html.= '&lt;table class="hikashop_product_characteristic_chooser"&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;'; if(!empty($secondCharacteristic-&gt;values)){ foreach($secondCharacteristic-&gt;values as $value){ $html.='&lt;td&gt;'.hikashop_translate($value-&gt;characteristic_value).'&lt;/td&gt;'; } } $html.='&lt;/tr&gt;'; $this-&gt;options=' onclick="return hikashopUpdateVariantData(this.value);"'; $size=0; if(!empty($firstCharacteristic-&gt;values)){ foreach($firstCharacteristic-&gt;values as $value){ $html .= '&lt;tr&gt;&lt;td style="text-align:right"&gt;'.hikashop_translate($value-&gt;characteristic_value).'&lt;/td&gt;'; if(strlen($value-&gt;characteristic_value)&gt;$size) $size=strlen($value-&gt;characteristic_value); if(!empty($secondCharacteristic-&gt;values)) { foreach($secondCharacteristic-&gt;values as $value2) { $class = ''; $classspan = ''; $extra = ''; foreach($this-&gt;element-&gt;variants as $k =&gt; $variant) { $char1 = false; $char2 = false; foreach($variant-&gt;characteristics as $variantCharacteristic) { if($variantCharacteristic-&gt;characteristic_id == $value-&gt;characteristic_id) { $char1 = true; } elseif($variantCharacteristic-&gt;characteristic_id == $value2-&gt;characteristic_id) { $char2 = true; } if($char1 &amp;&amp; $char2) { if(!$variant-&gt;product_published &#124;&#124; $variant-&gt;product_quantity == 0) { $class = ' hikashop_product_variant_out_of_stock'; $classspan=' hikashop_product_variant_out_of_stock_span'; }else { $extra = ' data-stock="'.(int)$variant-&gt;product_quantity.'"'; } break 2; } } } $name = '_'.$value-&gt;characteristic_id.'_'.$value2-&gt;characteristic_id; $radio = "\n\t&lt;span class=\"hikashop_product_characteristic_span".$classspan."\"&gt;&lt;input type=\"radio\" class=\"hikashop_product_characteristic".$class."\" name=\"hikashop_product_characteristic\"".$extra." id=\"hikashop_product_characteristic".$name."\" value=\"".$name."\" ".$this-&gt;options; if($this-&gt;characteristics[$value-&gt;characteristic_parent_id]-&gt;default-&gt;characteristic_id == $value-&gt;characteristic_id &amp;&amp; !empty($this-&gt;characteristics[$value2-&gt;characteristic_parent_id]-&gt;default-&gt;characteristic_id) &amp;&amp; $this-&gt;characteristics[$value2-&gt;characteristic_parent_id]-&gt;default-&gt;characteristic_id == $value2-&gt;characteristic_id) { $radio .= ' checked'; } $radio .= " /&gt;&lt;/span&gt;"; $html .= '&lt;td&gt;'.$radio.'&lt;/td&gt;'; } } $html .= '&lt;/tr&gt;'; } } $html .= '&lt;/table&gt;'; if($this-&gt;params-&gt;get('characteristic_display_text')) { $space = ''; for($i = 0; $i &lt;= $size; $i++) { $space .= '&amp;nbsp;&amp;nbsp;'; } $html = '&lt;table class="hikashop_product_characteristic_chooser"&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td class="hikashop_charactersitic_name"&gt;'.$space.@$secondCharacteristic-&gt;characteristic_value.'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hikashop_charactersitic_name"&gt;'.$firstCharacteristic-&gt;characteristic_value.'&lt;/td&gt;&lt;td&gt;'.$html.'&lt;/td&gt;&lt;/table&gt;'; } break; } default: case 'radio': case 'dropdown': $main_html = '&lt;table class="hikashop_product_characteristics_table"&gt;'; $config = hikashop_config(); $count = count($this-&gt;characteristics); $i = 0; foreach($this-&gt;characteristics as $characteristic) { $i++; $main_html.='&lt;tr class="hikashop_characteristic_line_'.$characteristic-&gt;characteristic_id.'" data-characrow="'.$i.'"&gt;'; $values = array(); $switch_done = false; if(!empty($characteristic-&gt;values)) { foreach($characteristic-&gt;values as $k =&gt; $value){ if(!$config-&gt;get('show_out_of_stock',1)){ $hasQuantity = false; foreach($this-&gt;element-&gt;variants as $variant){ foreach($variant-&gt;characteristics as $variantCharacteristic){ if($variantCharacteristic-&gt;characteristic_id==$value-&gt;characteristic_id){ if($variant-&gt;product_quantity != 0){ $hasQuantity = true; }elseif( $this-&gt;element-&gt;product_id==$variant-&gt;product_id &amp;&amp; !$switch_done){ if($characteristic-&gt;characteristic_display_method == 'dropdown'){ $id = 'hikashop_product_characteristic_'.$characteristic-&gt;characteristic_id; $js = "hikashopUpdateVariant(document.getElementById('".$id."'));"; }else{ $id = 'hikashop_product_characteristic['.$characteristic-&gt;characteristic_id.']'; $js = "var el = document.querySelector('[name=\"".$id."\"]'); if(el) el.checked = true; hikashopUpdateVariant(el);"; } $js = " window.hikashop.ready( function() {".$js."});"; $switch_done = true; } } } } if(!$hasQuantity) continue; } $values[$k] = $value-&gt;characteristic_value; } } if(empty($values) &#124;&#124; !is_array($values)){ echo JText::_('NO_VALUES_FOUND'); echo '&lt;/div&gt;'; return; } if(is_array($this-&gt;characteristics)){ $characteristic_id = @$characteristic-&gt;characteristic_id; @$characteristic-&gt;characteristic_id = 'hikashop_product_characteristic['.$characteristic_id.']'; $id = 'hikashop_product_characteristic_'.$characteristic_id; }else{ $id = $characteristic_id = $map; } $selected = (int)@$characteristic-&gt;default-&gt;characteristic_id; $this-&gt;values = array(); if(($characteristics_dynamic_display &amp;&amp; $count &gt; 1) &#124;&#124; $characteristics_dynamic_display &gt; 1) { if($characteristic-&gt;characteristic_display_method!='radio') $this-&gt;values[] = JHTML::_('select.option', '', JText::_('PLEASE_SELECT') ); $selected = ''; } foreach($values as $key =&gt; $val){ if(strlen($val)!=0 &amp;&amp; empty($val)){ $val = $val.'&amp;nbsp;'; } if(strpos($val, '&lt;img ') !== false) $val = str_replace('&lt;img ', '&lt;img onclick="return hikashopVariantSelected(\'hikashop_product_characteristic_'.$characteristic_id.$key.'\');" ', $val); $clean = hikashop_translate(strip_tags($val)); $optionValue = ($characteristic-&gt;characteristic_display_method != 'radio' &amp;&amp; !empty($clean) ? $clean : hikashop_translate($val)); $obj = new stdClass; $obj-&gt;value = $key; $obj-&gt;text = $optionValue; $obj-&gt;id = 'hikashop_product_characteristic_'.$characteristic_id.'_'.$key; $this-&gt;values[] = $obj; } $type = 'onclick'; if($characteristic-&gt;characteristic_display_method!='radio'){ $characteristic-&gt;characteristic_display_method='generic'; $type = 'onchange'; } $options = ' '.$type.'="return hikashopVariantSelected(this);"'; $options .=' data-characteristic="'.$i.'"'; if($count == $i) $options .=' data-last="1"'; $html = JHTML::_('select.'.$characteristic-&gt;characteristic_display_method.'list', $this-&gt;values, @$characteristic-&gt;characteristic_id, 'class="custom-select" size="1"' . $options, 'value', 'text', $selected, $id ); if($this-&gt;params-&gt;get('characteristic_display_text') &amp;&amp; isset($characteristic-&gt;characteristic_value)) { $html = hikashop_translate($characteristic-&gt;characteristic_value).'&lt;/td&gt;&lt;td&gt;'.$html; } $main_html .= '&lt;td&gt;'.$html.'&lt;/td&gt;&lt;/tr&gt;'; } $main_html .= '&lt;/table&gt;'; $html = $main_html; if($characteristics_dynamic_display) { $matches = $this-&gt;getAllValuesMatches($this-&gt;characteristics, $this-&gt;element-&gt;variants, $this-&gt;element-&gt;main); $js.="\r\n".'window.hikashop.availableValues = ['; if($matches) { foreach($matches as $value_id =&gt; $children) { $js.="\r\n\t"."[".implode(',',$children)."],"; } } $js.="\r\n".'];'; } break; } echo $html; ?&gt; &lt;script&gt; &lt;?php echo $js; ?&gt; window.hikashop.ready( function() { // register the default values on the charactersitics var elements = document.querySelectorAll('[data-characteristic="1"]'); if(elements &amp;&amp; elements.length == 1) { for (index = 0; index &lt; elements.length; ++index) { elements[index].dataset.default = elements[index].selectedIndex; } } elements = document.querySelector('[data-characrow="1"] input'); if(elements &amp;&amp; elements.length == 1) { for (index = 0; index &lt; elements.length; ++index) { if(elements[index].checked) elements[index].dataset.defaultchecked = true; else elements[index].dataset.defaultchecked = false; } } // reset the dropdowns and checkboxes when the page changes window.addEventListener('beforeunload', (event) =&gt; { var elements = document.querySelectorAll('[data-characteristic="1"]'); if(elements &amp;&amp; elements.length == 1) { for (index = 0; index &lt; elements.length; ++index) { if(elements[index].tagName.toLowerCase() == 'select') { elements[index].selectedIndex = elements[index].dataset.default; } } } elements = document.querySelector('[data-characrow="1"] input'); if(elements &amp;&amp; elements.length == 1) { for (index = 0; index &lt; elements.length; ++index) { elements[index].checked = elements[index].dataset.defaultchecked; } } }); &lt;?php if(($characteristics_dynamic_display &amp;&amp; $count &gt; 1) &#124;&#124; $characteristics_dynamic_display &gt; 1) { ?&gt; initVariants(); &lt;?php } ?&gt; }); function initVariants() { var allRows = document.querySelectorAll('tr[data-characrow]'), first = true, qtyArea = document.getElementById('hikashop_product_quantity_main'), altArea = document.getElementById('hikashop_product_quantity_alt'); for (index = 0; index &lt; allRows.length; ++index) { if(first) { first = false; } else { allRows[index].style.display = 'none'; } } if(qtyArea) { qtyArea.style.display = 'none'; } if(altArea) { altArea.style.display = ''; } &lt;?php if(@$this-&gt;displayVariants['prices']) { ?&gt; var priceDivs = document.querySelectorAll('#hikashop_product_price_main &gt; .hikashop_product_price_full'); priceDivs.forEach(function (sub) { sub.style.display = 'none'; }); &lt;?php } ?&gt; &lt;?php if( $characteristics_dynamic_display &lt;= 1) { ?&gt; var firstEl = document.querySelector('[data-characteristic="1"]'); var firstRow = document.querySelector('[data-characrow="1"]'); var autoSelect = false; if(firstEl.tagName.toLowerCase() == 'select') { if(firstEl.options.length == 2) { autoSelect = true; firstEl.selectedIndex = firstEl.options.length - 1; if(window.jQuery &amp;&amp; typeof(jQuery().chosen) == "function") { jQuery( "#hikashop_product_characteristics select" ).chosen('destroy').chosen({disable_search_threshold:10, search_contains: true}); } } } else { var inputs = firstRow.querySelectorAll('input'); if(inputs.length == 1) { autoSelect = true; inputs[inputs.length-1].checked = true; } } if(autoSelect) { if(firstEl.tagName.toLowerCase() == 'select') { hikashopVariantSelected(firstEl); } else { hikashopVariantSelected(inputs[inputs.length-1]); } } &lt;?php } ?&gt; } function getValidVariants(pos) { var allInputs = document.querySelectorAll('[data-characteristic]'), selectedElements = [], validVariants = []; for (index = 0; index &lt; allInputs.length; ++index) { var input = allInputs[index]; if(input.tagName.toLowerCase() == 'select') { if(input.selectedIndex &amp;&amp; input.value) selectedElements[selectedElements.length] = parseInt(input.options[input.selectedIndex].value); } else { if(input.checked) selectedElements[selectedElements.length] = parseInt(input.value); } if(selectedElements.length == pos) break; } if(!selectedElements.length) return window.hikashop.availableValues; for (index = 0; index &lt; window.hikashop.availableValues.length; ++index) { var valid = true; for (index2 = 0; index2 &lt; selectedElements.length; ++index2) { if(selectedElements[index2] != window.hikashop.availableValues[index][index2]) { valid = false; break; } } if(valid){ validVariants[validVariants.length] = window.hikashop.availableValues[index]; } } return validVariants; } function hikashopVariantSelected(obj) { &lt;?php if(($characteristics_dynamic_display &amp;&amp; $count &gt; 1) &#124;&#124; $characteristics_dynamic_display &gt; 1) { ?&gt; if(typeof(obj) == "string") obj = document.getElementById(obj); if(!obj) return true; var pos = obj.getAttribute('data-characteristic'), last = obj.getAttribute('data-last'), otherRow = null, qtyArea = document.getElementById('hikashop_product_quantity_main'), altArea = document.getElementById('hikashop_product_quantity_alt'); if(!last) { validVariants = getValidVariants(pos); if(validVariants.length &lt; 1 &amp;&amp; obj.value != '') { console.log('characteristic value with id ' + obj.value + ' missing in window.hikashop.availableValues'); } else { var next = parseInt(pos) + 1; var nextEl = document.querySelector('[data-characteristic="'+next+'"]'); var nextRow = document.querySelector('[data-characrow="'+next+'"]'); if(nextEl.tagName.toLowerCase() == 'select') { nextEl.selectedIndex = 0; } else { var inputs = nextRow.querySelectorAll('input'); for (index = 0; index &lt; inputs.length; ++index) { inputs[index].checked = false; } } if(obj.value == '') { nextRow.style.display = 'none'; } else { nextRow.style.display = ''; } next++; while(otherRow = document.querySelector('[data-characrow="'+next+'"]')) { next++; otherRow.style.display = 'none'; } var autoSelect = false; if(nextEl.tagName.toLowerCase() == 'select') { var count = 0; var lastIndexFound = 0; for (index = 0; index &lt; nextEl.options.length; ++index) { var found = false; for (i = 0; i &lt; validVariants.length; ++i) { var currentVariant = validVariants[i]; if(parseInt(nextEl.options[index].value) == currentVariant[pos]) { found = true; lastIndexFound = index; nextEl.options[index].hidden = false; nextEl.options[index].disabled = false; } } if(!found &amp;&amp; index != 0) { nextEl.options[index].hidden = true; nextEl.options[index].disabled = true; } else { count++; } } if(count==2) { autoSelect = true; nextEl.selectedIndex = lastIndexFound; } if(window.jQuery &amp;&amp; typeof(jQuery().chosen) == "function") { jQuery( "#hikashop_product_characteristics select" ).chosen('destroy').chosen({disable_search_threshold:10, search_contains: true}); } } else { var inputs = nextRow.querySelectorAll('input'); var count = 0; var lastIndexFound = 0; for (index = 0; index &lt; inputs.length; ++index) { var found = false; for (i = 0; i &lt; validVariants.length; ++i) { var currentVariant = validVariants[i]; if(parseInt(inputs[index].value) == currentVariant[pos]) { found = true; lastIndexFound = index; inputs[index].parentNode.style.setProperty('display', '', 'important'); } } if(!found) { inputs[index].parentNode.style.setProperty('display', 'none', 'important'); } else { count++; } } if(count==2) { autoSelect = true; inputs[lastIndexFound].checked = true; } } if(qtyArea) { qtyArea.style.display = 'none'; } if(altArea) { altArea.style.display = ''; } if(autoSelect) { if(nextEl.tagName.toLowerCase() == 'select') { hikashopVariantSelected(nextEl); } else { hikashopVariantSelected(inputs[lastIndexFound]); } } return; } } if(obj.value != '') { if(qtyArea) { qtyArea.style.display = ''; } if(altArea) { altArea.style.display = 'none'; } } else { if(qtyArea) { qtyArea.style.display = 'none'; } if(altArea) { altArea.style.display = ''; } } &lt;?php } ?&gt; hikashopUpdateVariant(obj); } function hikashopUpdateVariant(obj) { var options = &lt;?php echo $list; ?&gt;; var len = options.length, selection = '', found = false, el = null; if(typeof(obj) == "string") obj = document.getElementById(obj); if(!obj) return true; try { obj.blur(); } catch(e){} for (var i = 0; i &lt; len; i++) { el = document.getElementById('hikashop_product_characteristic_'+options[i]); if(el) { selection += '_' + el.value; continue; } var form = document['hikashop_product_form']; if(!form) { continue; } var checkFields = form.elements['hikashop_product_characteristic['+options[i]+']']; if(checkFields &amp;&amp; !checkFields.length &amp;&amp; checkFields.value) { selection += '_' + checkFields.value; continue; } var len2 = (checkFields ? checkFields.length : 0); for (var j = 0; j &lt; len2; j++) { if(checkFields &amp;&amp; checkFields[j] &amp;&amp; checkFields[j].checked) { selection += '_' + checkFields[j].value; found = true; } } if(!found) { return true; } } hikashopUpdateVariantData(selection); if(window.Oby &amp;&amp; window.Oby.fireAjax) window.Oby.fireAjax("hkAfterUpdateVariant", {obj:obj,selection:selection}); return true; } function hikashopUpdateVariantData(selection) { if(!selection) return true; var names = ['id','name','code','image','price','quantity','description','weight','url','width','length','height','contact','custom_info','files']; var len = names.length; for(var i = 0; i &lt; len; i++){ var el = document.getElementById('hikashop_product_'+names[i]+'_main'); var el2 = document.getElementById('hikashop_product_'+names[i]+selection); if(el &amp;&amp; el2) el.innerHTML = el2.innerHTML.replace(/_VARIANT_NAME/g, selection).replace(/data-content/g, 'content').replace(/data-itemprop/g, 'itemprop'); } if(window.hikaProductOptions) hikaProductOptions.refreshPrice(); else if(typeof this.window['hikashopRefreshOptionPrice'] == 'function') hikashopRefreshOptionPrice(); if(window.Oby &amp;&amp; window.Oby.fireAjax) window.Oby.fireAjax("hkContentChanged", {selection:selection}); return true; } &lt;/script&gt; &lt;/div&gt; &lt;?php return; } if(!empty($this-&gt;element-&gt;main-&gt;characteristics)) { $columns=0; if((int)$this-&gt;config-&gt;get('show_quantity_field') &gt;= 2) { ?&gt; &lt;form action="&lt;?php echo hikashop_completeLink('product&amp;task=updatecart'); ?&gt;" method="post" name="hikashop_product_form_variants" enctype="multipart/form-data"&gt; &lt;?php } ?&gt; &lt;table class="hikashop_variants_table hikashop_products_table adminlist table table-striped table-hover" cellpadding="1"&gt; &lt;thead class="hikashop_variants_table_thead"&gt; &lt;tr class="hikashop_variants_table_thead_tr"&gt; &lt;?php if($this-&gt;config-&gt;get('thumbnail') &amp;&amp; @$this-&gt;displayVariants['images']) { $columns++; ?&gt; &lt;th class="hikashop_product_image title hikashop_variants_table_th"&gt;&lt;?php echo JText::_( 'HIKA_IMAGE' ); ?&gt;&lt;/th&gt; &lt;?php } if(@$this-&gt;displayVariants['variant_name']) { $columns++; ?&gt; &lt;th class="hikashop_product_name title hikashop_variants_table_th"&gt;&lt;?php echo JText::_( 'PRODUCT' ); ?&gt;&lt;/th&gt; &lt;?php } if($this-&gt;config-&gt;get('show_code')) { $columns++; ?&gt; &lt;th class="hikashop_product_code title hikashop_variants_table_th"&gt;&lt;?php echo JText::_( 'PRODUCT_CODE' ); ?&gt;&lt;/th&gt; &lt;?php } foreach($this-&gt;element-&gt;main-&gt;characteristics as $characteristic) { $columns++; ?&gt; &lt;th class="hikashop_product_characteristic hikashop_product_characteristic_&lt;?php echo $characteristic-&gt;characteristic_id; ?&gt; title hikashop_variants_table_th"&gt;&lt;?php echo hikashop_translate($characteristic-&gt;characteristic_value); ?&gt;&lt;/th&gt; &lt;?php } if(@$this-&gt;displayVariants['product_description']) { $columns++; ?&gt; &lt;th class="hikashop_product_description title hikashop_variants_table_th"&gt;&lt;?php echo JText::_( 'HIKA_DESCRIPTION' ); ?&gt;&lt;/th&gt; &lt;?php } if($this-&gt;params-&gt;get('show_price','-1') == '-1') { $this-&gt;params-&gt;set('show_price', $this-&gt;config-&gt;get('show_price')); } if($this-&gt;params-&gt;get('show_price') &amp;&amp; @$this-&gt;displayVariants['prices']) { $columns++; ?&gt; &lt;th class="hikashop_product_price title hikashop_variants_table_th"&gt;&lt;?php echo JText::_('PRICE'); ?&gt;&lt;/th&gt; &lt;?php } if(!$this-&gt;params-&gt;get('catalogue')){ $columns++; ?&gt; &lt;th class="hikashop_product_add_to_cart title hikashop_variants_table_th"&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody class="hikashop_variants_table_tbody"&gt; &lt;?php $productClass = hikashop_get('class.product'); $productClass-&gt;generateVariantData($this-&gt;element); foreach($this-&gt;element-&gt;variants as $variant) { if(isset($variant-&gt;map)) continue; if(!$this-&gt;config-&gt;get('show_out_of_stock', 1) &amp;&amp; $variant-&gt;product_quantity == 0) continue; if(!$variant-&gt;product_published) continue; $this-&gt;row =&amp; $variant; ?&gt; &lt;tr id="hikashop_variant_row_&lt;?php echo $variant-&gt;product_id; ?&gt;" class="hikashop_variant_row hikashop_variants_table_tbody_tr"&gt; &lt;?php if($this-&gt;config-&gt;get('thumbnail') &amp;&amp; @$this-&gt;displayVariants['images']){ ?&gt; &lt;td class="hikashop_product_image_row hikashop_variants_table_td" data-label="&lt;?php echo JText::_( 'HIKA_IMAGE' ); ?&gt;"&gt; &lt;?php if (!empty ($variant-&gt;images)) { $image = reset($variant-&gt;images); $width = $this-&gt;config-&gt;get('thumbnail_x'); $height = $this-&gt;config-&gt;get('thumbnail_y'); $this-&gt;image-&gt;checkSize($width,$height,$image); foreach($variant-&gt;images as $image) { ?&gt; &lt;div class="hikashop_variants_table_image_thumb"&gt;&lt;?php if($this-&gt;image-&gt;override) { echo $this-&gt;image-&gt;display(@$image-&gt;file_path, true, @$image-&gt;file_name, 'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','', $width, $height); } else { if(empty($this-&gt;popup)) $this-&gt;popup = hikashop_get('helper.popup'); $image_options = array('default' =&gt; true,'forcesize'=&gt;$this-&gt;config-&gt;get('image_force_size',true),'scale'=&gt;$this-&gt;config-&gt;get('image_scale_mode','inside')); $img = $this-&gt;image-&gt;getThumbnail(@$image-&gt;file_path, array('width' =&gt; $width, 'height' =&gt; $height), $image_options); if(@$img-&gt;success) { $attributes = 'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"'; if($img-&gt;external &amp;&amp; $img-&gt;req_width &amp;&amp; $img-&gt;req_height) $attributes .= ' width="'.$img-&gt;req_width.'" height="'.$img-&gt;req_height.'"'; $html = '&lt;img '.$attributes.' title="'.$this-&gt;escape((string)@$image-&gt;file_description).'" alt="'.$this-&gt;escape((string)@$image-&gt;file_name).'" src="'.$img-&gt;url.'"/&gt;'; if($this-&gt;config-&gt;get('add_webp_images', 1) &amp;&amp; function_exists('imagewebp') &amp;&amp; !empty($img-&gt;webpurl)) { $html = ' &lt;picture&gt; &lt;source srcset="'.$img-&gt;webpurl.'" type="image/webp"&gt; &lt;source srcset="'.$img-&gt;url.'" type="image/'.$img-&gt;ext.'"&gt; '.$html.' &lt;/picture&gt; '; } echo $this-&gt;popup-&gt;image($html, $img-&gt;origin_url, null, 'title="'.$this-&gt;escape((string)@$image-&gt;file_description).'"'); } } ?&gt;&lt;/div&gt; &lt;?php } } ?&gt; &lt;/td&gt; &lt;?php } if(@$this-&gt;displayVariants['variant_name']){ ?&gt; &lt;td class="hikashop_product_name_row hikashop_variants_table_td" data-label="&lt;?php echo JText::_( 'PRODUCT' ); ?&gt;"&gt; &lt;?php echo $variant-&gt;variant_name; ?&gt; &lt;/td&gt; &lt;?php } if ($this-&gt;config-&gt;get('show_code')) { ?&gt; &lt;td class="hikashop_product_code_row hikashop_variants_table_td" data-label="&lt;?php echo JText::_( 'PRODUCT_CODE' ); ?&gt;"&gt;&lt;?php echo $variant-&gt;product_code; ?&gt;&lt;/td&gt; &lt;?php } foreach($this-&gt;element-&gt;main-&gt;characteristics as $characteristic) { ?&gt; &lt;td class="hikashop_product_characteristic_row hikashop_product_characteristic_&lt;?php echo $characteristic-&gt;characteristic_id; ?&gt;_row hikashop_variants_table_td" data-label="&lt;?php echo $characteristic-&gt;characteristic_value; ?&gt;"&gt; &lt;?php if(!empty($characteristic-&gt;values)) { foreach($characteristic-&gt;values as $k =&gt; $value) { foreach($variant-&gt;characteristics as $variantCharacteristic) { if($variantCharacteristic-&gt;characteristic_id == $value-&gt;characteristic_id) { echo hikashop_translate($variantCharacteristic-&gt;characteristic_value); break 2; } } } } ?&gt; &lt;/td&gt; &lt;?php } if(@$this-&gt;displayVariants['product_description']) { ?&gt; &lt;td class="hikashop_product_description_row hikashop_variants_table_td" data-label="&lt;?php echo JText::_( 'HIKA_DESCRIPTION' ); ?&gt;"&gt;&lt;?php echo JHTML::_('content.prepare', preg_replace('#&lt;hr *id="system-readmore" */&gt;#i', '', $variant-&gt;product_description)); ?&gt;&lt;/td&gt; &lt;?php } if($this-&gt;params-&gt;get('show_price') &amp;&amp; @$this-&gt;displayVariants['prices']){ ?&gt; &lt;td class="hikashop_product_price_row hikashop_variants_table_td" data-label="&lt;?php echo JText::_( 'PRICE' ); ?&gt;"&gt; &lt;?php if ( ($this-&gt;row-&gt;product_msrp) == ($this-&gt;element-&gt;main-&gt;product_msrp) ) $this-&gt;params-&gt;set('from_module',1); $this-&gt;setLayout('listing_price'); echo $this-&gt;loadTemplate(); $this-&gt;params-&gt;set('from_module',0); ?&gt; &lt;/td&gt; &lt;?php } if(!$this-&gt;params-&gt;get('catalogue')) { ?&gt; &lt;td class="hikashop_product_add_to_cart_row hikashop_variants_table_td"&gt; &lt;?php if ($this-&gt;config-&gt;get('show_quantity_field') &lt; 2) { $this-&gt;params-&gt;set('main_div_name','variants'); $this-&gt;params-&gt;set('extra_div_name','hikashop_product_form'); $this-&gt;params-&gt;set('product_waitlist', $this-&gt;config-&gt;get('product_waitlist', 0)); $this-&gt;setLayout('add_to_cart_ajax'); echo $this-&gt;loadTemplate(); $this-&gt;params-&gt;set('extra_div_name',''); } else { $start_date = (@$this-&gt;row-&gt;product_sale_start &#124;&#124; empty($this-&gt;element-&gt;main)) ? @$this-&gt;row-&gt;product_sale_start : $this-&gt;element-&gt;main-&gt;product_sale_start; $end_date = (@$this-&gt;row-&gt;product_sale_end &#124;&#124; empty($this-&gt;element-&gt;main)) ? @$this-&gt;row-&gt;product_sale_end : $this-&gt;element-&gt;main-&gt;product_sale_end; $now = time(); if($end_date &gt; 0 &amp;&amp; $end_date &lt; $now) { ?&gt; &lt;span class="hikashop_product_sale_end"&gt;&lt;?php echo JText::_('ITEM_NOT_SOLD_ANYMORE'); ?&gt;&lt;/span&gt; &lt;?php } else if($start_date &gt; 0 &amp;&amp; $start_date &gt; $now) { ?&gt; &lt;span class="hikashop_product_sale_start"&gt;&lt;?php echo JText::sprintf('ITEM_SOLD_ON_DATE', hikashop_getDate($start_date, $this-&gt;params-&gt;get('date_format', '%d %B %Y'))); ?&gt;&lt;/span&gt; &lt;?php } else { ?&gt; &lt;span class="hikashop_product_stock_count"&gt; &lt;?php if($this-&gt;row-&gt;product_quantity &gt; 0) echo (($this-&gt;row-&gt;product_quantity == 1 &amp;&amp; JText::_('X_ITEM_IN_STOCK') != 'X_ITEM_IN_STOCK') ? JText::sprintf('X_ITEM_IN_STOCK', $this-&gt;row-&gt;product_quantity) : JText::sprintf('X_ITEMS_IN_STOCK', $this-&gt;row-&gt;product_quantity)); elseif($this-&gt;row-&gt;product_quantity == 0) echo JText::_('NO_STOCK'); ?&gt; &lt;/span&gt; &lt;?php if($this-&gt;row-&gt;product_quantity == -1 &#124;&#124; $this-&gt;row-&gt;product_quantity &gt; 0) { $quantityLayout = $this-&gt;quantityLayout; if(!empty($this-&gt;row-&gt;product_quantity_layout) &amp;&amp; $this-&gt;row-&gt;product_quantity_layout != 'inherit') $quantityLayout = $this-&gt;row-&gt;product_quantity_layout; if(empty($quantityLayout) &#124;&#124; !in_array($quantityLayout, array( 'show_select', 'show_select_price'))) { ?&gt; &lt;input id="hikashop_listing_quantity_&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;" type="text" style="width:40px;" name="data[&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;]" class="hikashop_listing_quantity_field" value="0" /&gt; &lt;?php } else { $min_quantity = ($this-&gt;row-&gt;product_min_per_order &#124;&#124; empty($this-&gt;element-&gt;main)) ? $this-&gt;row-&gt;product_min_per_order : $this-&gt;element-&gt;main-&gt;product_min_per_order; $max_quantity = ($this-&gt;row-&gt;product_max_per_order &#124;&#124; empty($this-&gt;element-&gt;main)) ? $this-&gt;row-&gt;product_max_per_order : $this-&gt;element-&gt;main-&gt;product_max_per_order; $min_quantity = max((int)$min_quantity, 1); $max_quantity = max((int)$max_quantity, 0); if($max_quantity == 0) $max_quantity = $min_quantity * $this-&gt;config-&gt;get('quantity_select_max_default_value', 15); $values = array(); if($quantityLayout == 'show_select' &#124;&#124; empty($this-&gt;row-&gt;prices)) { $values = range($min_quantity, $max_quantity, $min_quantity); } else { foreach($this-&gt;row-&gt;prices as $price) { $price_min_qty = max((int)$price-&gt;price_min_quantity, $min_quantity); $values[$price_min_qty] = $price_min_qty; } } ?&gt; &lt;select id="hikashop_listing_quantity_select_&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;" class="tochosen" onchange="var qty_field = document.getElementById('hikashop_listing_quantity_&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;'); qty_field.value = this.value;"&gt; &lt;?php echo '&lt;option value="0" selected="selected"&gt;0&lt;/option&gt;'; foreach($values as $j) { echo '&lt;option value="'.$j.'"&gt;'.$j.'&lt;/option&gt;'; } ?&gt; &lt;/select&gt; &lt;input id="hikashop_listing_quantity_&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;" type="hidden" name="data[&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;]" value="0" /&gt; &lt;?php } } } } ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;?php if($this-&gt;config-&gt;get('show_quantity_field') &gt;= 2) { $this-&gt;ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form_variants\')){ return hikashopModifyQuantity(\'\',field,1,\'hikashop_product_form_variants\'); } return false;'; $this-&gt;row = new stdClass(); $this-&gt;row-&gt;prices = array($this-&gt;row); $this-&gt;row-&gt;product_quantity = -1; $this-&gt;row-&gt;product_min_per_order = 0; $this-&gt;row-&gt;product_max_per_order = -1; $this-&gt;row-&gt;product_sale_start = 0; $this-&gt;row-&gt;product_sale_end = 0; $this-&gt;row-&gt;formName = 'hikashop_product_form_variants'; $this-&gt;row-&gt;prices = array('filler'); $this-&gt;params-&gt;set('show_quantity_field', 2); $this-&gt;setLayout('quantity'); echo $this-&gt;loadTemplate(); if(!empty($this-&gt;ajax) &amp;&amp; $this-&gt;config-&gt;get('redirect_url_after_add_cart','stay_if_cart') == 'ask_user') { ?&gt; &lt;input type="hidden" name="popup" value="1"/&gt; &lt;?php } ?&gt; &lt;input type="hidden" name="hikashop_cart_type_0" id="hikashop_cart_type_0" value="cart"/&gt; &lt;input type="hidden" name="add" value="1"/&gt; &lt;input type="hidden" name="ctrl" value="product"/&gt; &lt;input type="hidden" name="task" value="updatecart"/&gt; &lt;input type="hidden" name="return_url" value="&lt;?php echo urlencode(base64_encode(urldecode($this-&gt;redirect_url)));?&gt;"/&gt; &lt;/form&gt; &lt;?php } } ?&gt;&lt;/div&gt;

Thank you

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

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

3 years 1 month ago [\#355414](#355414) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355414 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hello,

Another possible root issue is that you use an override that which derives from a view that is too old (here 4.6.2) which can no longer work with the new other views of your HikaShop 5.0.0.

In this kind of case, you have to saved on your side your current override view and removed it from your website, and process some tests.
If that solve your current issue, you have to recreate your override from your recent HikaShop version.
Hope this will help you

Regards

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

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

Less More

- Posts: 1191
- Thank you received: 13
-
-

3 years 1 month ago [\#355450](#355450) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355450 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi!

No i have no overrides for this view file.

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcwMjctY2hhcmFjdGVyaXN0aWMtcHJpY2UtaXMtd3Jvbmctd2hlbi1nby1iYWNrP3RtcGw9bWFya2Rvd24=) 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: 86316
- Thank you received: 14276
-
-

3 years 1 month ago [\#355464](#355464) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355464 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi,

Could it be that you have some caching you need to clear to see the change ?
Or it could be that you have a file templates/YOUR_TEMPLATE/html/hikashop_characteristics.php
which overrides the characteristics display system.

If you don't see what it could be, we'll need a backend access to check on the situation.

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

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

Less More

- Posts: 1191
- Thank you received: 13
-
-

3 years 1 month ago [\#355469](#355469) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355469 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi,

There is no override no,
I checked from other browsers, it's the same.
I will send you backend access OK.

Thank you!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDcwMjctY2hhcmFjdGVyaXN0aWMtcHJpY2UtaXMtd3Jvbmctd2hlbi1nby1iYWNrP3RtcGw9bWFya2Rvd24=) 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: 86316
- Thank you received: 14276
-
-

3 years 1 month ago [\#355533](#355533) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Characteristic price is wrong when go back](/forum/26-product-category-display/907027-characteristic-price-is-wrong-when-go-back#355533 "-- HikaShop version -- : 5.0.0 -- Joomla version -- : 4.3.4  Hello!  I noticed that, when i select 2 characteristics in a product and then add the product to cart, if i go back from the checkout page, the price is wrong.  Thank you")*

Hi,

I was able to confirm that you had not done the modification in product / show_block_characteristic.
In your FTP, you have two websites /public_html/ and /public_html/joomla4/
You had made the modification in /public_html/ but the URL of your website points to /public_html/joomla4/ and you had made the modification to /public_html/ only, and that's why I couldn't see any changes on your website.
I actually spent 20 minutes trying to understand what was going on before finding the joomla4 subfolder.

Anyways, after adding the modification I could see there were still some problems in some cases. So I've adapted a bit the code to this version which seems to work fine: Code:

window.hikashop.ready( function() { // register the default values on the charactersitics var elements = document.querySelectorAll('[data-characteristic]'); if(elements &amp;&amp; elements.length &gt;= 1) { for (index = 0; index &lt; elements.length; ++index) { elements[index].dataset.default = elements[index].selectedIndex; } } elements = document.querySelector('[data-characrow] input'); if(elements &amp;&amp; elements.length &gt;= 1) { for (index = 0; index &lt; elements.length; ++index) { if(elements[index].checked) elements[index].dataset.defaultchecked = true; else elements[index].dataset.defaultchecked = false; } } // reset the dropdowns and checkboxes when the page changes window.addEventListener('beforeunload', (event) =&gt; { var elements = document.querySelectorAll('[data-characteristic]'); if(elements &amp;&amp; elements.length &gt;= 1) { for (index = 0; index &lt; elements.length; ++index) { if(elements[index].tagName.toLowerCase() == 'select') { elements[index].selectedIndex = elements[index].dataset.default; } } } elements = document.querySelector('[data-characrow] input'); if(elements &amp;&amp; elements.length &gt;= 1) { for (index = 0; index &lt; elements.length; ++index) { elements[index].checked = elements[index].dataset.defaultchecked; } } }); &lt;?php if(($characteristics_dynamic_display &amp;&amp; $count &gt; 1) &#124;&#124; $characteristics_dynamic_display &gt; 1) { ?&gt; initVariants(); &lt;?php } ?&gt; });

We're going to include it on our end too.

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

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

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

[](#top)
