Announcement

Collapse
No announcement yet.

Cart losing contents

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Cart losing contents

    I need some help with pgsports.co.uk. The shopping cart contents disappear when the page redirects back to products. I've checked nothing has changed on the server and tried a site refresh. Does anyone have any ideas please?

    I'm able to replicate the problem in/on all browsers/platforms.

    #2
    This normally happens when you’re mixing urls with and without www.

    if this is the problem then it’s usually easily fixed in the htaccess file and is important, particularly if you’re using SSL.
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

    -----------------------------------------

    Comment


      #3
      Thanks Mike

      I've already set the site to use the https://www. version of the URL via htaccess so not too sure what's going on!

      I've tried rewriting htaccess just in case there was an error though.

      Here's what I have so far. Any suggestions very welcome!

      //Rewrite to www
      Options +FollowSymLinks
      RewriteEngine on
      RewriteCond %{HTTP_HOST} ^pgsports.co.uk[nc]
      RewriteRule ^(.*)$ https://www.pgsports.co.uk/$1 [r=301,nc]

      <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %{SERVER_PORT} !^443$
      RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
      </IfModule>

      Comment


        #4
        Sorry, I can't debug other peoples htaccess files. They're something I only work with occasionally so it's just not something I can do easily.

        This is the problem you're having though. If you go to pgsports.co.uk then you get redirected to https://pgsports.co.uk (ie without the www.) but the cart and cookie are sitting on https://www.pgsports.co.uk

        Mike
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

        -----------------------------------------

        Comment


          #5
          For info I solved this... it was caused by the cookie control code I was using. Swapped to another one and the cart started working again

          Comment


            #6
            Glad to hear it's fixed.

            Whatever you did, going to the site without www. now gets redirected to the www. url which it didn't do before.

            -----------------------------------------

            First Tackle - Fly Fishing and Game Angling

            -----------------------------------------

            Comment

            Working...
            X