Announcement

Collapse
No announcement yet.

Ajax Add To Cart & Quantity

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

  • Ajax Add To Cart & Quantity

    I have the ajax add to cart working on my category pages now. We have quantity boxes, but it only adds 1 regardless of the quantity that is entered. Is this possible to do? Has anyone setup their store to do this? Seems there is no benefit if this is not possible.

  • #2
    I would love a solution if anyone has one.

    Comment


    • #3
      GonzaloGil Could you let us know if such a thing is possible on the category page? I've tried so many different things that have not worked. I'd love to know if Im trying to solve and unsolvable problem. Thanks so much.

      Comment


      • #4
        @Toocutebeads @JoeBTI send me a link to the page you are trying to work on and i can take a look, it isn't standard on any template so on the surface i would say that it won't work, however, in the end, it's still a call to the same script that adds to cart, so there should be a way to pass it, most likely the way it's implemented on the template it isn't passing the value. If you give me a page to review, i can see what's going on and let you know if possible & how.
        ----------------------------
        Gonzalo Gil
        3dCart Support
        800-828-6650 x111

        Comment


        • #5
          Originally posted by GonzaloGil View Post
          @Toocutebeads @JoeBTI send me a link to the page you are trying to work on and i can take a look, it isn't standard on any template so on the surface i would say that it won't work, however, in the end, it's still a call to the same script that adds to cart, so there should be a way to pass it, most likely the way it's implemented on the template it isn't passing the value. If you give me a page to review, i can see what's going on and let you know if possible & how.
          Thanks for the response. The code doesn't work yet so I can not put it live. I'll open a demo store tomorrow and import the code Im working on. In the meantime, here is my add to cart snippet.

          HTML Code:
          
          <form action="add_cart.asp?quick=1&amp;item_id=[catalogid]">
          <!--START: qtybox-->
          <label class="qty-input">
          <input type="hidden" name="item_id" value="[catalogid]" />
          <input type="text" class="form-control" name="qty-[counter]" value="0" onfocus="if
          (this.value==this.defaultValue) this.value=''">
          </label>
          <!--END: qtybox-->
          <!--START: addcartbutton-->
          <div class="action" data-toggle="modal" data-target="#Modal[catalogid]">
          <input type="submit" id="Add" class="btn btn-default btn-addcart" name="[product_addtocart]" value="ADD +">
          </div>
          <!--END: addcartbutton-->
          </form>

          Comment


          • #6
            Tango Pixel tested & confirmed he can do this and will be applying it to our site in a day or two. He's also updating the cart section in the frame cause I noticed it was NOT updating [ITEMSINCART] Item(s) | [CARTSUBTOTAL] when products were being added. Was only updating when you refresh the page.

            Lastly, I have him changing the text (like below), so the customer knows it was already added.

            itemincart.png


            Comment


            • #7
              HTML Code:
              <input type="text" class="form-control" name="qty-[counter]"
              Doesnt look right, there is only 1 quantity value on this form, it should be qty-0
              The qty-[counter] is used on templates like the related items, where you might have 2-3 and want to add all 3 at the same time, it needs the quantity of each one separately.

              ----------------------------
              Gonzalo Gil
              3dCart Support
              800-828-6650 x111

              Comment


              • #8
                Originally posted by JoeBTI View Post
                Tango Pixel tested & confirmed he can do this and will be applying it to our site in a day or two. He's also updating the cart section in the frame cause I noticed it was NOT updating [ITEMSINCART] Item(s) | [CARTSUBTOTAL] when products were being added. Was only updating when you refresh the page.

                Lastly, I have him changing the text (like below), so the customer knows it was already added.

                itemincart.png

                Thats fantastic news! Could you send a link to see it in action when completed?

                Comment

                Working...
                X