Appearance
Multi add to Cart tag
Available from v3.5.0
This tag allows you to add multiple items to the cart at once.
It's useful for grouped products where you want to place several products into the cart in a single action.
The tag is essentially a wrapper around the {exp:reinos_store:add_to_cart}
tag, but supports a limited set of options.
The tag
{exp:reinos_store:multi_add_to_cart}
Tag Parameters
Below are the Tag Parameters. Those parameters can be used in the tag described above
return_url
The return url, default to the current url
return_url=""
Tag Variables
error:invalid_price
Return the error when an invalid price is given.
{if error:invalid_price}
<p style="color:red;">Some of the products have an invalid price.</p>
{/if}
error:invalid_sale_price
Return the error when an invalid sales price is given.
{if error:invalid_sale_price}
<p style="color:red;">Some of the sales prices contain an invalid price.</p>
{/if}
error:out_of_stock
Return the error when an invalid sales price is given.
{if error:out_of_stock}
<p style="color:red;">Some of the products dont have enough stock.</p>
{/if}
reinos_store_add_to_cart tag
This is the lightweight version of the {exp:reinos_store:add_to_cart}
tag. It accepts a limited set of parameters compared to the {exp:reinos_store:add_to_cart}
tag.
entry_id
Set the entry_id of your product
entry_id=""
qty
Set the QTY you want to add to the cart
qty="1"
sku
sku=""
name
The name of the product, this could be the entry name.
name=""
price
price=""
sale_price
sale_price=""
tax
The tax rate
tax=""
Example
{exp:reinos_store:multi_add_to_cart
return_url="reinos_store/cart"
}
<h1>Awesome title</h1>
{if error:invalid_price}
<p style="color:red;">Some of the prices contain an invalid price</p>
{/if}
{if error:invalid_sale_price}
<p style="color:red;">Some of the sales prices contain an invalid price</p>
{/if}
{if error:out_of_stock}
<p style="color:red;">Some of the products dont have enough stock</p>
{/if}
{reinos_store_add_to_cart
qty="1"
entry_id="464"
sku="464"
name="product 464"
price="10"
tax="high"
}
{reinos_store_add_to_cart
qty="1"
entry_id="309"
sku="309"
name="Product 309"
price="5,1"
tax="high"
}
<p>Product description</p>
<input type="submit" class="button" value="Add to Cart"/>
{/exp:reinos_store:multi_add_to_cart}