CartThrob 9 documentation for ExpressionEngine commerce teams Visit CartThrob.com
CartThrob.com

Is Saved

is_saved checks whether any CartThrob customer-info value is currently stored in cart session data.

This is an immediate-execution single tag.

See also:

Parameters

This tag has no tag-specific parameters.

Behavior and Constraints

  1. Iterates current cart customer-info values.
  2. Returns 1 if any value is non-empty.
  3. Returns 0 if all customer-info values are empty.

Examples

Direct output:

{exp:cartthrob:is_saved}

Use as a simple saved/not-saved marker:

{if "{exp:cartthrob:is_saved}" == "1"}
    <p>Customer information has been saved.</p>
{if:else}
    <p>No saved customer information found.</p>
{/if}