Snipcart for Statamic
  • Overview
  • Getting Started
    • Installation
    • Configuration
    • Commands
  • Templating
    • Basics
    • Tags
      • Snipcart
      • Currency
      • Length
      • Weight
    • Modifiers
  • Customization
    • Blueprints
    • Translations
  • Advanced
    • Snipcart API
    • Snipcart Webhooks
Powered by GitBook
On this page
  • Add Operator
  • Strip Unit

Was this helpful?

  1. Templating

Modifiers

There are a couple of useful modifiers to help you format variables in your templates.

Add Operator

Use this modifier to prepend the correct operator to a money variable.

{{ price_modifier }} // $1.00
{{ price_modifier | add_operator }} // +$1.00

Strip Unit

Use this modifier to strip a variable's currency, length, or weight unit.

{{ price }} // $19.99
{{ price | strip_unit }} // 19.99

{{ length }} // 10 in
{{ length | strip_unit }} // 10

{{ weight }} // 3.5 oz
{{ weight | strip_unit }} // 3.5
PreviousWeightNextBlueprints

Last updated 1 year ago

Was this helpful?