Announcement

Collapse
No announcement yet.

Clearing Cookies

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

    #16
    help clearing shopping basket

    hi, where in actinic do i need to insert this code to get it to give the customer the option to clear order/basket ?

    Thanks

    Rob

    Sanderson Golf
    www.sandersongolf.com

    Comment


      #17
      This code needs to go into the <head> section of Act_Primary.html, Act_BrochurePrimary.html and any other primary templates you are using for your store (as defined in 'Design | Options | Layouts'). Add it right at the bottom of the </head> section.
      Code:
      <script language="Javascript">
      
      function createCookie(name,value,days)
      {
      if (days)
      {
      var date = new Date();
      date.setTime(date.getTime()+(days*24*60*60*1000));
      var expires = "; expires="+date.toGMTString();
      }
      else var expires = "";
      document.cookie = name+"="+value+expires+"; path=/";
      }
      function ClearDetails()
      {
      if (confirm('This will clear your order and address details completely.\nClick "View Cart" to change your order.\nDo you wish to proceed?') == true)
      {
      createCookie("ACTINIC_CART","",-2);
      createCookie("CART_CONTENT","",-2);
      createCookie("CART_COUNT","",-2);
      createCookie("CART_TOTAL","",-2);
      createCookie("ACTINIC_BUSINESS","",-2);
      createCookie("ACTINIC_REFERRER","",-2);
      window.location.reload();
      }
      }
      </script>
      Then you can use this code within your store templates, where you want the button to appear.
      <input type="button" value="Cancel" onclick="ClearDetails()" />

      Comment


        #18
        Sorry to bring up an old thread, however we are looking at placing this script on the receipt page of our web-site www.tv-wall-brackets.co.uk

        We would like to kill the cookie as soon as the user has got their receipt, the reason being, is that we manually place a number of telephone orders through via our web-site, and on each occasion - although the basket empties and the totals clear, it remembers the last persons details in the address fields.

        The causes some issues for us, taking more time, and also making data entry confusing. Is there a way, using the script above, to place an onload, which will automatcially kill the cookie once the user lands on the receipt page - without any confirmation pop ups.

        Would be most interested.
        Sam Davis
        Bright Light Media Ltd

        Comment


          #19
          Sam,

          What you want to achieve is not really possible. The only way I see around it would be to perhaps place the main code in you checkout template and then add the next bit to kill the cookie around the 'Done' button. This is only a suggestion so cannot promise that it will work.

          Kind regards,
          Bruce King
          SellerDeck

          Comment


            #20
            kill basket cookies

            Originally posted by Bruce View Post
            Sam,

            What you want to achieve is not really possible. The only way I see around it would be to perhaps place the main code in you checkout template and then add the next bit to kill the cookie around the 'Done' button. This is only a suggestion so cannot promise that it will work.

            Kind regards,
            hello

            trying to kill the basket on entry to my site as prices vary depending on area selected before they land , any ideas please

            Comment

            Working...
            X