Announcement

Collapse
No announcement yet.

Multi-Product Add To Cart Button reloads page

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

  • Multi-Product Add To Cart Button reloads page

    I had previously posted my question as part of another question and felt it might be better to separate them.

    The store is using the EmporiumPlus Toolkit to create the ability to order from the CTGY page. I am updating the page to be able to use the Multi-Product Add To Cart Button (using the coding from here). The only problem with the coding is that it reloads the page giving the appearance that the page is "jumping" back to the top.them.

    Is there a way to convert this into something that will not make the page "jump" but if it has to reload, it reloads back to the product or products that were last added to the cart?

    Code:
    <form method="post" action="&mvte:global:sessionurl;Screen=CTGY">
      <input type="hidden" name="Action" value="ADPM">
      <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;" />
      <table class="subcat">
        <tr>
          <td colspan="4"><a name="&mvt:sub_category2:code;"></a>
            <h2 style="margin-bottom:4px; font-family:Arial, Helvetica, sans-serif; font-size:16px;"><!-- &mvt:sub_category2:name;-->&mvt:sub_category2:name;&nbsp;&nbsp;<span style="background-color: #FF0000; color:#FFFF00;"><font size="2"> </font><a href="/&mvt:category:code;.html#top"> <font size="2" color="#FFFF00">Back to top</font></a>&nbsp;</span></h2></td>
        </tr>
        <tr class="red-bg">
          <td></td>
          <td><b>Name</b></td>
          <td><b>Price</b></td>
          <td>&nbsp;</td>
        </tr>
        <mvt:foreach iterator="sub_product" array="sub_products">
          <tr valign="top">
            <td><mvt:if expr="NOT ISNULL l.settings:sub_product:thumbnail"> <img src="&mvte:sub_product:thumbnail;" alt="&mvt:sub_product:name;" title="&mvt:sub_product:name;">
                <mvt:else>
                &nbsp; </mvt:if></td>
            <td>&mvt:sub_product:name;</td>
            <td>&mvt:sub_product:formatted_price;</td>
            <td class="item-buttons" style="text-align:right;"><input type="hidden" name="Products[ &mvt:sub_product:id; ]:code" value="&mvte:sub_product:code;">
              <input type="text" name="Products[ &mvt:sub_product:id; ]:quantity" value="0"></td>
          </tr>
          <tr>
            <td colspan="4" style="border-bottom:#000 solid 1px;"></td>
          </tr>
        </mvt:foreach>
        <tr>
          <td colspan="3"><input type="submit" value="Add to Basket"></td>
        </tr>
      </table>
    </form>
    Or is there a better ReadyTheme to consider? The site is rather "customized".



    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

  • Hi Leslie,

    You would have to utilize JavaScript for this; something akin to the standard AJAX Add to Cart. To the best of my knowledge, none of the ReadyThemes have this functionality built into a category page.
    Matt Zimmermann
    Director of UI/UX Standards and Theme Development
    / Miva, Inc.

    Comment

    Working...
    X

    This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

    This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

    Accept