Post by frrobert » Wed Oct 18, 2023 5:03 am

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
Last edited by frrobert on Sat Oct 21, 2023 9:01 am, edited 2 times in total.

Newbie

Posts

Joined
Mon Oct 09, 2023 2:46 am

Post by ADD Creative » Wed Oct 18, 2023 7:04 am

Check both your PHP and OpenCart error logs and then check you PHP configuration.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Wed Oct 18, 2023 7:16 pm

frrobert wrote:
Wed Oct 18, 2023 5:03 am
I am running Opencart 4.0.3 on shared hosting.
Do you mean 4.0.2.3?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by frrobert » Wed Oct 18, 2023 11:46 pm

yes, sorry for the typo

Newbie

Posts

Joined
Mon Oct 09, 2023 2:46 am

Post by IP_CAM » Thu Oct 19, 2023 12:23 am

Image

Attachments

curl_gd_zip_error.png

curl_gd_zip_error.png (10.44 KiB) Viewed 1381 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.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by paulfeakins » Thu Oct 19, 2023 7:01 pm

frrobert wrote:
Wed Oct 18, 2023 5:03 am
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.
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


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by JNeuhoff » Thu Oct 19, 2023 8:02 pm

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

Code: Select all

{"success":"Success: You have added <a href=\"https:\/\/store.w9ab.org\/index.php?route=product\/product&amp;language=en-gb&amp;product_id=50\">Christmas Dinner<\/a> to your <a href=\"https:\/\/store.w9ab.org\/index.php?route=checkout\/cart&amp;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 />
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!

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by frrobert » Fri Oct 20, 2023 3:04 am

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

Newbie

Posts

Joined
Mon Oct 09, 2023 2:46 am

Post by paulfeakins » Fri Oct 20, 2023 7:00 pm

frrobert wrote:
Fri Oct 20, 2023 3:04 am
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
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


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Johnathan » Tue Sep 17, 2024 12:41 am

frrobert wrote:
Fri Oct 20, 2023 3:04 am
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
Thanks for posting this solution, it allowed me to help another OpenCart user today.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 9 guests