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

Has Shipping

{exp:cartthrob:has_shipping} returns whether the current cart has a shipping amount greater than 0.

See also:

Parameters

This tag has no parameters.

Output

This tag returns string values:

  • TRUE when shipping is greater than zero.
  • FALSE when shipping is zero.

The check is based on the cart shipping total (cart->shipping()), cast to float.

Examples

Code:

{exp:cartthrob:has_shipping}

Conditional:

{if "{exp:cartthrob:has_shipping}" == "TRUE"}
    Shipping is applied.
{/if}