Duplicate Item
{exp:cartthrob:duplicate_item} is an immediate-execution single tag. It duplicates one existing cart row and can optionally redirect. It is not a form tag.
See also:
Parameters
row_id
Required. Row ID of the existing cart item to duplicate.
row_id="{segment_3}"
return
Optional redirect URL after processing. If omitted, no redirect occurs.
return="cart/my_template"
Behavior and Constraints
- Uses
row_idto locate the source cart row. - If the row exists, duplicates it as a new row and saves the cart.
- If the row does not exist, nothing is duplicated.
- One tag call duplicates one row.
- Redirects only when
returnis provided.
Note: current tag implementation reads row_id. Legacy snippets that pass entry_id are outdated and may not work as expected for this tag.
Examples
Duplicate from cart_items_info
{exp:cartthrob:cart_items_info}
<a href="{path=cart/duplicate_item/{row_id}/cart/view_cart}">Duplicate {title}</a>
{/exp:cartthrob:cart_items_info}
Template target:
{exp:cartthrob:duplicate_item row_id="{segment_3}" return="{segment_4}/{segment_5}"}
Duplicate with explicit return
{exp:cartthrob:duplicate_item row_id="{segment_3}" return="cart/my_template"}
Duplicate without redirect
{exp:cartthrob:duplicate_item row_id="{segment_3}"}