Community Forums

Add to cart button not working after transferring domain

General support for technical problems with OpenCart v1.x

Add to cart button not working after transferring domain

Postby alexsmith2709 » Sun May 20, 2012 5:58 am

Hi,
I recently changed to a new host. I setup open cart on a temporary domain (IP address) and got everything working as it should, with all my extensions and custom theme.
I have now transferred my domain to my new host and now the "Add to Cart" button wont work on the product page.
I am running version 1.5.2.2.r990. I have run the upgrade script after installing the latest patch.
I dont understand how it can stop working after i now have a domain again. I have changed the config file to the new URL.
I have it with www. without www. i have no style on the page, with no buttons etc so nothing works.

I believe i had this problem before after upgrading to 1.5.2.1 on the old host but cant remember how i fixed it.

Any help is much appreciated.

Thanks,
Alex
alexsmith2709
 
Posts: 23
Joined: Sat Jan 28, 2012 11:23 am

Re: Add to cart button not working after transferring domain

Postby JAY6390 » Sun May 20, 2012 6:46 am

This would occur if
1. there is a javascript issue (like a file referenced incorrectly causing jQuery not to load say). If you have firebug, that will tell you the issue
2. You're viewing your site on a non-www domain but your site is configured to use www (or vice versa)

Other than that, I can't think why it would not work
ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4894
Joined: Wed May 26, 2010 10:47 am
Location: United Kingdom

Re: Add to cart button not working after transferring domain

Postby alexsmith2709 » Sun May 20, 2012 8:13 am

I dont know how to use firebug to find out.
What files do i need to look in to see the jquery references? Is it the header.tpl in the theme?
in my header i still have references to fancybox as im still using that to display the larger images when clicked on the product page. That is the only difference, other than the stylesheet locations.

I have a www. domain and my config file using www.

If someone would like to see my site i'll post the URL.

thanks
alexsmith2709
 
Posts: 23
Joined: Sat Jan 28, 2012 11:23 am

Re: Add to cart button not working after transferring domain

Postby JAY6390 » Sun May 20, 2012 8:20 am

sure post the url
ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4894
Joined: Wed May 26, 2010 10:47 am
Location: United Kingdom

Re: Add to cart button not working after transferring domain

Postby alexsmith2709 » Sun May 20, 2012 8:23 am

[code]www.purpleandblackalternative.co.uk/shop/[code]
alexsmith2709
 
Posts: 23
Joined: Sat Jan 28, 2012 11:23 am

Re: Add to cart button not working after transferring domain

Postby JAY6390 » Sun May 20, 2012 8:32 am

By the looks of it you've updated/your theme is not the right version, and your url is posting to
Code: Select all
"NetworkError: 404 Not Found - http://www.purpleandblackalternative.co.uk/shop/index.php?route=checkout/cart/update"
where as your working category pages add to cart using the URL
Code: Select all
http://www.purpleandblackalternative.co.uk/shop/index.php?route=checkout/cart/add

So you need to sort the code in your product.tpl file to point to
checkout/cart/add
instead of
checkout/cart/update
ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4894
Joined: Wed May 26, 2010 10:47 am
Location: United Kingdom

Re: Add to cart button not working after transferring domain

Postby alexsmith2709 » Sun May 20, 2012 8:42 am

Thank you very much JAY6390.
Its now working. I had a feeling it would be something simple like that.
alexsmith2709
 
Posts: 23
Joined: Sat Jan 28, 2012 11:23 am

Re: Add to cart button not working after transferring domain

Postby JAY6390 » Sun May 20, 2012 8:48 am

Cool no problem :)
ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4894
Joined: Wed May 26, 2010 10:47 am
Location: United Kingdom

Re: Add to cart button not working after transferring domain

Postby ncodage » Sun May 27, 2012 10:20 pm

Hello,

I'm having the same problem and believe it might be the same kind of issue.
I installed Firebug and tried to troubleshoot without success.
Any help would be appreciated.

Martin
ncodage
 
Posts: 6
Joined: Thu May 24, 2012 9:24 am

Re: Add to cart button not working after transferring domain

Postby JAY6390 » Mon May 28, 2012 6:00 am

Hi Martin

Did you check the first two debugging questions I gave? Are you for example viewing your site on a non-www version yet your sites configured to have www ? (or vice versa)
ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4894
Joined: Wed May 26, 2010 10:47 am
Location: United Kingdom

Re: Add to cart button not working after transferring domain

Postby khantisari » Fri Jul 13, 2012 4:18 am

i have same issue

i have try to view on a non-www version and www version. it is same..

i have solved it....

for people who have same problem just edit url: 'index.php?route=checkout/cart/update', to url: 'index.php?route=checkout/cart/add', in catalog/view/theme/template/product
khantisari
 
Posts: 11
Joined: Fri Jul 13, 2012 4:16 am

Re: Add to cart button not working after transferring domain

Postby JAY6390 » Fri Jul 13, 2012 6:08 am

That will be a theme issue, as your theme won't be current for the opencart version
ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4894
Joined: Wed May 26, 2010 10:47 am
Location: United Kingdom


Return to General Support

Who is online

Users browsing this forum: captainchris1980, kieran99, pkn1001 and 76 guests

Hosted by Arvixe Web Hosting