Announcement

Collapse
No announcement yet.

multi-add category page?

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

    multi-add category page?

    Hi, with the new 9.003, is it possible to set up a category page with multiple products that can be added with one click? And, if so, how? Lea-Ann

    #2
    Re: multi-add category page?

    Yes, I've asked Brennan to chime in, but I think he's posted the docs in another thread.
    Thanks,

    Rick Wilson
    CEO
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: multi-add category page?

      I should have some examples to post shortly, but this is the type of thing that is going to be unique to each persons store, because most people have customized category layout.

      But at a high level here are the things you need to change to your category page to get it to work:

      1. Create a copy of your CTGY page - copy and paste the code from all templates assign all the same items
      2. Then in the Product List Layout section make the following changes:

      a. Typically each product has its own individual form for add to cart.. You need to change that so there is only a single form wrapped around all products and remove the add to cart buttons.
      b. Change the hidden input for Action from ADPR, to ADPM (Add Multiple Products to the cart)
      c. Add a quantity text input next to each product so the quantity can be set for each product. It should be defaulted to 0.
      d. Add a single submit button within the form.


      When the add to cart button is clicked, Miva will go though all products on the page, and any product with a quantity of 1 will be added to the cart.
      Brennan Heyde
      VP Product
      Miva, Inc.
      [email protected]
      https://www.miva.com

      Comment


        #4
        Re: multi-add category page?

        Originally posted by Brennan View Post
        I should have some examples to post shortly, but this is the type of thing that is going to be unique to each persons store, because most people have customized category layout..
        Would love to see some examples of real-time implementation.

        Comment


          #5
          Re: multi-add category page?

          EDITED: FIXED -- working on this . . . the add to basket button doesn't actually work. can anyone give me some pointers of other things to check?
          http://www.knittingtoday.com/Merchan...Code=MARSIELLE
          Last edited by lea-ann; 05-02-15, 06:40 AM.

          Comment


            #6
            Re: multi-add category page?

            Originally posted by Brennan View Post

            When the add to cart button is clicked, Miva will go though all products on the page, and any product with a quantity of 1 will be added to the cart.
            So, if we want items that have 1 or 2, or even more added to the basket, do I use:
            <input type="hidden" name="Products[ &mvt:product:id; ]:quantity" value="GT 1">

            Comment


              #7
              Re: multi-add category page?

              PROBLEM: Add to cart adds one of each item within the category, regardless of quantity in the input box.
              http://www.knittingtoday.com/category/MARSIELLE.html

              Comment


                #8
                Re: multi-add category page?

                Originally posted by lea-ann View Post
                PROBLEM: Add to cart adds one of each item within the category, regardless of quantity in the input box.
                http://www.knittingtoday.com/category/MARSIELLE.html
                Inside of that category template's category_listing:products foreach loop, try swapping your text input:

                Code:
                <input type="text" name="Quantity" value="0">
                with:

                Code:
                <input type="text" name="Products[ &mvt:product:id; ]:quantity" value="0">
                and then remove the extra hidden input:

                Code:
                <input type="hidden" name="Products[ &mvt:product:id; ]:quantity" value="1">

                Comment


                  #9
                  Re: multi-add category page?

                  thank you so much!!! That works perfectly and now I just need to work on styling and I'll be able to utilize this feature for some great project-based kits.

                  Comment


                    #10
                    Re: multi-add category page?

                    Does this work with attributes?

                    Comment


                      #11
                      Re: multi-add category page?

                      Originally posted by fastees View Post
                      Does this work with attributes?
                      Yes, it does work with attributes too. You just need to assign the "product_attributes" item to the page, and add the
                      HTML Code:
                      <mvt:item name="product_attributes" param="product:id" />
                      item within the product loop.

                      Here is a complete example of a Multi-Add on a category page that displays attributes:

                      https://gist.github.com/steveosoule/...fbcd02c9e53cdc

                      Comment


                        #12
                        Re: multi-add category page?

                        Steve,

                        I looked at the link referenced and it does not seem to have a multi add example.

                        Also, it is mentioned that Attribute Machine does not work with Multi Add.
                        Has that changed?

                        Thanks
                        Sam

                        Comment


                          #13
                          Re: multi-add category page?

                          Hi Sam,

                          Link given by Sam is a correct example of multi add to cart, it's just that there is only one product in that page, you can try same with more products.
                          Also, you heard right that default Attribute Machine does not work with it as of now, you have to modify some HTML structure (tag names) in the attribute template.
                          Rajnish Sinha
                          ---------------------
                          https://twitter.com/rajnishsi

                          Comment


                            #14
                            Re: multi-add category page?

                            Has anyone set this up successfully in the Suivant ready theme - we can't get it to work correctly.

                            Comment


                              #15
                              Re: multi-add category page?

                              I have it working here with a twist. http://www.lindseyracing.com/LR/Parts/944TURBOMISC.html

                              If you need any help with it please contact me and I'll gladly share.

                              mivaman.com

                              Comment

                              Working...
                              X