Jump to content

Empty Cart in Google Chrome, Android Browser and Firefox


Recommended Posts

Hi,

 

I am currently installing the new 1.5 Prestashop, the upgrade from 1.1 failed, so I am now building the shop from zero to hero :)

 

As usual this is not easy while problems stop me from continuing the nice work. What I encounter at the moment is the cart. I cannot add more than one product in some browsers like Google Chrome or the Android Browser or Firefox.... and when I check the cart... it is empty.

 

I read about caching, wrong/incompatible modules... but I did not manage to make it work.

 

Please check out the problems on this test page: www.gilmobile.ro/new15

 

Thank You!

  • Like 2
Link to comment
Share on other sites

Hi,

 

first of all sorry for my english, i think that, in some cases, is a problem whith the cookies and the domain configuration (in SEO & URLs).

 

If you observe the cookies using the developer tools of chorme, for example, you can see cookies with two diferents domains with www and without www, so i tray to erase the www. in the domains in SEO & URLs. Now i have only one domian for the cookies and it seem to work without problems.

  • Like 2
Link to comment
Share on other sites

Hi,

 

first of all sorry for my english, i think that, in some cases, is a problem whith the cookies and the domain configuration (in SEO & URLs).

 

If you observe the cookies using the developer tools of chorme, for example, you can see cookies with two diferents domains with www and without www, so i tray to erase the www. in the domains in SEO & URLs. Now i have only one domian for the cookies and it seem to work without problems.

i try this method but didnt work for me.... makes page not found for all pages...
Link to comment
Share on other sites

Hello all, if you could, check your server error logs with your hosting provider and let me know what the result is. We can better assist you from there, knowing the error log. Thank you!

 

i forget that setting CCC and Smarty enable, after i force compile, then it works but there is another concern, when i type www.domain.com , then it becomes domain.com in browser URL, how to make it still become www.domain.com in the browser URL?

Link to comment
Share on other sites

Hello,

 

try turning off the friendly urls and then turning on again, it works for me. After that i added the next code into .htacces file to redirect to canonical url:

 

 

<IfModule mod_rewrite.c>

# URL rewriting module activation

RewriteEngine on

 

RewriteCond %{HTTP_HOST} ^www.domain.com$

RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]

 

</IfModule>

 

Change domain.com to your domain.

  • Like 1
Link to comment
Share on other sites

it just workaround, since when PS regenerate .htaccess then my additional code will erased, is someone know how to make it not erased? anyway there is another bug that i found because this thing, try open with android then you will find another bug ... any idea to fix android problem?

Link to comment
Share on other sites

rc-cheap - still not working...

I made a fresh new install, not many customisation changes... and after a week, trying to develop it, i encounter the same problems as here http://www.gilmobile.ro/new15, where in chrome, android or firefox, cart doesn't update and when accessing, it is empty... I tried deleting cookies... not working, now i will try vynx' sollution and let you know if it works. deleting www sends me to the 404 page...

Link to comment
Share on other sites

it just workaround, since when PS regenerate .htaccess then my additional code will erased, is someone know how to make it not erased? anyway there is another bug that i found because this thing, try open with android then you will find another bug ... any idea to fix android problem?

 

 

In .htaccess file you can see this:

 

 

 

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums


<IfModule mod_rewrite.c>
RewriteEngine on
....
....


# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

 

You have to write your added lines before the comments, like this:

 

<IfModule mod_rewrite.c>


RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

</IfModule>


# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums


<IfModule mod_rewrite.c>
RewriteEngine on
....
....


# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

Link to comment
Share on other sites

www.gilmobile.ro/new15

 

Hi Gil,

 

the mod_rewrite itself is working, i think about tuning .htaccess and prestashop.

 

my suggestion is try to disable one by one the module to check possibility module makes problem or not, disable cache, force compile, disable CCC for Javascript. dont forget to clear cache and cookie every time you try.

Link to comment
Share on other sites

Ciao vynx,

 

Modules enabled/disabled - did...

Fresh install - did...

Cache enable/disable - did...

Force compile - did...

disable CCC for Javascript - did...

cleared cookies/cache - did...

 

:)

 

.htaccess looks like this:

 

 

 

<IfModule mod_rewrite.c>

 

 

RewriteCond %{HTTP_HOST} ^gilmobile.ro

RewriteRule (.*) http://www.gilmobile.ro/$1 [R=301,L]

 

</IfModule>

 

 

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution

# http://www.prestashop.com - http://www.prestashop.com/forums

 

<IfModule mod_rewrite.c>

RewriteEngine on

 

RewriteRule ^api/?(.*)$ webservice/dispatcher.php?url=$1 [QSA,L]

 

# Images

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3$4.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$1$2$3.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$1$2$3$4.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-\.*]*)(-[0-9]+)?/.+\.jpg$ img/c/$1$2$3.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ img/c/$1$2.jpg [L]

 

# Dispatcher

RewriteCond %{REQUEST_FILENAME} -s [OR]

RewriteCond %{REQUEST_FILENAME} -l [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^.*$ - [NC,L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^.*$ index.php [NC,L]

</IfModule>

 

#If rewrite mod isn't enabled

ErrorDocument 404 /new15/index.php?controller=404

 

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

What else I could try? :|

Interesting is that this is not an isolated problem...

Link to comment
Share on other sites

Ciao vynx,

 

Modules enabled/disabled - did...

Fresh install - did...

Cache enable/disable - did...

Force compile - did...

disable CCC for Javascript - did...

cleared cookies/cache - did...

 

:)

 

.htaccess looks like this:

 

 

 

<IfModule mod_rewrite.c>

 

 

RewriteCond %{HTTP_HOST} ^gilmobile.ro

RewriteRule (.*) http://www.gilmobile.ro/$1 [R=301,L]

 

</IfModule>

 

 

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution

# http://www.prestashop.com - http://www.prestashop.com/forums

 

<IfModule mod_rewrite.c>

RewriteEngine on

 

RewriteRule ^api/?(.*)$ webservice/dispatcher.php?url=$1 [QSA,L]

 

# Images

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3$4.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ img/p/$1-$2$3.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$1$2$3.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$1$2$3$4.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-\.*]*)(-[0-9]+)?/.+\.jpg$ img/c/$1$2$3.jpg [L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ img/c/$1$2.jpg [L]

 

# Dispatcher

RewriteCond %{REQUEST_FILENAME} -s [OR]

RewriteCond %{REQUEST_FILENAME} -l [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^.*$ - [NC,L]

RewriteCond %{HTTP_HOST} ^www.gilmobile.ro$

RewriteRule ^.*$ index.php [NC,L]

</IfModule>

 

#If rewrite mod isn't enabled

ErrorDocument 404 /new15/index.php?controller=404

 

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

What else I could try? :|

Interesting is that this is not an isolated problem...

 

change hosting maybe?

i try 3 hosting ... each hosting have different configuration and result...

Link to comment
Share on other sites

Having another hosting is not a viable solution at the moment, while i am under a signed contract with my actual provider. Could it be that this problem is caused by the hosting? Shouldn't there be a backdoor to avoid this, while others encounter this problem also?

Edited by Gil Mobile Online (see edit history)
Link to comment
Share on other sites

Incredible... I did not do any changes today... and it works :| How is this possible.

Let's see for how long it lasts...

Does it work for others that encountered the same problem?

 

Something is weird. The old shop, that is functional at the moment, has some weird changes at the cart, but it works. Also, without doing some changes....

 

Or the changes are with delay?

Link to comment
Share on other sites

Thanx for your help, vynx. It doesn't work on the android 4 tablet. but on pc...it works. :|

Anybody else found a solution?

 

hi Gil,

 

so everything ok except android mobile?

 

maybe you can enable mobile theme for tablet ? i saw that option in PS1.5.1 ...

Link to comment
Share on other sites

I'm having the same issue in 1.5.1. Tried all recommended steps still no luck. Anybody have a solid lead on what is causing this yet? This sorta defeats the purpose of Prestashop entirely if you can't even sell product.

 

Hi,

 

which method that you already try?

Link to comment
Share on other sites

Hi everybody.

 

I switched on my android from mobile theme to classic view and it works... Still some issues regardig the display of the products in the mobile theme appeared. The products are not displayed in their categories, only on the promotions page...

 

At least, it works now. I have no clue about what could have been wrong. Maybe something with the cache/buffer memory...

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 3 weeks later...

Hi guys

 

I found a way to fix this issue.

After many hours of trace code I found that cookie is being overwrited when ajax cart is enabled.

This is the cause that the order was lost and cart appears empty and this is the explaination :

 

- Supose the first time you visit the shop, no cookies are on your browser yet.

- When you add a product using ajax cart ( using a ajax_add_to_cart_button class button ) you are using this piece of code :

 

		$('.ajax_add_to_cart_button').unbind('click').click(function(){
		var idProduct =  $(this).attr('rel').replace('ajax_id_product_', '');
		if ($(this).attr('disabled') != 'disabled')
			ajaxCart.add(idProduct, null, false, this);
		return false;
	});

 

So you call ajaxCart.add() when you add a product.

Inside ajaxCart.add() there are two significant actions that modify your cookie:

 

first one is expand the cartblock. Basically open the cart box and send an ajax petition to include 'expand' parameter into your cookie

 

	if ($('#cart_block #cart_block_list').hasClass('collapsed'))
		this.expand();

 

 

and inside expand() the expand action the visual box slidedown :

 

 

				$('#'+parentId+' #cart_block #cart_block_summary').slideUp(200, function(){
				$(this).addClass('collapsed').removeClass('expanded');
				$('#'+parentId+' #cart_block #cart_block_list').slideDown({
					duration: 600,
					complete: function(){$(this).addClass('expanded').removeClass('collapsed');}
				});
			});

 

and store cookie value :

				$.ajax({
				type: 'GET',
				url: baseDir + 'modules/blockcart/blockcart-set-collapse.php',
				async: true,
				data: 'ajax_blockcart_display=expand' + '&rand=' + new Date().getTime()
			});	

 

Second one, adds the product in your cart.

 

 

		$.ajax({
		type: 'POST',
		url: baseDir + 'cart.php',
		async: true,
		cache: false,
		dataType : "json",
		data: 'add=1&ajax=true&qty=' + ((quantity && quantity != null) ? quantity : '1') + '&id_product=' + idProduct + '&token=' + static_token + ( (parseInt(idCombination) && idCombination != null) ? '&ipa=' + parseInt(idCombination): ''),
		success: function(jsonData,textStatus,jqXHR)
		{
		....
		....			
		....

		});

 

Well, tracing the code using phpfire I could see that requests are sent in this order :

 

1.- blockcart-set-collapse.php

2.- cart.php

 

In cases that works fine I got the return of the request in same order, but when cart gets empty, I reicived cart.php firt and then blockcart-set-collapse.php

 

This means that blockcart-set-collapse.php is requested without id_cart cookie value, so return a cookie without id_cart.

So id_cart is generated in cart.php call, and blockcart-set-collapse.php returns the cookie after cart.php, so the id_cart is not preserved because is being overwritted.

 

 

There are few ways to fix this :

 

 

1.- At ajaxCart.add() disable this.expand() , avoid to made ajax call

2.- at ajaxCart.expand() put ajax request before slideDown() call

3.- The second point and made ajaxcall syncronious setting async : false

 

				$.ajax({
				type: 'GET',
				url: baseDir + 'modules/blockcart/blockcart-set-collapse.php',
				async: false,
				data: 'ajax_blockcart_display=expand' + '&rand=' + new Date().getTime()
			});	

 

 

Another way to fix this, is to have ever a id_cart at cookie.

I'm not sure but I think at previous prestashop ( 1.3.x) id_cart was stored at cookie in the first request.

At Prestashop 1.4.x cart is generated at FrontControllerCore::init() but not saved even asigned to the cookie.

Reviewing the code quickly, I see that the id_cart is asigned when a product is added to the cart.

So another solution could be to store a cart in cookies ever.

 

 

 

I hope this could help you to fix your shops !

 

 

PounStudio !

http://www.pounstudio.com

 

http://www.senin.org/2012/11/22/prestashop-fix-empty-cart-cookie-overwritted/

  • Like 2
Link to comment
Share on other sites

If you comment the cookie management lines ?

This is only visual confort isn't it?

 

What would be the result ?

 

//
//$.ajax({
//									   type: 'GET',
//										url: baseDir + 'modules/blockcart//blockcart-set-collapse.php',
//										async: false,
//									   data: 'ajax_blockcart_display=expand' + //'&rand=' + new Date().getTime()
//								});	

Edited by LeGastronome (see edit history)
Link to comment
Share on other sites

For those that need it

 

 

expand : function(){

       $(['left_column', 'right_column' ]).each(function(id, parentId)
       {
           if ($('#'+parentId+' #cart_block #cart_block_list').hasClass('collapsed'))
           {


               // avoid cookie overwrite with cart.php query
               // save the expand statut in the user cookie
               $.ajax({
                   type: 'GET',
                   url: baseDir + 'modules/blockcart/blockcart-set-collapse.php',
                   async: false,
                   data: 'ajax_blockcart_display=expand' + '&rand=' + new Date().getTime()
               });            



               $('#'+parentId+' #cart_block #cart_block_summary').slideUp(200, function(){
                   $(this).addClass('collapsed').removeClass('expanded');
                   $('#'+parentId+' #cart_block #cart_block_list').slideDown({
                       duration: 600,
                       complete: function(){$(this).addClass('expanded').removeClass('collapsed');}
                   });
               });
               // toogle the button expand/collapse button
               $('#'+parentId+' #cart_block h4 span#block_cart_expand').fadeOut('slow', function(){
                   $('#'+parentId+' #cart_block h4 span#block_cart_collapse').fadeIn('fast');
               });


           }
       });
   },

Link to comment
Share on other sites

Hello all,

 

There are a lot of posts about empty carts or login issues in the forum for PrestaShop 1.5, we finally understand how to reproduce the issue and how to fix it.

 

- http://www.prestasho...ser-and-firefox

- http://www.prestasho...prestashop-151/

- http://www.prestasho...5x-panier-vide/

etc...

 

Our development team has explained the solution in our forge (http://forge.prestas...owse/PSCFV-5698)

 

"Hi everyone,

 

We finally understand how to reproduce this issue.

That happening only when you access to your shop with the an url which is different of your shop domain configured in your BackOffice, eg : you configure www.domain.com in your backoffice and you try to access to domain.com in your front-office.

 

The fix of this issue is available here : https://github.com/P...2c2826fe701c916

You need to delete the three lines below in your file classes/shop/Shop.php

 

// Optimization - don't redirect and allow WS and other script to work

if (!$id_shop)

$id_shop = Configuration::get('PS_SHOP_DEFAULT');

 

(and of course clear your browser cookies a last time )"

 

Please let me know if this solution works for you.

 

Regards,

 

Benjamin

  • Like 1
Link to comment
Share on other sites

Hi Massiveoverkill.

 

I recomend you to made a check:

 

1.- Disable ajax from blockcart , buying a product is cart empty ?

2.- Check at backend your url domain name config. How is configured ? what url are your using to surf your store ?. Try to buy using the same domain name as you had configured.

 

My fix:

http://www.senin.org...ie-overwritted/

 

PounStudio !

http://www.pounstudio.com

Link to comment
Share on other sites

Hi Massiveoverkill. I recomend you to made a check: 1.- Disable ajax from blockcart , buying a product is cart empty ? 2.- Check at backend your url domain name config. How is configured ? what url are your using to surf your store ?. Try to buy using the same domain name as you had configured. My fix: http://www.senin.org...ie-overwritted/ PounStudio ! http://www.pounstudio.com

 

I disabled Ajax and was using the actual URL and it didn't fix the problem, but your mention of this actually set a light bulb off in my troubleshooting my performance issues from yesterday. My shop was www.massiverc.com/Prestashop which was bad for DNS, so I created multiple subdomains www.rc.massiverc.com, www,quad.massiverc.com, www.shop.massiverc.com, and www.store.massiverc.com which all point back to the original URL and the store loads a bit quicker now.

Link to comment
Share on other sites

I've reported this problem a few days ago and they've solved the problem really fast, see here (for me this solution works fine):

 

"Hi everyone,

 

We finally understand how to reproduce this issue.

That happening only when you access to your shop with the an url which is different of your shop domain configured in your BackOffice, eg : you configure www.domain.com in your backoffice and you try to access to domain.com in your front-office.

 

The fix of this issue is available here : https://github.com/P...2c2826fe701c916

You need to delete the three lines below in your file classes/shop/Shop.php

 

// Optimization - don't redirect and allow WS and other script to work

if (!$id_shop)

$id_shop = Configuration::get('PS_SHOP_DEFAULT');

 

(and of course clear your browser cookies a last time )"

Link to comment
Share on other sites

Hello all,

 

There are a lot of posts about empty carts or login issues in the forum for PrestaShop 1.5, we finally understand how to reproduce the issue and how to fix it.

 

- http://www.prestasho...ser-and-firefox

- http://www.prestasho...prestashop-151/

- http://www.prestasho...5x-panier-vide/

etc...

 

Our development team has explained the solution in our forge (http://forge.prestas...owse/PSCFV-5698)

 

"Hi everyone,

 

We finally understand how to reproduce this issue.

That happening only when you access to your shop with the an url which is different of your shop domain configured in your BackOffice, eg : you configure www.domain.com in your backoffice and you try to access to domain.com in your front-office.

 

The fix of this issue is available here : https://github.com/P...2c2826fe701c916

You need to delete the three lines below in your file classes/shop/Shop.php

 

// Optimization - don't redirect and allow WS and other script to work

if (!$id_shop)

$id_shop = Configuration::get('PS_SHOP_DEFAULT');

 

(and of course clear your browser cookies a last time )"

 

Please let me know if this solution works for you.

 

Regards,

 

Benjamin

 

This fix works for me. I've been beating you all up lately for a lot of issues but this makes up a little. Good work!!

 

BTW I commented out the line vs deleting it.

 

Also, what does Ajax for Cart do?

Edited by massiveoverkill (see edit history)
  • Like 1
Link to comment
Share on other sites

Hello massiveoverkill, I am happy that it worked for you! I do not know what you mean "what does ajax for cart do?"

 

hi jsenin, sorry I was posting this because it is in the 1.5 forum.

 

In Cart Block module: Activate AJAX mode for cart (compatible with the default theme)

Link to comment
Share on other sites

  • 3 months later...
  • 2 years later...
×
×
  • Create New...