Gil Mobile Online Posted September 21, 2012 Share Posted September 21, 2012 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! 2 Link to comment Share on other sites More sharing options...
Telesight Posted September 21, 2012 Share Posted September 21, 2012 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). Link to comment Share on other sites More sharing options...
Gil Mobile Online Posted September 21, 2012 Author Share Posted September 21, 2012 (edited) thank you! i will try this. i tried... same... Edited September 21, 2012 by Gil Mobile (see edit history) 1 Link to comment Share on other sites More sharing options...
Gil Mobile Online Posted September 21, 2012 Author Share Posted September 21, 2012 login also fails to work :| 1 Link to comment Share on other sites More sharing options...
rjgout Posted September 21, 2012 Share Posted September 21, 2012 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. Link to comment Share on other sites More sharing options...
citrusuk Posted September 21, 2012 Share Posted September 21, 2012 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. Link to comment Share on other sites More sharing options...
rjgout Posted September 22, 2012 Share Posted September 22, 2012 I have this problem on iOS, osx and windows. All using multiple browsers. Link to comment Share on other sites More sharing options...
rjgout Posted September 22, 2012 Share Posted September 22, 2012 Fixed it! Deleted all the files except index.php in: cache/smarty/compile 1 Link to comment Share on other sites More sharing options...
Gil Mobile Online Posted September 25, 2012 Author Share Posted September 25, 2012 nobody else encountered this errors? :| Link to comment Share on other sites More sharing options...
rc-cheap Posted October 1, 2012 Share Posted October 1, 2012 Exactly same problem for me with fresh 1.5. But i see : gilmobile.ro/new15 work fine now Link to comment Share on other sites More sharing options...
shunkashuto1996 Posted October 3, 2012 Share Posted October 3, 2012 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. Link to comment Share on other sites More sharing options...
LuisEmanuel Posted October 4, 2012 Share Posted October 4, 2012 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! 1 Link to comment Share on other sites More sharing options...
Wuisma Posted October 4, 2012 Share Posted October 4, 2012 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. 2 Link to comment Share on other sites More sharing options...
vynx Posted October 4, 2012 Share Posted October 4, 2012 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 More sharing options...
benjamin utterback Posted October 4, 2012 Share Posted October 4, 2012 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! Link to comment Share on other sites More sharing options...
vynx Posted October 4, 2012 Share Posted October 4, 2012 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 More sharing options...
benjamin utterback Posted October 4, 2012 Share Posted October 4, 2012 Hello vynx, please see the other thread in which you asked the same question. However, not having the www should not be a problem for your SEO. Link to comment Share on other sites More sharing options...
Wuisma Posted October 4, 2012 Share Posted October 4, 2012 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. 1 Link to comment Share on other sites More sharing options...
vynx Posted October 5, 2012 Share Posted October 5, 2012 i do with : RewriteCond %{HTTP_HOST} ^domain.com RewriteRule (.*) http://www.domain.com/$1 [R=301,L] Link to comment Share on other sites More sharing options...
vynx Posted October 7, 2012 Share Posted October 7, 2012 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 More sharing options...
a21989 Posted October 8, 2012 Share Posted October 8, 2012 (edited) i do with : RewriteCond %{HTTP_HOST} ^domain.com RewriteRule (.*) http://www.domain.com/$1 [R=301,L] this works for me except signingup in IE7, firefox. bUT all features work in chrome. weird Edited October 8, 2012 by a21989 (see edit history) Link to comment Share on other sites More sharing options...
vynx Posted October 8, 2012 Share Posted October 8, 2012 i try also cannot login to IE, any workaround? Link to comment Share on other sites More sharing options...
Gil Mobile Online Posted October 8, 2012 Author Share Posted October 8, 2012 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 More sharing options...
Gil Mobile Online Posted October 8, 2012 Author Share Posted October 8, 2012 Interesting, on some peoples browsers, it works, on some (mine included) does't work... Link to comment Share on other sites More sharing options...
Wuisma Posted October 9, 2012 Share Posted October 9, 2012 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 More sharing options...
Gil Mobile Online Posted October 9, 2012 Author Share Posted October 9, 2012 The same Made the changes, but no improvement... Link to comment Share on other sites More sharing options...
Gil Mobile Online Posted October 9, 2012 Author Share Posted October 9, 2012 Is there a way to check if URL rewrite is enabled? Link to comment Share on other sites More sharing options...
vynx Posted October 9, 2012 Share Posted October 9, 2012 Is there a way to check if URL rewrite is enabled? may i know what is your shop URL? Link to comment Share on other sites More sharing options...
Gil Mobile Online Posted October 9, 2012 Author Share Posted October 9, 2012 www.gilmobile.ro/new15 Link to comment Share on other sites More sharing options...
vynx Posted October 9, 2012 Share Posted October 9, 2012 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 More sharing options...
Gil Mobile Online Posted October 9, 2012 Author Share Posted October 9, 2012 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 More sharing options...
vynx Posted October 9, 2012 Share Posted October 9, 2012 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 More sharing options...
Gil Mobile Online Posted October 10, 2012 Author Share Posted October 10, 2012 (edited) 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 October 10, 2012 by Gil Mobile Online (see edit history) Link to comment Share on other sites More sharing options...
vynx Posted October 10, 2012 Share Posted October 10, 2012 if your base : www.gilmobile.ro/new15 then i think rewritebase is /new15/ or /new15 Link to comment Share on other sites More sharing options...
Gil Mobile Online Posted October 10, 2012 Author Share Posted October 10, 2012 Sorry, I think, I do not understand quite well. Where do I find the Rewritebase? In .htaccess ? Link to comment Share on other sites More sharing options...
vynx Posted October 10, 2012 Share Posted October 10, 2012 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 Link to comment Share on other sites More sharing options...
Gil Mobile Online Posted October 10, 2012 Author Share Posted October 10, 2012 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 More sharing options...
Gil Mobile Online Posted October 10, 2012 Author Share Posted October 10, 2012 So... It is working in chrome, firefox on my PC, but not on my android tablet.... The problem remains Link to comment Share on other sites More sharing options...
Gil Mobile Online Posted October 10, 2012 Author Share Posted October 10, 2012 My BO settings are in the picture below: Link to comment Share on other sites More sharing options...
pablopg3 Posted October 10, 2012 Share Posted October 10, 2012 (edited) 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 October 10, 2012 by pablopg3 (see edit history) Link to comment Share on other sites More sharing options...
vynx Posted October 10, 2012 Share Posted October 10, 2012 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. Link to comment Share on other sites More sharing options...
Gil Mobile Online Posted October 10, 2012 Author Share Posted October 10, 2012 (edited) Thanx for your help, vynx. It doesn't work on the android 4 tablet. but on pc...it works. :| Anybody else found a solution? Edited October 10, 2012 by Gil Mobile Online (see edit history) Link to comment Share on other sites More sharing options...
Alecrein Posted October 10, 2012 Share Posted October 10, 2012 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. Link to comment Share on other sites More sharing options...
vynx Posted October 10, 2012 Share Posted October 10, 2012 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 More sharing options...
Gil Mobile Online Posted October 11, 2012 Author Share Posted October 11, 2012 Thanks again, vynx. I will try this today. Already set up the settings for mobile on tablet. Just have to reach the tablet Link to comment Share on other sites More sharing options...
vynx Posted October 11, 2012 Share Posted October 11, 2012 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 More sharing options...
a21989 Posted October 11, 2012 Share Posted October 11, 2012 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 Link to comment Share on other sites More sharing options...
Gil Mobile Online Posted October 15, 2012 Author Share Posted October 15, 2012 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 More sharing options...
yapliren Posted October 24, 2012 Share Posted October 24, 2012 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. Link to comment Share on other sites More sharing options...
Gil Mobile Online Posted October 24, 2012 Author Share Posted October 24, 2012 Hi yapliren, Shouldn't it work anyway? Thank's Link to comment Share on other sites More sharing options...
rc-cheap Posted November 5, 2012 Share Posted November 5, 2012 always this cookie problem with a fresh install on debian + virtualmin. Do you have ideas ? Link to comment Share on other sites More sharing options...
petarlp Posted November 20, 2012 Share Posted November 20, 2012 I have the same problem. Can you help me? Link to comment Share on other sites More sharing options...
jsenin Posted November 22, 2012 Share Posted November 22, 2012 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/ 2 Link to comment Share on other sites More sharing options...
Thierry78125 Posted November 22, 2012 Share Posted November 22, 2012 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 Link to comment Share on other sites More sharing options...
LeGastronome Posted November 22, 2012 Share Posted November 22, 2012 (edited) PHPFire ? Got it FirePHP :-) Edited November 22, 2012 by LeGastronome (see edit history) Link to comment Share on other sites More sharing options...
LeGastronome Posted November 22, 2012 Share Posted November 22, 2012 (edited) 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 November 22, 2012 by LeGastronome (see edit history) Link to comment Share on other sites More sharing options...
jsenin Posted November 22, 2012 Share Posted November 22, 2012 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. Link to comment Share on other sites More sharing options...
LeGastronome Posted November 22, 2012 Share Posted November 22, 2012 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 Link to comment Share on other sites More sharing options...
jsenin Posted November 22, 2012 Share Posted November 22, 2012 And this 'trick' works ? Link to comment Share on other sites More sharing options...
jsenin Posted November 27, 2012 Share Posted November 27, 2012 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 More sharing options...
benjamin utterback Posted November 27, 2012 Share Posted November 27, 2012 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 1 Link to comment Share on other sites More sharing options...
jsenin Posted November 27, 2012 Share Posted November 27, 2012 (edited) Hi Benjamin I think that are two different issues my issue is related to 1.4.x version My fix: http://www.senin.org...ie-overwritted/ PounStudio ! http://www.pounstudio.com Edited November 27, 2012 by jsenin (see edit history) Link to comment Share on other sites More sharing options...
MassiveRC Posted November 28, 2012 Share Posted November 28, 2012 Anyone get this to work? I'm done being a Guinea pig. Link to comment Share on other sites More sharing options...
jsenin Posted November 28, 2012 Share Posted November 28, 2012 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 More sharing options...
MassiveRC Posted November 28, 2012 Share Posted November 28, 2012 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 More sharing options...
jsenin Posted November 28, 2012 Share Posted November 28, 2012 Then check your cookies , this sounds like domain related bug. Bejamin wrote yesterday about the bugthis at http://www.prestashop.com/forums/index.php?/topic/189453-empty-cart-in-google-chrome-android-browser-and-firefox/page__view__findpost__p__1020835 Sounds like cookie is being crossing domain names Link to comment Share on other sites More sharing options...
KamranMK Posted November 28, 2012 Share Posted November 28, 2012 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? Link to comment Share on other sites More sharing options...
samuel-t Posted November 28, 2012 Share Posted November 28, 2012 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 More sharing options...
jsenin Posted November 28, 2012 Share Posted November 28, 2012 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? Link to comment Share on other sites More sharing options...
MassiveRC Posted November 28, 2012 Share Posted November 28, 2012 (edited) 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 November 28, 2012 by massiveoverkill (see edit history) 1 Link to comment Share on other sites More sharing options...
benjamin utterback Posted November 28, 2012 Share Posted November 28, 2012 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. Link to comment Share on other sites More sharing options...
MassiveRC Posted November 28, 2012 Share Posted November 28, 2012 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 More sharing options...
forwardtrends Posted November 28, 2012 Share Posted November 28, 2012 (edited) This worked for us in Chrome Edited November 28, 2012 by forwardtrends (see edit history) Link to comment Share on other sites More sharing options...
jsenin Posted November 28, 2012 Share Posted November 28, 2012 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 Link to comment Share on other sites More sharing options...
robbie007 Posted March 15, 2013 Share Posted March 15, 2013 This solved the problem, see link http://rundmp.blogspot.nl/2013/01/empty-cart-prestashop-bug-in-google.html Has to do with the www. prefix Link to comment Share on other sites More sharing options...
PilgrimX Posted December 31, 2015 Share Posted December 31, 2015 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. Link to comment Share on other sites More sharing options...
Recommended Posts