Page 1 of 1
mini cart in header not updating to show option price
Posted: Mon Jun 30, 2025 6:57 pm
by ianhaney50
I'm using opencart 3.0.4.0 on a clients site I'm building/developing for them and the product price is 0.00 as the product has options so in a way the option prices become the products base price. I have managed to update the code for the cart to show the option price instead of the 0.00 and think it is half working as I select a option and add it to the cart and in the mini cart in the header it shows 1 item(s) - £0.00 and if I click on the cart button, it shows the correct price in the small dropdown but in the text on the button itself it don't show the option price but weird thing is when I refresh the page, it shows the option price so after I refresh the page/site, it shows 1 item(s) - £75.00
I'm not sure how to resolve the issue, I have tried different code to try and reload the mini cart after adding a product but it's not working, I'll be honest and I asked chatgpt to do the code for me, I know it's not 100% but thought it might give something pretty close but it's not working
Re: mini cart in header not updating to show option price
Posted: Mon Jun 30, 2025 7:46 pm
by paulfeakins
ianhaney50 wrote: ↑Mon Jun 30, 2025 6:57 pm
I'll be honest and I asked chatgpt to do the code for me
Yeah luckily us web developers still have jobs at this point.
Anyway, why not just make the product price the price of the lowest option and make the other options the differences? That's how it's supposed to work.
Re: mini cart in header not updating to show option price
Posted: Mon Jun 30, 2025 7:53 pm
by ianhaney50
paulfeakins wrote: ↑Mon Jun 30, 2025 7:46 pm
Yeah luckily us web developers still have jobs at this point.
Anyway, why not just make the product price the price of the lowest option and make the other options the differences? That's how it's supposed to work.
I thought of that way and mentioned it a few times but the client is adamant they want it this way so need to work out a way on how to refresh the mini cart after a product is added
Re: mini cart in header not updating to show option price
Posted: Mon Jun 30, 2025 8:04 pm
by paulfeakins
Well if a client is paying you to develop this you'd better learn to code it

Re: mini cart in header not updating to show option price
Posted: Mon Jun 30, 2025 9:00 pm
by JNeuhoff
As paulfeakins suggested, set the product price to the lowest value option price, and the other option prices will show the higher price differences only. The mini cart always shows the calculated price correctly anyway. And there are extensions (such as our
Instant Option Price Calculator) which instantly update the product price on the product page depending on the chosen option values.
Re: mini cart in header not updating to show option price
Posted: Tue Jul 01, 2025 8:02 pm
by paulfeakins
JNeuhoff wrote: ↑Mon Jun 30, 2025 9:00 pm
And there are extensions (such as our
Instant Option Price Calculator) which instantly update the product price on the product page depending on the chosen option values.
We like JNeuhoff and his extensions
