If I add a product to the cart, the item is added to the cart but the cart button does not update unless I refresh the page. I am running Opencart 4.0.3 on shared hosting.
Any suggestions would be appreciated.
The store in progress is https://store.w9ab.org/
Thanks
Any suggestions would be appreciated.
The store in progress is https://store.w9ab.org/
Thanks
Last edited by frrobert on Sat Oct 21, 2023 9:01 am, edited 2 times in total.
Check both your PHP and OpenCart error logs and then check you PHP configuration.
Do you mean 4.0.2.3?
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Attachments
curl_gd_zip_error.png (10.44 KiB) Viewed 1376 times
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Could be some server-side caching with your host, you could ask them?
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
As IP_CAM pointed out, your Add to Cart button does the Ajax call to https://store.w9ab.org/index.php?route= ... uage=en-gb, but the resulting JSON response has some errors:
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 284 of the JSON data
Best to contact your webhost, your PHP configuration appears to be messed up, the PHP curl, gd, and zip should only be installed once on your server!
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 284 of the JSON data
Code: Select all
{"success":"Success: You have added <a href=\"https:\/\/store.w9ab.org\/index.php?route=product\/product&language=en-gb&product_id=50\">Christmas Dinner<\/a> to your <a href=\"https:\/\/store.w9ab.org\/index.php?route=checkout\/cart&language=en-gb\">shopping cart<\/a>!"}<br />
<b>Warning</b>: Module "curl" is already loaded in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>: Module "gd" is already loaded in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>: Module "zip" is already loaded in <b>Unknown</b> on line <b>0</b><br />
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
I checked with my host and there is no server side cache.
I believed I fixed it.
I edited my php.ini file for that subdomain. I commented out the three lines below and all seems working. Thanks for your help.
;extension=curl
;extension=gd
;extension=zip
I believed I fixed it.
I edited my php.ini file for that subdomain. I commented out the three lines below and all seems working. Thanks for your help.
;extension=curl
;extension=gd
;extension=zip
Great! And thanks for updating us with the solution!
If you could now add [SOLVED] to the start of the post title that would be great.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Thanks for posting this solution, it allowed me to help another OpenCart user today.
Who is online
Users browsing this forum: Majestic-12 [Bot] and 10 guests