Announcement

Collapse
No announcement yet.

Cart/cookie expiry

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

    Cart/cookie expiry

    Hi,

    The snippet of Javascript that prints the cart total and value to customers...

    <script language="JavaScript">
    <!--
    document.write("Items&#58;&nbsp;" + getCartItem(3)+"&nbsp;");
    document.write("Value&#58;&nbsp;" + getCartItem(1));
    // -->
    </script>

    is giving me a headache. Although I have cookie expiry set to 3 hours, this information does not update for days - and only clears itself if you run something through a script, ie. go to view basket.

    It's also showing details of a logged in user's basket if you log in and log out of the member account - only returning to the basket corrects this.

    Ideas?

    #2
    Hi there

    Who is your hosting company? I have seen this issue on Plus net and demon? Please can you advise

    Kind Regards
    Nadeem Rasool
    SellerDeck Development

    Comment


      #3
      Hi Nadeem,

      The hosting is provided by 1&1, but I've also seen this happen on different Actinic installations, one of which was hosted by unitedhosting.

      I can't see anything in my internet/browser settings which would cause this.

      Thanks,

      DB

      Comment


        #4
        Hi there

        Please could you provide us with your url? Just to test this out

        Kind Regards
        Nadeem Rasool
        SellerDeck Development

        Comment


          #5
          I'm having a similar problem, also on a Demon server. In my case however, Items: and Value: both read "0" on the HTML pages but work fine on the View Cart and Checkout pages - the difference being that these are created via perl scripts of course.

          Seetha at Actinic tech support has installed the shop on your test server, where it works perfectly, but on Demon's server it's broken. I'm posting here in the hope that somebody else might recognise the problem! The url is http://www.rexquote.co.uk/acatalog/index.html

          Steve Balcombe

          Comment


            #6
            Re Demon. This is in the Knowledge base. here's a copy:-

            This occurs because Demon Internet hosts the CGI directory on a different server from the site. As a result the Cookie is saved for the domain of the CGI server but the JavaScript running in the browser is attempting to read the Cookie for the site server domain.

            To resolve this problem the Perl Script Actinic.pm needs to be modified to write the domain name as a parameter when saving the Cookie.

            - Locate the file Actinic.pm in the site folder.
            - Edit the file using a text editor such as Notepad.
            - Search for…

            Print cart cookies

            - A few lines after this line you should see…

            print "Set-Cookie: " . $sCartCookie . # set the cookie
            "; EXPIRES=" . $sCartExpiry .
            "; PATH=/;\r\n";

            - Replace the line…

            "; PATH=/;\r\n";

            - with…

            "; PATH=/; domain=<server_address>;\r\n";

            - Replace <server_address> with the site server address e.g.

            "; PATH=/; domain=www.actinic.com;\r\n";

            - Save the file and exit.
            - Update the site.

            Actinic is not able to provide any detailed support for script changes made. If you find that there is a problem, an original copy of the script can be found within the 'Original' folder in your installation. Copy this into your site folder.
            Norman
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Sir, you are a scholar and I'm willing to bet you are a gentleman too :-)

              I'd searched for everything apart from the one word which turns up the answer - "Demon"

              We do have one more small problem, and I'd kind of hoped it would fix itself when we found the cause of the more important issue above, but it doesn't. It's simply this: the shop is intended to run in a frame (i.e. not the address I gave above) but this results in a javascript permission denied error on the view cart and checkout pages. The full text of the error (Mozilla version) is:

              "Error: uncaught exception: Permission denied to get property Window.name"

              The error doesn't occur if the shop is run outside the frameset.

              Is this a similar kind of problem? - i.e. the perl script is running from cgi.www.rexquote.co.uk so it can't get a Window.name at www.rexquote.co.uk/... ?

              You can see the error by using the address http://www.rexquote.co.uk/shop and clicking the View Cart button.

              Steve B.

              Comment


                #8
                Can't help there I'm afraid. I won't have anything to do with frames.

                Norman
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  Ok, thanks anyway. Frames are a nightmare I know, and no doubt we'll get rid of them when the site gets a proper update. But until then...

                  Steve B.

                  Comment


                    #10
                    Originally posted by Nadeem
                    Please could you provide us with your url? Just to test this out
                    Belatedly, here it is:

                    http://www.nhmeuro.net/

                    This site is still in design mode, so excuse any irregularities, broken bits, compliance issues or general ugliness you may encounter.

                    The problem only really occurs when an item is added to the basket and then left beyond the cart expiry time (set to 1 hour for now). So, put something in the basket and return a while later. The cart should be cleared but this will only show on the Cart/Value notice when the user has been fed through the cart script.

                    DB

                    Comment


                      #11
                      Hi there

                      The cart should be cleared but this will only show on the Cart/Value notice when the user has been fed through the cart script.
                      I would not have thought so, if i were to go back to the site, my browser would have cache parts of your site including cookie information. It only when i click on another add to cart or checkout, so i am running a script, will actinic try to interrogates the session file, find it not there, then generate a new one.

                      Kind Regards
                      Nadeem Rasool
                      SellerDeck Development

                      Comment


                        #12
                        Hi Nadeem,

                        That's true, yes... however, showing cached cart details across the whole site until something is run through a script is not desirable. It doesn't inspire confidence in the customer if a basket they created four days earlier is still knocking about on some pages, but not in the basket itself.

                        Surely the snippet of Javascript should interact more with Actinic, so that it calls for that new session file whenever the cookie has expired.

                        The problem is expanded on computers with shared access. Although unlikely to be an issue in this case, for other sites there could be problems with customers being able to see cart values for other customers. If cookies are set to expire after 1 hour, they should do so sitewide.

                        DB

                        Comment


                          #13
                          That's true, yes... however, showing cached cart details across the whole site until something is run through a script is not desirable. It doesn't inspire confidence in the customer if a basket they created four days earlier is still knocking about on some pages, but not in the basket itself.

                          Surely the snippet of Javascript should interact more with Actinic, so that it calls for that new session file whenever the cookie has expired.
                          Many thanks for your thoughts on this.

                          As Nadeem says, the session file persists until it is overwritten by carrying out a script operation on the store. A script operation can also include moving from the brochure pages to the store pages via a brochure link.

                          I will pass on all this to the development team.

                          Comment

                          Working...
                          X