Announcement

Collapse
No announcement yet.

Multiple Add on one page

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

    Multiple Add on one page

    I followed along with this one http://www.miva.com/videos/articles/...ct-add-to-cart and when I add something to cart, instead of 1 item, it is giving me multiples of 12 items. 1=12, 2=24, 3=36 and so on. The only thing on the page that has the number 12 in it is the sort and the pagination. I also deleted both of those and still come out the same. Any ideas? I've tried it with and without attributes and it still yields 12. Also, while on the subject, the script that shows the pricing on attributes, that doesn't seem to be inherently on that page, or within the code, can you remind me how to add it.

    Thanks!
    Suzanne

    __________________________________________________ _______

    aGenius Marketing
    800-768-2693
    Web Design & e-Commerce
    __________________________________________________ _______

    #2
    Can you provide a link on the multi-add issue so we can see the resulting code?

    Standard attribute and option price displays are derived from l.settings:attribute:price and l.settings:option:price. Conditionals and currency formatting will be needed to handle proper display with each attribute type, if you are working with a ReadyTheme, you can use the product attribute template for reference.

    Comment


      #3
      stab in the dark. you have default Quantity set to '1' and have 12 items on the page, therefore you end up with quantity = 12
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment


        #4
        This works. I stripped most of my css and html out so you can see the base set up:
        See next post for the code.
        Last edited by fastees; 04-21-16, 08:36 AM.

        Comment


          #5
          This works. I stripped most of my css and html out so you can see the base set up. This works with attributes as well.

          <form method="post" action="&mvte:global:sessionurl;Screen=CTGY">
          <input type="hidden" name="Action" value="ADPM">
          <input type="hidden" name="Attributes" value="Yes">
          <input type="hidden" name="Store_Code" value="&mvte:store:code;">
          <mvt:foreach iterator="product" array="category_listing:products">
          <a href="&mvte:product:link;">
          <span class="flag &mvt:product:flag;" style="border: 1px solid #CCC;">
          <img src="&mvte:product:image;" alt="&mvte:product:name;" title="&mvte:product:name;" style="max-width:220px; min-width:220px;" />
          </span>
          </a>
          <a href="&mvte:product:link;">&mvt:product:name;</a><br>
          Part#&mvt:product:code;<br>
          <mvt:if expr="l.settings:product:quantity EQ 0">
          <p style="font-size:12px;">Quantity in Cart: <em>None</em></p>
          <mvt:else>
          <p style="font-size:12px;">Quantity in Cart: <strong>&mvt:product:quantity;</strong></p>
          </mvt:if><br>
          <input type="hidden" name="Products[&mvt:product:id;]:code" value="&mvte:product:code;" />
          <mvt:item name="product_attributes" param="product:id" />


          <mvt:if expr="l.settings:product:base_price GT l.settings:product:price">
          <p><strong class="strike red">&mvt:product:formatted_base_price;</strong>&nbsp;<strong>&mvt:product:formatted_price; </strong></p>
          <mvt:else>
          <p><strong>&mvt:product:formatted_price;</strong></p>
          </mvt:if>
          </mvt:if>

          <input type="hidden" name="Code[&mvt:product:id;]" value="&mvt:product:code;">
          <input type="text" name="Products[&mvt:product:id;]:quantity" value="0" size="2" />
          </mvt:foreach>

          <mvt:item name="buttons" param="AddToBasketE" />
          </form>
          Last edited by fastees; 04-21-16, 06:00 PM.

          Comment


            #6
            ok, this is on a dev site so I couldn't show it to you. However, I will try the last tidbit and let you know in a minute or two hopefully.
            Suzanne

            __________________________________________________ _______

            aGenius Marketing
            800-768-2693
            Web Design & e-Commerce
            __________________________________________________ _______

            Comment


              #7
              Originally posted by Bruce - PhosphorMedia View Post
              stab in the dark. you have default Quantity set to '1' and have 12 items on the page, therefore you end up with quantity = 12
              no, i had default set to zero
              Suzanne

              __________________________________________________ _______

              aGenius Marketing
              800-768-2693
              Web Design & e-Commerce
              __________________________________________________ _______

              Comment


                #8
                Originally posted by fastees View Post
                This works. ...
                Yes and on PLST it works as this:
                HTML Code:
                <form method="post" action="&mvte:global:sessionurl;Screen=PLST">
                <input type="hidden" name="Action" value="ADPM">
                <input type="hidden" name="Attributes" value="Yes">
                <input type="hidden" name="Store_Code" value="&mvte:store:code;">
                <mvt:foreach iterator="product" array="all_products:products">
                However, it does not update attributes when you switch to another attribute. Maybe I need to switch something on? Thanks for the code!!
                Last edited by agenius; 04-22-16, 10:44 AM.
                Suzanne

                __________________________________________________ _______

                aGenius Marketing
                800-768-2693
                Web Design & e-Commerce
                __________________________________________________ _______

                Comment

                Working...
                X