X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add to Cart/Buy Now does't work properly in FF, works fine in IE (https://forum.x-cart.com/showthread.php?t=46616)

acidon 03-29-2009 01:58 PM

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!

littlered 04-01-2009 02:32 PM

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.

balinor 04-01-2009 03:06 PM

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.

gabriela 04-03-2009 07:52 AM

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

gabriela 04-03-2009 08:27 AM

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.

acidon 04-15-2009 10:35 AM

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 :)


All times are GMT -8. The time now is 07:24 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.