The list is incomplete. We’re working on it!
current_currency
Returns the currently selected currency. By default in the Storefront this will be store.default_currency. This can be changed in the Settings -> Store Defaults page.
Copy
Ask AI
<%= current_currency %>
Copy
Ask AI
USD
current_locale
Returns the currently selected locale. By default in the Storefront this will be store.default_locale. This can be changed in the Settings -> Store Defaults page. If there are multiple locales available, it will return the locale that is currently selected by the user.
Copy
Ask AI
<%= current_locale %>
Locale also affects the storefront URLs. For example, if the default locale is
en and the user selects fr, the URL will be /fr/products/123.current_order
Show properties
Show properties
The order number
Example:
R123456789The total amount of the order
Example: 99.99
Formatted total with currency
Example: “$99.99”
Sum of all line item amounts pre-tax
Example: 89.99
Formatted item total with currency
Example: “$89.99”
Sum of all adjustments
Example: -10.00
Formatted adjustment total with currency
Example: ”-$10.00”
Sum of all tax amounts
Example: 13.25
Formatted tax total with currency
Example: “$13.25”
Sum of shipment amounts
Example: 10.00
Formatted shipment total with currency
Example: “$10.00”
Sum of all promotion adjustments
Example: -15.00
Formatted promotion total with currency
Example: ”-$15.00”
Sum of included tax amounts
Example: 8.25
Sum of additional tax amounts
Example: 5.00
Sum of completed payment amounts
Example: 99.99
Current order state
Example:
cartCustomer email address
Example:
customer@example.comAssociated user ID
Example: 123
Associated user object
Show properties
Show properties
User ID
Example: 123
User email address
Example:
customer@example.comUser first name
Example:
JohnUser last name
Example:
DoeDefault billing address object
Show properties
Show properties
Address ID
Example: 456
Address line 1
Example:
123 Main StAddress line 2
Example:
Apt 1City
Example:
AnytownZipcode
Example:
12345State name, used when the country doesn’t require a state object
Example:
Some ProvinceReturns either state.name (if state is present) or state_name
Example:
California or Some ProvinceCountry name
Example:
United StatesCountry ISO code
Example:
USCountry object
Show properties
Show properties
Country ID
Example: 1
Country name
Example:
United StatesCountry ISO3 code
Example:
USACountry ISO code
Example:
USCountry ISO name
Example:
UNITED STATESWhether states are required for this country
Example:
trueWhether zipcodes are required for this country
Example:
trueDefault shipping address object
Show properties
Show properties
Address ID
Example: 456
Address line 1
Example:
123 Main StAddress line 2
Example:
Apt 1City
Example:
AnytownZipcode
Example:
12345State name, used when the country doesn’t require a state object
Example:
Some ProvinceReturns either state.name (if state is present) or state_name
Example:
California or Some ProvinceCountry name
Example:
United StatesCountry ISO code
Example:
USCountry object
Show properties
Show properties
Country ID
Example: 1
Country name
Example:
United StatesCountry ISO3 code
Example:
USACountry ISO code
Example:
USCountry ISO name
Example:
UNITED STATESWhether states are required for this country
Example:
trueWhether zipcodes are required for this country
Example:
trueUser tags (tags are used manageable by store admins)
Example:
Copy
Ask AI
["vip", "wholesale"]
When the order was completed (placed and paid). For orders in
cart state, this will be nil.
Example: 2023-06-15 13:45:00Billing address ID
Example: 456
Billing address object
Show properties
Show properties
Address ID
Example: 456
Address line 1
Example:
123 Main StAddress line 2
Example:
Apt 1City
Example:
AnytownZipcode
Example:
12345State name, used when the country doesn’t require a state object
Example:
Some ProvinceReturns either state.name (if state is present) or state_name
Example:
California or Some ProvinceCountry name
Example:
United StatesCountry ISO code
Example:
USCountry object
Show properties
Show properties
Country ID
Example: 1
Country name
Example:
United StatesCountry ISO3 code
Example:
USACountry ISO code
Example:
USCountry ISO name
Example:
UNITED STATESWhether states are required for this country
Example:
trueWhether zipcodes are required for this country
Example:
trueShipping address ID
Example: 457
Shipping address object
Show properties
Show properties
Address ID
Example: 456
Address line 1
Example:
123 Main StAddress line 2
Example:
Apt 1City
Example:
AnytownZipcode
Example:
12345State name, used when the country doesn’t require a state object
Example:
Some ProvinceReturns either state.name (if state is present) or state_name
Example:
California or Some ProvinceCountry name
Example:
United StatesCountry ISO code
Example:
USCountry object
Show properties
Show properties
Country ID
Example: 1
Country name
Example:
United StatesCountry ISO3 code
Example:
USACountry ISO code
Example:
USCountry ISO name
Example:
UNITED STATESWhether states are required for this country
Example:
trueWhether zipcodes are required for this country
Example:
truePayment state (balance_due, credit_owed, failed, paid, void)
Example:
paidShipment state (backorder, canceled, partial, pending, ready, shipped)
Example:
shippedOrder currency
Example:
USDAssociated store ID
Example: 1
Line items in the order
Show properties
Show properties
Line item ID
Example: 123
Quantity of the variant ordered
Example: 2
Unit price of the variant when ordered
Example: 29.99
Formatted unit price with currency
Example: “$29.99”
Total price for this line item (quantity * price)
Example: 59.98
Formatted total price with currency
Example: “$59.98”
Sum of all adjustments for this line item
Example: -5.00
Formatted adjustment total with currency
Example: ”-$5.00”
Sum of additional tax amounts
Example: 4.50
Sum of included tax amounts
Example: 2.75
Sum of promotion adjustments
Example: -10.00
Formatted promotion total with currency
Example: ”-$10.00”
Associated order ID
Example: 456
Associated product variant
Show properties
Show properties
Variant ID
Example: 123
Stock Keeping Unit - unique identifier for the variant
Example: “ABC-123”
Name of the variant (inherited from product)
Example: “Basic T-Shirt”
Formatted string of option values
Example: “Size: Large, Color: Blue”
Full descriptive name including master status or options
Example: “Basic T-Shirt - Size: Large, Color: Blue”
Base price of the variant
Example: 29.99
Formatted price with currency
Example: “$29.99”
Weight of the variant
Example: 1.5
Height of the variant
Example: 10.0
Width of the variant
Example: 5.0
Depth of the variant
Example: 2.0
Whether this is the master variant of the product
Example: false
Display order position
Example: 1
Whether inventory tracking is enabled for this variant
Example: true
Whether the variant is available for purchase (not discontinued and product is available)
Example: true
Whether the variant currently has stock available
Example: true
ID of the associated tax category
Example: 1
Cost price of the variant
Example: 15.00
Currency of the cost price
Example: “USD”
ID of the associated product
Example: 456
Currency of the line item
Example: “USD”
nil.
Order is automatically created when a user adds a product to the cart.
current_store
Show Properties
Show Properties
Store name
Example: “My Store”
Store URL
Example:
https://mystore.comUnique store identifier
Example:
my-storeEmail address used for sending emails
Example:
store@example.comDefault store currency
Example:
USDList of supported currencies
Example:
USD,EUR,GBPDefault store locale
Example:
enList of supported locales
Example:
en,es,frDefault country ID
Example:
1Default country
Show properties
Show properties
Country ID
Example: 1
Country name
Example:
United StatesCountry ISO3 code
Example:
USACountry ISO code
Example:
USCountry ISO name
Example:
UNITED STATESWhether states are required for this country
Example:
trueWhether zipcodes are required for this country
Example:
trueCheckout zone ID
Example:
2SEO title
Example:
My Amazing StoreMeta description for SEO
Example:
The best products at the best pricescurrent_theme
Show properties
Show properties
Theme ID
Example: 1
Theme name
Example:
Winter Sale ThemeCheckout sidebar text color
Example:
#000000Custom font code
Example:
@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');Font family
Example:
InterFont size scale
Example:
100Header font family
Example:
InterHeader font size scale
Example:
100Headings uppercase
Example:
trueButton border thickness
Example:
1Button border opacity
Example:
100Button border radius
Example:
100Button shadow opacity
Example:
0Button shadow horizontal offset
Example:
0Button shadow vertical offset
Example:
4Button shadow blur
Example:
5Input border thickness
Example:
1Input border opacity
Example:
100Input border radius
Example:
8Input shadow opacity
Example:
0Input shadow horizontal offset
Example:
0Input shadow vertical offset
Example:
4Input shadow blur
Example:
5Border width
Example:
1Border radius
Example:
6Border shadow opacity
Example:
0Border shadow horizontal offset
Example:
0Border shadow vertical offset
Example:
4Border shadow blur
Example:
5Product listing image height
Example:
300Product listing image width
Example:
300Product listing image height mobile
Example:
190Product listing image width mobile
Example:
190Primary color
Example:
#000000Accent color
Example:
#F0EFE9Danger color
Example:
#C73528Neutral color
Example:
#999999Background color
Example:
#FFFFFFText color
Example:
#000000Success color
Example:
#00C773Button background color
Example:
#000000Button text color
Example:
#ffffffButton hover background color
Example:
#000000Button hover text color
Example:
#ffffffButton border color
Example:
#000000Border color
Example:
#E9E7DCSidebar border color
Example:
#E9E7DCSecondary button background color
Example:
#000000Secondary button text color
Example:
#ffffffSecondary button hover background color
Example:
#000000Secondary button hover text color
Example:
#ffffffInput text color
Example:
#6b7280Input background color
Example:
#ffffffInput border color
Example:
#000000Input focus border color
Example:
#000000Input focus background color
Example:
#ffffffInput focus text color
Example:
#000000Checkout sidebar background color
Example:
#f3f4f6Checkout divider background color
Example:
#f3f4f6Checkout sidebar text color
Example:
#000000local_time
Displays a time in the user’s timezone in a human readable format (based on the browser’s timezone).
Copy
Ask AI
<%= local_time(order.sent_to_erp_at) %>
supported_currencies
Returns the list of supported currencies for the current store as an array of strings.
Copy
Ask AI
<%= supported_currencies %>
Copy
Ask AI
["USD", "EUR"]
try_spree_current_user
Show properties
Show properties
User ID
Example: 123
User email address
Example:
customer@example.comUser first name
Example:
JohnUser last name
Example:
DoeDefault billing address object
Show properties
Show properties
Address ID
Example: 456
Address line 1
Example:
123 Main StAddress line 2
Example:
Apt 1City
Example:
AnytownZipcode
Example:
12345State name, used when the country doesn’t require a state object
Example:
Some ProvinceReturns either state.name (if state is present) or state_name
Example:
California or Some ProvinceCountry name
Example:
United StatesCountry ISO code
Example:
USCountry object
Show properties
Show properties
Country ID
Example: 1
Country name
Example:
United StatesCountry ISO3 code
Example:
USACountry ISO code
Example:
USCountry ISO name
Example:
UNITED STATESWhether states are required for this country
Example:
trueWhether zipcodes are required for this country
Example:
trueDefault shipping address object
Show properties
Show properties
Address ID
Example: 456
Address line 1
Example:
123 Main StAddress line 2
Example:
Apt 1City
Example:
AnytownZipcode
Example:
12345State name, used when the country doesn’t require a state object
Example:
Some ProvinceReturns either state.name (if state is present) or state_name
Example:
California or Some ProvinceCountry name
Example:
United StatesCountry ISO code
Example:
USCountry object
Show properties
Show properties
Country ID
Example: 1
Country name
Example:
United StatesCountry ISO3 code
Example:
USACountry ISO code
Example:
USCountry ISO name
Example:
UNITED STATESWhether states are required for this country
Example:
trueWhether zipcodes are required for this country
Example:
trueUser tags (tags are used manageable by store admins)
Example:
Copy
Ask AI
["vip", "wholesale"]
Spree.admin_user_class configuration). If the user is not signed in, it will return nil.
If you want to check if the user is signed in, you can use the following:
Copy
Ask AI
<%= try_spree_current_user.present? %>

