6.18. save_cart

This tag saves the current cart or recurring order in the userdb under a given name.

6.18.1. Summary

    [save_cart nickname recurring]
    [save_cart nickname="cart-name" recurring=1]


Positional parameters: The first line shows the usage with positional parameters (given in order). The second line shows usage with named parameters.


Parameters Description Default
nickname Label for the cart. none
recurring Set to true if recurring. Set to false, or omit if cart. none
Other_Characteristics  
Invalidates cache No
Macro No
Has end tag No

Tag expansion example:

    [save_cart mycart]
    [save_cart nickname=mycart recurring=1]

ASP-like Perl call:

    $Tag->save_cart( { nickname => mycart,
                      recurring => 1, } );

or similarly with positional parameters,

    $Tag->save_cart( "mycart", "1" );

6.18.1.1. See Also

userdb, delete_cart, load_cart and pages templates/components/saved_carts_list_small, pages/saved_carts.html for more examples.

6.18.2. Description

Saves the current cart with name nickname in the user database. Basically the same as [userdb function=set_cart nickname=cartname]

6.18.2.1. nickname

Nickname for the current cart to be saved. You can use same nickname for different carts. An index will be added if there are more carts with the same nickname.

6.18.2.2. recurring

Set to true if recurring. Set to false, or simply omit it, if it is a cart.