Empty Cart

1 year ago
Although we have selected pages should have a www prefix in the store settings, our visitors are still able to access www. and non www urls which is not problem. However when a visitor does this their basket empties.
Has anyone found this problem and is there a solution?
Thank you, James
1 year ago
Have you tried restarting the app, just so any possibilities of invalid caches may be discarded.

Regards,
Anshul
1 year ago
Which version of NOP are you running?
1 year ago
Hi there, We are running on v3.9 the only solution I can see it to add a redirect from non www to www URL in the web.config file.
Nopcommerce is seeing the two different URLs as different visitors and it storing the basket contents separately?
Many thanks, James
1 year ago
I tested it in one of my 3.9 stores and everything worked fine. Try this:

Set the prefix WWW prefix one way or the other.
Make sure the HOST Value on the store matches the way you set the Prefix.
Restart the application.

Keep in mind if your using Chrome to test, you'll most likely have to clear the browser cache and history. Chrome for whatever reason caches the URL path.

Also, if you want to post your website URL and I can see how it resolves on my side.

If you want to set a URL rewrite in your web.config as a secondary line of defense that's also not a bad idea.

Hope that helps
1 year ago
Hi there, Thank you for all the help, after creating a backup site it turned out to be some URL redirect code inserted inside the web.config file to redirect users from old URLs when we moved over to nopCommerce.
Thank you, James