Announcement

Collapse
No announcement yet.

Duplicate Products, Custom Quantity and Single Add to Basket

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

    Duplicate Products, Custom Quantity and Single Add to Basket

    Hi All,

    Have been ripping my hair out this weekend with this which means I am even more folically challenged than I was before.

    Problem 1:
    I use ‘Quantity on Product Page’ and I have gone through all my templates to change the default quantity to 1 (as apposed to 0) to save customers another click. This worked fine on all my normal product pages but not on the product duplicate pages.
    It comes up with an error on the page saying:
    - Quantity: You must enter a value between 1 and y(for example)
    You then enter a value (even though it already says 1) and it keeps coming up with the same error regardless.
    The following link gives an example:
    http://www.mad4ponies.com/acatalog/t..._jodhpurs.html

    If I change the template back to use ‘NETQUOTEVAR:PRODUCTQUANTITY’ instead of ‘<input type="text" size="4" name="Q_NETQUOTEVAR:PRODUCTREFERENCE" value="1">’ it works fine again??

    Problem 2:
    This now leads to my second problem. I want to create a bundle deal, where the customer chooses colours and sizes from say four products, adds them to the basket and gets a discount for the lot. Easy you would think? When I set up the default quantity as ‘1’ in a hidden field and then have four products with a single add to basket it does not put them in the cart.
    However, if I remove the hidden field and put back ‘NETQUOTEVAR:PRODUCTQUANTITY’ the add to basket works. This however would mean that the customer would have to type in 1 to all four product quantities to get the bundle deal!!
    Please see the following link to see it working with the quantity fields:
    http://www.mad4ponies.com/acatalog/t...ravel_set.html

    And this link shows what happens with the default set to ‘1’ (although not in a hidden field, but still has the same effect):
    http://www.mad4ponies.com/acatalog/t..._Pony_Set.html

    I have searched the forum and have found that there are some problems with duplicate products but cannot find anything related to this??

    Please Help, before I lose the rest of my hair.
    Thanks
    Mark
    Mad 4 Ponies
    http://www.mad4ponies.com/acatalog/index.html
    Mad 4 Ponies
    http://www.mad4ponies.com/index.html

    #2
    Found the problem!!

    I was down to my last 4 hair folicals and have narrowed down the problem to one piece of html.

    In the advanced user guide is says to set the default quantity replace:

    NETQUOTEVAR:PRODUCTQUANTITY

    with

    <input type="hidden" name="Q_NETQUOTEVAR:PRODUCTREFERENCE" value="1">

    Which works fine on products without duplicates.

    However, on comparison of products with duplicates I found that for the original product this is used:
    name="Q_NETQUOTEVAR:PRODUCTREFERENCE" where the product reference is inserted by actinic.

    And on the duplicate of the product this is used:
    name="Q_1!NETQUOTEVAR:PRODUCTREFERENCE" again the product reference is inserted by actinic.

    So I changed my templates so that name="Q_1!NETQUOTEVAR:PRODUCTREFERENCE" was used and found this:
    - All duplicate and bundle deals now work
    - The products without duplicates work
    - But the originals of the duplicate products now don't work!!

    So the only answer i can see at the moment would be to double up all my templates (which is now a considerable number) to allow for this!!

    Unless someone out there has a fix or work around for this problem??

    Thanks
    Mark
    Mad 4 Ponies
    http://www.mad4ponies.com/acatalog/index.html
    Mad 4 Ponies
    http://www.mad4ponies.com/index.html

    Comment


      #3
      What makes this worse is that it is gloriously sunny outside, and I should be sitting in a beer garden with a pint, instead of in front of my computer

      Mark
      Mad 4 Ponies
      http://www.mad4ponies.com/index.html

      Comment


        #4
        Hi there
        Originally posted by Billy
        If I change the template back to use ‘NETQUOTEVAR:PRODUCTQUANTITY’ instead of ‘<input type="text" size="4" name="Q_NETQUOTEVAR:PRODUCTREFERENCE" value="1">’ it works fine again??
        I'm afraid this is a bug within the current version of the software. As yet there is no workaround for this, as it would require a change in the executable.

        Kind Regards
        Nadeem Rasool
        SellerDeck Development

        Comment


          #5
          Go to Design / Text / Goto / Phase -1, ID 2173 and change from

          %s<INPUT TYPE=text NAME="%s" SIZE="4" VALUE="%d">

          to

          %s<INPUT TYPE=text NAME="%s" SIZE="4" VALUE="1"><!-- %d -->

          And in your Templates go back to using NETQUOTEVAR:PRODUCTQUANTITY.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            I love it when Actinic say something can't be done.

            So here's the (hideously complex) workaround for the bug that can be used more generally than my solution above.
            Code:
            <script type="text/javascript">
            <!-- 
             var ref = unescape(('NETQUOTEVAR:PRODUCTANCHOR'.substring(1)).replace(/_/g,'%'));
             document.write('<input type="text" size="4" name="Q_' + ref + '" value="1">');
            //-->
            </script>
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Hi Norman

              Excellent, Thankyou for providing the workaround using javascript.

              Kind Regards
              Nadeem Rasool
              SellerDeck Development

              Comment


                #8
                Hi, Nadeem

                We're lucky that NETQUOTEVAR:PRODUCTANCHOR contains an encoded reference that's valid for both products and duplicates. The line
                Code:
                var ref = unescape(('NETQUOTEVAR:PRODUCTANCHOR'.substring(1)).replace(/_/g,'%'));
                can be used in many situations to extract it.
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  Hi Norman, Ahh yes I see where you are coming from with the workaround. To be honest, I wouldn't have thought to do it that way using javascript. Keep this thread bookmarked for future reference

                  Kind Regards
                  Nadeem Rasool
                  SellerDeck Development

                  Comment


                    #10
                    Wow! I can't beleive how quickly you replied I wasn't expecting an answer until later in the week.
                    I hope you guys saw more of the sunshine today than I did!!

                    Norman you are a scholar and a gent

                    Thank you very much
                    Mark

                    Mad 4 Ponies
                    http://www.mad4ponies.com/acatalog/index.html
                    Mad 4 Ponies
                    http://www.mad4ponies.com/index.html

                    Comment

                    Working...
                    X