New Cart
{exp:cartthrob:new_cart} is an immediate-execution single tag. It reinitializes the cart and saves it. It is not a form tag.
See also:
Parameters
return
Optional redirect URL after processing. If omitted, no redirect occurs.
return="cart/home"
Behavior and Constraints
- Calls cart
initialize(), which resets cart state to defaults. - Saves the reinitialized cart.
- Redirects only when
returnis provided.
Example
Reinitialize cart and redirect
{exp:cartthrob:new_cart return="cart/home"}
Reinitialize cart without redirect
{exp:cartthrob:new_cart}