Announcement

Collapse
No announcement yet.

Deleting items from shopping cart

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

    Deleting items from shopping cart

    SD 2016
    I have a problem whereby items cannot be deleted from the cart once added.
    I am not sure which parts are standard, as the site was customised for me many years ago, and I am no longer in contact with the designer.
    To explain, in normal circumstances, customer adds product to cart, and cart has line that say "to delete an item set qty to zero and update"
    That is all good and works
    However, I have a lot of products set to Max order qty =1
    Where this is the case, when added to the cart, there is no drop down option to the qty, it is just set fixed at 1, so you cannot then set it to zero to remove an item

    Any help appreciated

    www.megacitycomics.co.uk

    #2
    I tried to help but couldn't find any such products. Could you post details of such a product? Did find many "Error 404 - Page Not Found" pages.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman
      Thanks for replying. It has been a few years since I have visited the forum, so good to see that you are still around.
      Yes, the website is in a temporary poor state. Like most retail buisnesses, we have been forced to temporarily shut up shop, and so I am operating what is normally a 7 days a week B&M shop with 4 staff, from my bedroom at home, with no staff, surrounded by hastily grabbed boxes of stock to start organising. So a lot of the site has been temporarily hidden, or products marked sold out, whilst I regroup, and try to rebuild. This no doubt will give me a lot ERROR-404
      I have reset most of what we do have so max qty is 2, to workaround the problem I have asked about, whilst I try to find the solution
      I have re-set one product back to the problem state, so you can see
      https://www.megacitycomics.co.uk/aca...ks-169942.html
      https://www.megacitycomics.co.uk/acatalog/2020-Force-Works-169942.html

      This one (above) has MX QTY ORDERABLE set to 1, so when you add to cart there is no way to remove it
      The next product down

      https://www.megacitycomics.co.uk/aca...-2--70612.html
      has max qty set to 2

      Comment


        #4
        Have you set a Minimum Qty of 1?

        Actually, that shouldn't make a difference as that's what I use.

        It might be a bug. Is there a reason you're using max qty rather than stock control?
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

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

        Comment


          #5
          Here's a fix that will add a "Remove" checkbox to these fields.
          Paste into the bottom of Design / Library / Layouts / JavaScript Header Functions / Standard Javascript Header Functions.
          Code:
          <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Shopping%20Cart%22">
              <script type="text/javascript">
              $(document).ready(function(){
                  $( "input[type='hidden'][name^='Q_']" ).each(function(){
                      var del = $(this).attr('name').replace(/^Q_/, 'D_');
                      $(this).after('<span class="floatRight"><input type="checkbox" name="' + del + '" >&nbsp;Remove</span>');
                      });
              });
              </script>
          </actinic:block>
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Mike - yes, MINIMUM set to 1 MAX to 1 (on most products). We need to limit a lot of products to max one per person, even though we have more than one in stock, as we deal in collectables that attract speculators. Stock control dosen't work as we have more than 1 in stock. Even if we put 'limit 1 per customer in the description, people still try to order more if we do not set MAX to 1.
            Norman - many thanks, I will give that a try

            Comment


              #7
              Hi Norman
              Thank you. That appears to work (it was a different layout on mine called MM Javascript Header Functions - possibly this is the customised one), at least on a PC. Haven't tested mobile version yet

              Comment


                #8
                I see the checkbox when adding 2020 Force Works #1 (Of 3) to the Cart but it's messy due to you not using SellerDeck's CSS.
                Try this:
                Code:
                <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Shopping%20Cart%22">
                    <script type="text/javascript">
                    $(document).ready(function(){
                        $( "input[type='hidden'][name^='Q_']" ).each(function(){
                            var del = $(this).attr('name').replace(/^Q_/, 'D_');
                            $(this).after('<span style="float:right"><input type="checkbox" name="' + del + '" >&nbsp;Remove</span>');
                            });
                    });
                    </script>
                </actinic:block>
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  Many thanks Norman. That works and second version looks much better

                  Comment


                    #10
                    If you want the button on all products, delete the code fragment:
                    Code:
                    [type='hidden']
                    Norman - www.drillpine.biz
                    Edinburgh, U K / Bitez, Turkey

                    Comment

                    Working...
                    X