I'm working on a massive "multi-add" for a category page, and I'm "so close" but the form itself when submitted is resulting in nothing. I'm using the Shadows ReadyTheme. Is there something wrong in this form setup that is causing items not to add, or is it something with my domain settings? I confirmed a normal add to cart on a product page works fine. Here's what I'm working with..... NOTE, you're seeing me loop through sub-cats of the parent and where there are products in those sub-cats, it's looping through those as well, and those are what I'm trying to multi-add......
HTML Code:
<form method="post" action="&mvte:global:secure_sessionurl;Screen=BASK"> <input type="hidden" name="Action" value="ADPM"> <mvt:foreach iterator="subcategory" array="subcategories"> <h2 class="u-text-uppercase"><a href="&mvte:subcategory:link;"> <strong>&mvte:subcategory:name;</strong> </a></h2> <mvt:do name="l.doit" file="g.Module_Library_DB" value="Category_Load_Code( l.settings:subcategory:code, l.settings:thisCategory)" /> <mvt:do name="l.doit" file="g.Module_Library_DB" value="Runtime_ProductList_Load_Offset_Category( l.settings:thisCategory:id, g.Offset, 100, g.NextOffset, l.settings:myProducts )" /> <table class="table-compact"> <tr> <td>Name</td> <td>Price</td> <td>Size</td> <td>MSRP</td> <td>UPC</td> <td>Order</td> </tr> <mvt:foreach iterator="product" array="myProducts"> <mvt:item name="customfields" param="Read_Product_Code(l.settings:product:code,'upc', g.upc)" /> <mvt:item name="customfields" param="Read_Product_Code(l.settings:product:code,'suggest_retail', g.suggest_retail)" /> <mvt:item name="customfields" param="Read_Product_Code(l.settings:product:code,'product_size', g.product_size)" /> <tr> <td>&mvt:product:name;</td> <td> <mvt:if expr="l.settings:product:base_price GT l.settings:product:price"> <span><s>$&mvt:product:base_price;</s></span> <span class="u-color-red">$&mvt:product:price;</span> <mvt:else> <span>$&mvt:product:price;</span> </mvt:if> </td> <td>&mvt:global:product_size;</td> <td>&mvt:global:suggest_retail;</td> <td>&mvt:global:upc;</td> <td> <input type="hidden" name="Products[&mvt:product:id;]:code" value="&mvte:product:code;"> <input type="text" name="Products[&mvt:product:id;]:quantity" value="0"> </tr> </mvt:foreach> </table> </mvt:foreach> <button class="btn btn-primary btn-yellow btn-block btn-lg" type="submit"><i class="fa fa-shopping-cart"></i> Add to Cart</button> </form>
Comment