Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Add to Cart/Buy Now does't work properly in FF, works fine in IE

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-29-2009, 01:58 PM
  acidon's Avatar 
acidon acidon is offline
 

Senior Member
  
Join Date: Feb 2008
Posts: 139
 

Question Add to Cart/Buy Now does't work properly in FF, works fine in IE

I am in the middle of creating a new site from scratch.

One time I accidently opened it in Firefox ( I usually use IE) and noticed that add to cart / buy now button doesn't work for neither one of my products, yet it works perfectly in IE. When i click the "Add to Cart" button in Firefox, it just brings me to an empty shopping cart page.

I dont have any mods installed yet.

I did changed 1 or 2 things in product.tpl before, so I figured simple restoring of that template will fix the problem. Unfortunatelly it did not... Same exact thing happens with original template as well. As for products.tpl, that i never modified before at all.

I also noticed that if I generate HTML links for any of the poducts I have, those work just fine in FF and get the product added to cart.

I would appretiate any help, please!
__________________
Version 4.7.6 X-cart Gold
Reply With Quote
  #2  
Old 04-01-2009, 02:32 PM
 
littlered littlered is offline
 

Newbie
  
Join Date: Apr 2008
Posts: 8
 

Default Re: Add to Cart/Buy Now does't work properly in FF, works fine in IE

misery loves company. i'm noticing the same thing - it didn't used to be the case, this is an x-cart gold 4.1 we started late last year and finally set live today and i'm at a loss as to why this is happening.
__________________
Version 4.1.9
Reply With Quote
  #3  
Old 04-01-2009, 03:06 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Add to Cart/Buy Now does't work properly in FF, works fine in IE

Are you seeing any javascript errors when you click on it? Look in the errors reporting area.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 04-03-2009, 07:52 AM
 
gabriela gabriela is offline
 

Member
  
Join Date: Sep 2003
Posts: 22
 

Default Re: Add to Cart/Buy Now does't work properly in FF, works fine in IE

One of our clients just discovered the very same issue - x-cart version 4.1.11. Products can be added to cart in IE but not in Firefox and I don't see any errors.

It's very strange because this a cart we updated in January 2009 and didn't touch since then.
After upgrade everything was working ( we use Firefox as main browser).

Does anyone have any suggestion?

Thanks,
Gabriela
__________________
x-cart gold 3.4.14/3.5.14/4.018
Reply With Quote
  #5  
Old 04-03-2009, 08:27 AM
 
gabriela gabriela is offline
 

Member
  
Join Date: Sep 2003
Posts: 22
 

Default Re: Add to Cart/Buy Now does't work properly in FF, works fine in IE

There seems to be something related to www vs. non www. I forced everything to www and it works now.
__________________
x-cart gold 3.4.14/3.5.14/4.018
Reply With Quote

The following user thanks gabriela for this useful post:
acidon (04-15-2009)
  #6  
Old 04-15-2009, 10:35 AM
  acidon's Avatar 
acidon acidon is offline
 

Senior Member
  
Join Date: Feb 2008
Posts: 139
 

Cool Re: Add to Cart/Buy Now does't work properly in FF, works fine in IE

Ok I got it fixed by x-cart team, heres the solution:

"I've inspected the issue and found out it can be replicated not only under FF but in Opera and IE as well and the following circumstances:

If you try to add something into cart when the URL of your site is the following
http://www.yoursite.com/ - everything is OK.
But wheny you try to add something into cart when the URL of the site is the following
http://yoursite.com/ - the problem appears.

I've thoroughly investigated the issue and this seems to be a bug of the X-Cart. In order to solve it I've adjuested the following file <xcart_dir>/include/sessions.php and the problem has gone away.

Here is an instruction on how to do it in the future:

1) Please, open the <x-cart dir>/include/sessions.php and find the following section:
Code:
x_session_register("_saved_session_fg", x_session_get_fg()); $_saved_session_fg = x_session_get_fg();func_setcookie($XCART_SESSION_NAME, $XCARTSESSID, 0, "/", $xcart_https_host, 0);func_setcookie($XCART_SESSION_NAME, $XCARTSESSID, 0, "/", $xcart_http_host, 0);

add after it the following:

Code:
func_setcookie($XCART_SESSION_NAME, $XCARTSESSID, 0, "/", "", 0);

2) Find the section:


Code:
$XCART_SESSION_EXPIRY = $expiry_time; $XCARTSESSID = $sessid; func_setcookie($XCART_SESSION_NAME, $XCARTSESSID, 0, "/", $xcart_https_host, 0); func_setcookie($XCART_SESSION_NAME, $XCARTSESSID, 0, "/", $xcart_http_host, 0);
add after it the following:

Code:
func_setcookie($XCART_SESSION_NAME, $XCARTSESSID, 0, "/", "", 0);


Hope this info will help to everyone who has the problem
__________________
Version 4.7.6 X-cart Gold
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:02 PM.

   

 
X-Cart forums © 2001-2020