Announcement

Collapse
No announcement yet.

Single add to cart button and add to wishlist

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

    Single add to cart button and add to wishlist

    Does using a Single Add To Cart Button top the Add to Wish List Button Working?

    Client uses product summaries and single add to cart. added the wishlist button and when pressed says not sufficient quantity as if aditn to cart...

    Cannot post dev site as NDA I am afraid.

    Thank you
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    It's not just on Single Add to Cart pages. The same thing happens on Product Pages if you set a quantity to 0.
    And all Choices, Prompts, etc have to be valid.

    Here's what the Help has:
    · If a product has any user-selectable options then the appropriate selections must be made before adding to the list. If selections are incomplete when the ‘Add to Wish List’ button is clicked, then a warning is displayed.
    · The quantity selected will also be stored in the list. It can also be changed in the list itself (see below).
    · If the product has a Minimum Quantity set in the Product Details tab, no fewer can be added to the wish list, since no fewer can be ordered.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Here is an alternative Add To Wish List Button layout that may fix this.
      Code:
      <!--<span id="RemoveIfOutOfStock_ATC_<actinic:variable name="ProductReference" selectable="false" />" class="ActinicRTS" >//-->
      <actinic:block if="%3cactinic%3avariable%20name%3d%22CartButtonVisibleToAllCustomers%22%20%2f%3e" >
      <!-- This code is used when the cart button is visible to all customers -->
      <span class="button-wrapper wishlist-button-wrapper wish-list-button-popup"><input value="Add To Wish List" name="WL_<actinic:variable name="ProductID" />" type="submit" class="button cart-button" onclick="return setwlqty(&#34;<actinic:variable name="ProductID" />&#34;, this);"/></span>
      </actinic:block> 
      
      <actinic:block if="%3cactinic%3avariable%20name%3d%22EnabledForCustomerGroupID%22%20%2f%3e%20%21%3d%20%22%22">
      <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductPriceIsEnabled%22%20%2f%3e">
      <!-- This code is used when the cart button is visible to retail customers, but not all other customer groups -->
      <Actinic:ShowForPriceSchedule Schedules="<actinic:variable name="EnabledForCustomerGroupID" />">
      <span class="button-wrapper wishlist-button-wrapper"><input value="Add To Wish List" name="WL_<actinic:variable name="ProductID" />" type="submit" class="button cart-button" onclick="setwlqty('<actinic:variable name="ProductID" />');return setwlqty(&#34;<actinic:variable name="ProductID" />&#34;, this);"/></span>
      </Actinic:ShowForPriceSchedule>
      </actinic:block>
      
      <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductPriceIsEnabled%22%20%2f%3e%20%3d%3d%20FALSE" >
      <!-- This code is used when the cart button needs to hidden from retail customers -->
      <Actinic:ShowForPriceSchedule Schedules="<actinic:variable name="EnabledForCustomerGroupID" />" HTML="<span class='button-wrapper wishlist-button-wrapper wish-list-button-popup'><input value='Add To Wish List' name='WL_<actinic:variable name="ProductID" />' type='submit' class='button cart-button' onclick='return setwlqty(&#34;<actinic:variable name="ProductID" />&#34;, this);'/></span>"></Actinic:ShowForPriceSchedule>
      </actinic:block>
      </actinic:block>
      <!--</span>//-->
      And put the following into the bottom of Standard Javascript Header Functions:
      Code:
      <script type="text/javascript">
      function setwlqty(pid, button){
      	if ( ValidateChoices(pid, false, button) )
      		{
      		var qtyfld = $( "input[name='Q_" + pid + "']" );
      		if ( qtyfld.val() == '0' ) qtyfld.val(1);
      		return true;
      		}
      	return false;
      }
      </script>
      It works by first checking the chosen products Choices if they exist. If they're OK and the Quantity is 0 then the quantity is set to 1 and the wish list request made.

      N.B. Only lightly tested.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        You are amazing Norman, thank you. I will try it in the morning.
        So grateful.
        Jonathan Chappell
        Website Designer
        SellerDeck Website Designer
        Actinic to SellerDeck upgrades
        Graphicz Limited - www.graphicz.co.uk

        Comment


          #5
          One thought. Client sets minimum purchase quantities. So even setting a qty of 1 might not do the trick. I guess I will have to try to set it for the minimum order quantity?
          Jonathan Chappell
          Website Designer
          SellerDeck Website Designer
          Actinic to SellerDeck upgrades
          Graphicz Limited - www.graphicz.co.uk

          Comment


            #6
            Would the JavaScript have to be in the product layout with the MinQuantyOrderable variable instead of the figure '1'???

            Thank you
            Jonathan Chappell
            Website Designer
            SellerDeck Website Designer
            Actinic to SellerDeck upgrades
            Graphicz Limited - www.graphicz.co.uk

            Comment


              #7
              I revisd the Add To Wish List Buton thus
              Code:
              <!--<span id="RemoveIfOutOfStock_ATC_<actinic:variable name="ProductReference" selectable="false" />" class="ActinicRTS" >//-->
              <actinic:block if="%3cactinic%3avariable%20name%3d%22CartButtonVisibleToAllCustomers%22%20%2f%3e" >
              <!-- This code is used when the cart button is visible to all customers -->
              <span class="button-wrapper wishlist-button-wrapper wish-list-button-popup"><input value="Add To Wish List" name="WL_<actinic:variable name="ProductID" />" type="submit" class="button cart-button" onclick="return setwlqty<actinic:variable name="EncodedProductAnchor" />(&#34;<actinic:variable name="ProductID" />&#34;, this);"/></span>
              </actinic:block>
              
              <actinic:block if="%3cactinic%3avariable%20name%3d%22EnabledForCustomerGroupID%22%20%2f%3e%20%21%3d%20%22%22">
              <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductPriceIsEnabled%22%20%2f%3e">
              <!-- This code is used when the cart button is visible to retail customers, but not all other customer groups -->
              <Actinic:ShowForPriceSchedule Schedules="<actinic:variable name="EnabledForCustomerGroupID" />">
              <span class="button-wrapper wishlist-button-wrapper"><input value="Add To Wish List" name="WL_<actinic:variable name="ProductID" />" type="submit" class="button cart-button" onclick="setwlqty('<actinic:variable name="ProductID" />');return setwlqty<actinic:variable name="EncodedProductAnchor" />(&#34;<actinic:variable name="ProductID" />&#34;, this);"/></span>
              </Actinic:ShowForPriceSchedule>
              </actinic:block>
              
              <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductPriceIsEnabled%22%20%2f%3e%20%3d%3d%20FALSE" >
              <!-- This code is used when the cart button needs to hidden from retail customers -->
              <Actinic:ShowForPriceSchedule Schedules="<actinic:variable name="EnabledForCustomerGroupID" />" HTML="<span class='button-wrapper wishlist-button-wrapper wish-list-button-popup'><input value='Add To Wish List' name='WL_<actinic:variable name="ProductID" />' type='submit' class='button cart-button' onclick='return setwlqty<actinic:variable name="EncodedProductAnchor" />(&#34;<actinic:variable name="ProductID" />&#34;, this);'/></span>"></Actinic:ShowForPriceSchedule>
              </actinic:block>
              </actinic:block>
              <!--</span>//-->
              <script type="text/javascript">
              function setwlqty<actinic:variable encoding="perl" name="EncodedProductAnchor" selectable="false" />(pid, button){
              if ( ValidateChoices(pid, false, button) )
              {
              var qtyfld = $( "input[name='Q_" + pid + "']" );
              if ( qtyfld.val() == '0' ) qtyfld.val(<actinic:variable encoding="perl" name="MinQuantityOrderable" selectable="false" />);
              return true;
              }
              return false;
              }
              </script>
              And it seemed to work and took me to the wish list login/creation page, but sadly once logged into the wishlist the add to wishlist stopped working asking yet again for the quantity
              Jonathan Chappell
              Website Designer
              SellerDeck Website Designer
              Actinic to SellerDeck upgrades
              Graphicz Limited - www.graphicz.co.uk

              Comment


                #8
                I thought that Single Add To Cart Button did not work on the Swift template?
                Elysium:Online - Official Accredited SellerDeck Partner
                SellerDeck Design, Build, Hosting & Promotion
                Based in rural Northants

                Comment


                  #9
                  Indeed Andy, Indeed!
                  Jonathan Chappell
                  Website Designer
                  SellerDeck Website Designer
                  Actinic to SellerDeck upgrades
                  Graphicz Limited - www.graphicz.co.uk

                  Comment


                    #10
                    Showing my ignorance here but compaing the source of a Swift default site with the source of a Smart, the sellerdeck.min.js in both is identical.
                    It seems the main difference is the use of Bootstrap which is a layout thing rather than functonality.

                    Where is the workings of Swift is the difference between it and Smart that stops the single ATC and wish list if it is used? Is it in the Javascript Footer Functions in Swift?

                    Just trying to understand!

                    Thank you
                    Jonathan Chappell
                    Website Designer
                    SellerDeck Website Designer
                    Actinic to SellerDeck upgrades
                    Graphicz Limited - www.graphicz.co.uk

                    Comment


                      #11
                      The JavaScripts and Perl are unchanged from non-Swift sites. So any product layouts that post the same data as non-Swift to the Cart should work.

                      However SellerDeck have made that hard to do as Swift uses a customised Responsive Product List that has hard coded Regular Product Summary (also modified for Swift).

                      I did a test where I replaced these layouts with non-Swift ones and could successfully add to cart from the Section pages. There were problems with Dynamic Pricing not working and that's probably a nightmare to fix so I gave up.

                      P.S. A warning: If you revert a layout on a Swift based site to Factory Settings, you get the previous non-Swift layout. Best copy any layouts somewhere safe before reverting.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        Thank you Norman. You make an excellent point re factory reset of layouts. It would be great if in Swift factory reset did reset to Swift and not to legacy layouts.
                        Jonathan Chappell
                        Website Designer
                        SellerDeck Website Designer
                        Actinic to SellerDeck upgrades
                        Graphicz Limited - www.graphicz.co.uk

                        Comment


                          #13
                          Could Norman's script be edited to change the quantities of all the products in the product list to 1 (or more) as I have had instances where adding one item to the wishlist will raise a warning saying that some other product in the product list needs its minimum quantty set!

                          Thank you
                          Jonathan Chappell
                          Website Designer
                          SellerDeck Website Designer
                          Actinic to SellerDeck upgrades
                          Graphicz Limited - www.graphicz.co.uk

                          Comment

                          Working...
                          X