Jump to content
Gil Mobile Online

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

Share this post


Link to post
Share on other sites

Gil Mobile,

 

I do not have not problems.

Firefox 1.5.01, Chrome, Ubuntu

 

Try empy your cache while you are with your browser not on the site of your shop (ga to another site).

Share this post


Link to post
Share on other sites

I am having the same problems, when I add a product it disapears after a refesh. Also I can create an account but not login. Fresh installation of Prestashop 1.5.

Share this post


Link to post
Share on other sites

I had exactly the same problem following a 1.5 reinstall.

 

Clear your browser cache.

But more important is that you delete cookies for the site in question.

This will solve the problem.

Share this post


Link to post
Share on other sites

Exactly same problem for me with fresh 1.5.

But i see : gilmobile.ro/new15 work fine now

Share this post


Link to post
Share on other sites

Hi rc-cheap...I checked gilmobile.ro/new15 and it is not working. Products can be added, but the cart says empty when its contents are viewed.

Share this post


Link to post
Share on other sites

Same problem here...

 

Costumers can't buy because of this... I think they won't want to delete cookies when they want to buy :s

 

Has anyone found the solution?

 

I have also a problem with the zoom in on products images :s

 

PS 1.5.0.17

 

Thank you!

  • Like 1

Share this post


Link to post
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 3

Share this post


Link to post
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...

Share this post


Link to post
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!

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

i try also cannot login to IE, any workaround?

Share this post


Link to post
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...

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Is there a way to check if URL rewrite is enabled?

 

may i know what is your shop URL?

Share this post


Link to post
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.

Share this post


Link to post
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...

Share this post


Link to post
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...

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

if your base : www.gilmobile.ro/new15

 

then i think rewritebase is /new15/ or /new15

Share this post


Link to post
Share on other sites

Sorry, I think, I do not understand quite well. Where do I find the Rewritebase? In .htaccess ?

 

actually there is setting in the BO, but you can change in the .htaccess directly

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Then do you dont find a solution??

 

we have one update stopped with this problem... and we keep working in 1.4.x yet..

 

We are tired about try and try and dont find a solution..

Edited by pablopg3 (see edit history)

Share this post


Link to post
Share on other sites

i agree with weird word, since i have another problems then suddenly its fix by themself without something to do, regarding android tab, you can try to disable CCC for javascript, and force compile, its work for me.

Share this post


Link to post
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.

Share this post


Link to post
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 ...

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

hi Gil,

 

so everything ok except android mobile?

 

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

 

enable mobile theme doesnt work on android phone. in my case

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

It's the cookies. When cookies expire. it work

So find cookies in your browser, remove those related with your domain.

and it will work.

Share this post


Link to post
Share on other sites

always this cookie problem with a fresh install on debian + virtualmin.

 

Do you have ideas ?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thanks Jsenin for this very well documented investigation.

 

Did you try to implement one of the proposed solution and test it ?

 

If so, could you please indicate the exact code change to do ?

 

Thanks

Thierry

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

Hi

 

sorry tool is firephp ( http://www.firephp.org/ )

 

And yes, I had implemented it on a shop, and work fine after deleteing smarty compiled files and clearing cache on browser to be sure that modified ajax-cart.js is being loaded.

 

The only incovenient is that you don't preserve if the cart box is expanded or not at next requests.

Share this post


Link to post
Share on other sites

In my shop cart should be always collapsed, expanded only when the product image fly into... so that's fine.

 

I add a jquery to force collapse on loading

Share this post


Link to post
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');
               });


           }
       });
   },

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

This fix did not fix my problem totally, when this is enabled i get many errors, with the Shop.php. Also my translations don't seem to get through, can this be fixed?

Share this post


Link to post
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 )"

Share this post


Link to post
Share on other sites

When you enable what ?

Please explain steps you did .

 

This fix did not fix my problem totally, when this is enabled i get many errors, with the Shop.php. Also my translations don't seem to get through, can this be fixed?

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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)

Share this post


Link to post
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.

 

Sorry, It's my fault

Share this post


Link to post
Share on other sites

Hi all,

 

just in case... I run into this sort of problem when I enable multistore and copy template... Problem was on CHMOD that new template folder. So try also check your rights. ;) 

Share this post


Link to post
Share on other sites

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More