Skip to content

Duplicate cart item tag

Simply duplicate a cart item

The tag

{exp:reinos_store:duplicate_cart_item}

Tag Parameters

Below are the Tag Parameters. Those parameters can be used in the tag described above

cart_item_id

The id of the cart item.

Most of the time you get this id in the {cart:items} loop in your cart. See the example for a better understanding.

cart_item_id=""

return_url

return_url=""

Example

Create a file site/duplicate-cart-item-id with the following content

{exp:reinos_store:duplicate_cart_item cart_item_id="{segment_3}" return_url="/reinos_store/cart"}

and in your cart you can do something like:

{exp:reinos_store:cart prefix="cart:" can_update="yes" return_url="reinos_store/cart"}
    {cart:items}
        <a href="/site/duplicate-cart-item-id/{cart:id}">Duplicate cart item</a>
    {/cart:items}
{/exp:reinos_store:cart}