Change Quantity

Change an item's quantity with in a url.

Table of Contents

Parameters

row_id

Required. The row_id of an item in your cart.

row_id="{segment_3}"
quantity

The quantity you want to change to.

quantity="{segment_4}"
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/index"

Examples

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

The cart/index template

{exp:cartthrob:cart_items_info}
<a href="{row_id_path=cart/change_quantity}/10">Change quantity to 10</a>
{/exp:cartthrob:cart_items_info}

The change_quantity template

{exp:cartthrob:change_quantity row_id="{segment_3}" quantity="{segment_4}" return="cart/index"}