Jump to content

Added www to shop name, now cant add items to cart


fenixrob

Recommended Posts

In Prestashop 1.6.

 

Im having this problem, I had my shop name for quite some time now like this: planetpet.sk , shop name and ssl. But Im trying to redirect all non www traffic to www, I read a lot of tutorials, on how to do it. 

 

When I added this into the .htaccess, it crashed, internal server error: (I put it before the prestashop comment line)

 

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
</IfModule>

 

So I tried to redirect the traffic by changing the shop name in the BO from planetpet.sk to www.planetpet.sk. Every page works fine now, it gets redirected correctly, but when I try to add a item to cart it fails.

 

I get ajax popup asking me if I want to continue shopping or go to checkout , and when I click Go to checkout, my cart is empty.

 

Can somebody please help me solve this issue? 

 

 

another thing - when I had the www in my shop name, I tried to clear cache, disable/enable friendly URL, nothing helped. Pls help guys I just want my website to redirect non www to www, but I cant get it to work.

Link to comment
Share on other sites

Thank for your reply, I deleteted the code I added to htacces, so now there is just the www.shopname in BO, but it still doesnt work. The cart gets empty or I cant login as a customer, no error gets reported, the page just reloads and nothing happens. 

 

I think thats a problem witch some old cookies, because when I deleted cookies from my browser It worked. But I cant tell every customer to manualy delete browser cookies, I want to do it for every customer. I tried the clear smarty cache and force compile, and clear cache in the BO , but nothing helped.

Link to comment
Share on other sites

If problem is cookies o cache there is not more options, this info is stored in the customer computer (at least you enable force compile), anyway, if most of your visitors are new you will not have problem because doesn't exists cookies/cache yet.

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

Yes you´re right, when browsing through my browsers cookies, I found som old cookies that were generated by my shop without the www, and new cookies generated with www. The old cookies expire in two days and then I will test the website. If it works, I will mark this as solved.

 

So it seems I just have to wait, and I thought if I edit the frontend cookies to expire in e.g. 1 hour, that thay will solve the problem, but the problem was, that they didnt rewrite the old non-www generated cookies.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...