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=""form_class
Set the form class
form_class=""form_attr:[attribute]
Add an attribute to the form tag, e.g. a data- attribute or an aria-label.
form_attr:data-group="{entry_id}"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 one of the products doesn't have enough stock.
{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_rate
The tax rate of the product: low or high, see tax_rate. Without it the default tax rate of the settings is used. (Unlike the add_to_cart tag, the old param tax is not read here.)
tax_rate="high"weight
The weight of the product, in the Weight unit of the Store settings or in its weight_unit.
weight=""parent_order_item_id
Available from v4.0.0
The order item this product reorders or renews, see parent_order_item_id.
parent_order_item_id="{order:items:order_item_id}"weight_unit
Available from v4.0.0
The unit of the weight: kg, g or lbs. Leave it out when the weight is in the Weight unit of the Store settings, see weight_unit.
weight_unit="g"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_rate="high"
}
{reinos_store_add_to_cart
qty="1"
entry_id="309"
sku="309"
name="Product 309"
price="5.10"
tax_rate="high"
}
<p>Product description</p>
<input type="submit" class="button" value="Add to Cart"/>
{/exp:reinos_store:multi_add_to_cart}