Announcement

Collapse
No announcement yet.

Clearing shopping cart

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

    Clearing shopping cart

    Hi folks

    Been searching and searching and can find very much on this at all.

    I'm wondering if there's any existing methods to incorporate a one click "Clear cart" on the ShoppingCart page. The way it works (in V7) is check the "Delete" box and click update. Surely it should be possible to add a form button to the left of update (which i tried) to clear the cart?

    I tried the augmented Cancel button script (which clears the cart if Cancel is clicked during the ordering phase - page 50 of the Advanced user guide) without much success, and also tried to use it on the View Shopping Cart page again without success.

    We've had a few customers wondering why there are still products in the cart, even before completing a transaction - it would be nice to provide an obvious and pervasive "Clear Cart" button.

    Thanks in advance,

    Ryan
    www.retekdirect.co.uk

    #2
    Ryan,

    I think this post might help:-

    http://community.actinic.com/showthr...t=clear+cookie

    David
    Cheers

    David
    Located in Edinburgh UK

    http://twitter.com/mcfinster

    Comment


      #3
      Hi David

      I happened upon this post earlier - it appears to be very similar to the code in the Adv Guide, if not the same? (albeit slightly modified, or added to the guide)

      As i understand it, it should launch a JavaScript pop up for confirmation, yes? I haven't been able to get this working. I'll give this exact code a try when i get back in tomorrow morning.

      Thanks,

      Ryan

      Comment


        #4
        Quick update:

        Cart clearing is working now - turned out it was a problem with the coding (slightly squiffy copy and paste job by myself).

        Cheers Dave T (for the code itself) and Dave F (for re-pointing me to the thread in question)


        Ryan

        Comment


          #5
          You're very welcome.
          http://www.johnsons-seeds.com - Actinic plugins, remote add to cart and custom CMS
          http://www.dtbrownseeds.co.uk - More seeds and plants....
          http://www.mr-fothergills.co.uk - Well it used to be Actinic...

          Comment


            #6
            Just had a further idea on looking at your site (nice site by the way!).

            You could also say in a body onload function:

            if (parseInt(getCartItem(3)) == 0) {
            document.forms[0].clear.disabled = true;
            }

            so that the Clear button is consistent with the rest of the buttons in the current order state.
            http://www.johnsons-seeds.com - Actinic plugins, remote add to cart and custom CMS
            http://www.dtbrownseeds.co.uk - More seeds and plants....
            http://www.mr-fothergills.co.uk - Well it used to be Actinic...

            Comment


              #7
              Oooh, nice one Dave - was wondering about that earlier actually, thought it was hard-coded in the catalogue itself.

              JavaScript-tastic!

              Comment

              Working...
              X