Delete from Cart

Deletes a single row_id from the cart. If you have multiple items to remove at the same time, use update_cart_form.

Table of Contents

Parameters

row_id

The row_id of the item you wish do delete.

row_id="{segment_3}"
entry_id

The entry_id of the item you wish do delete. This is useful when you want to delete any occurrence of that entry id in the cart regardless of whether multiple items with this entry id have been added to the cart, possibly with different configurations.

entry_id="{segment_3}"
return

This is the URL you'd like the site redirected to when the operation is complete. If left blank, the page will not redirect.

return="cart/view_cart"

Examples

The following example is a method to delete one row_id at a time.

The view_cart template

{exp:cartthrob:cart_items_info}
<a href="{path=cart/delete_from_cart/{row_id}}">Delete</a>
{/exp:cartthrob:cart_items_info}

The delete_from_cart template

{exp:cartthrob:delete_from_cart row_id="{segment_3}" return="cart/index"}