Liquid Drops
With every template Shoperb supplies a set of data, which are grouped into objects called Drops. Every drop has set of available fields, and all of them are described below. We are using both global and private drops.
Global Drops
Shoperb has the following set of Drop types:
- Account
- Address
- Array < Collection
- Attribute
- BlogPost
- Cart
- CartItem
- Categories < Collection
- Category
- Collection
- Country
- Currency
- Customer
- Image
- Integration
- Integrations < Collection
- Language
- Link
- MediaFile
- Menu
- Menus < Collection
- Meta
- Order
- OrderItemAttribute < Attribute
- OrderItem
- Page
- Pages < Collection
- PaymentMethod
- ProductAttribute < Attribute
- ProductCollection
- ProductCollections < Collection
- Product
- ProductType
- ProductTypes < Collection
- Products < Collection
- Review
- Search
- ShippingItem
- ShippingMethod
- ShippingParcel
- Shop
- ThemeSectionBlocks < Collection
- ThemeSection
- ThemeSectionImage < Image
- ThemeSectionSettings < ThemeSettings
- ThemeSettings
- Url::Get
- Url::Post
- VariantAttribute < Attribute
- Variant
- Variants < Collection
- Vendor
Private Drops
Private drops are made available only for specific templates.
Account
account.shops
Returns list of account's shops.
Address
address.first_name
Returns addresses's owners first name.
<span>{{ address.first_name }}</span>
<span>John</span>
address.last_name
Returns addresses's owners last name.
<span>{{ address.last_name }}</span>
<span>Doe</span>
address.full_name
Returns addresses's owners full name.
<span>{{ address.full_name }}</span>
<span>John Doe</span>
address.company
Returns addresses's company name.
<span>{{ address.company }}</span>
<span>Perfectline</span>
address.email
Returns addresses's owners email.
<span>{{ address.email }}</span>
<span>john.doe@example.com</span>
address.phone
Returns addresses's owners phone.
<span>{{ address.phone }}</span>
<span>777555772</span>
address.full_address
Returns addresses's address1 and address2 fields concatenated.
<span>{{ address.full_address }}</span>
<span>Meistri 12, fourth floor</span>
address.company_with_phone
Returns addresses's company name and phone fields concatenated.
<span>{{ address.comapny_with_phone }}</span>
<span>Perfectline, 777555772</span>
address.city_state_with_zip
Returns addresses's city, state, and zip fields concatenated.
<span>{{ address.city_state_with_zip }}</span>
<span>Tallinn, Harjumaa, 13517</span>
address.street
Alias for full_address.
address.address1
Returns addresses's address1 field.
<span>{{ address.address1 }}</span>
<span>Meistri 12</span>
address.address2
Returns addresses's address2 field.
<span>{{ address.address2 }}</span>
<span>Fourth floor</span>
address.city
Returns addresses's city field.
<span>{{ address.city }}</span>
<span>Tallinn</span>
address.state
Returns addresses's state's name.
<span>{{ address.state }}</span>
<span>Harjumaa</span>
address.country
Returns addresses's country's name.
<span>{{ address.country }}</span>
<span>Estonia</span>
address.state_code
Returns addresses's state's code.
<span>{{ address.state_code }}</span>
<span>HR</span>
address.country_code
Returns addresses's country's code.
<span>{{ address.country_code }}</span>
<span>EST</span>
address.url
Returns addresses's url for editing.
<a href="{{ address.url }}">Edit Address</a>
<a href="/addresses/1/edit">Edit Address</a>
Attribute
attribute.id
Returns attributes's id.
<span>{{ attribute.id }}</span>
<span>1</span>
attribute.handle
Returns attribute's handle.
<span>{{ attribute.handle }}</span>
<span>color</span>
attribute.name
Returns attribute's name.
<span>{{ attribute.name }}</span>
<span>Color</span>
attribute.value
Returns attribute's value.
<span>{{ attribute.value }}</span>
<span>Green</span>
BlogPost
blogpost.id
Returns blogposts's id.
<span>{{ blogpost.id }}</span>
<span>1</span>
blogpost.name
Returns blogposts's name.
<span>{{ blogpost.name }}</span>
<span>My First Blog Post</span>
blogpost.handle
Returns blogpost's handle.
<span>{{ blogpost.handle }}</span>
<span>my-first-blog-post</span>
blogpost.content
Returns blogpost's content (html).
<span>{{ blogpost.content }}</span>
<span><p>Some content</p><p>Some more content</p></span>
blogpost.published_at
Returns blogpost's published_at time.
<span>{{ blogpost.published_at }}</span>
<span>2018-04-26T11:49:39</span>
blogpost.next
Returns blogpost's next blogpost.
blogpost.prev
Returns blogpost's previous blogpost.
blogpost.next_prev_stat
blogpost.url
Returns blogpost's url.
<a href="{{ blogpost.url }}">Read more</a>
<a href="/blog-posts/my-first-blog-post">Read more</a>
Cart
cart.total
Returns cart's total amount.
<span>{{ cart.total }}</span>
<span>103.17</span>
cart.weight
Returns cart's weight.
<span>{{ cart.weight }}</span>
<span>1.45</span>
cart.discount_code
Returns cart's discount code.
<span>{{ cart.discount_code }}</span>
<span>nipitiri</span>
cart.quantity
Returns cart's product count.
<span>{{ cart.quantity }}</span>
<span>7</span>
cart.requires_shipping?
Returns whether cart requires shipping or not.
<span>{{ cart.requires_shipping? }}</span>
<span>true</span>
cart.items
Returns list of cart's cartitems.
cart.notes
Returns cart's notes.
<span>{{ cart.notes }}</span>
<span>some comment left by the user</span>
CartItem
cartitem.id
Returns cartitems's id.
<span>{{ cartitem.id }}</span>
<span>1</span>
cartitem.sku
Returns cartitem's sku.
<span>{{ cartitem.sku }}</span>
<span>SKU-7587337</span>
cartitem.name
Returns cartitem's name.
<span>{{ cartitem.name }}</span>
<span>Blue T-Shirt</span>
cartitem.quantity
Returns cartitem's quantity.
<span>{{ cartitem.quantity }}</span>
<span>3</span>
cartitem.stock
According to code, shouldn't even work (or i missed something)
cartitem.weight
Returns single cartitem's weight (not multiplied by quantity).
<span>{{ cartitem.weight }}</span>
<span>0.17</span>
cartitem.price
Returns cartitem's price (not multiplied by quantity).
<span>{{ cartitem.price }}</span>
<span>13.17</span>
cartitem.discount_price
Returns cartitem's discounted price.
<span>{{ cartitem.discount_price }}</span>
<span>10.17</span>
cartitem.active_price
Returns cartitem's active price.
<span>{{ cartitem.active_price }}</span>
<span>10.17</span>
cartitem.discount?
Returns whether cartitem has discount applied.
<span>{{ cartitem.discount? }}</span>
<span>true</span>
cartitem.discount_start
Returns cartitem's discounts start time.
<span>{{ cartitem.discount_start }}</span>
<span>3</span>
cartitem.discount_end
Returns cartitem's discounts end time.
<span>{{ cartitem.discount_end }}</span>
<span>3</span>
cartitem.total
Returns cartitem's total price (multiplied by quantity).
<span>{{ cartitem.total }}</span>
<span>40.2</span>
cartitem.total_weight
Returns cartitem's weight (multiplied by quantity).
<span>{{ cartitem.total_weight }}</span>
<span>3</span>
cartitem.requires_taxing?
Returns whether cartitem requires taxing.
<span>{{ cartitem.requires_taxing? }}</span>
<span>true</span>
cartitem.requires_shipping?
Returns whether cartitem requires shipping.
<span>{{ cartitem.requires_shipping? }}</span>
<span>true</span>
cartitem.digital?
Returns whether cartitem is digital.
<span>{{ cartitem.digital? }}</span>
<span>false</span>
cartitem.vendor
Returns cartitem's vendor.
cartitem.type
Returns cartitem's type.
cartitem.product
Returns cartitem's product.
cartitem.variant
Returns cartitem's variant.
Categories
categories.roots
Returns list of root categories.
Category
category.id
Returns category's id.
<span>{{ category.id }}</span>
<span>1</span>
category.name
Returns category's name.
<span>{{ category.name }}</span>
<span>Category Name</span>
category.handle
Returns category's handle.
<span>{{ category.handle }}</span>
<span>category-handle</span>
category.parent
Returns category's parent category.
category.level
Returns category's level.
<span>{{ category.level }}</span>
<span>1</span>
category.url
Returns category's url.
<a href="{{ category.url }}">{{ category.name }}</a>
<a href="/categories/category-handle">Category Name</a>
category.image
Returns category's image.
category.root
Returns category's top parent category.
category.root?
Returns whether category is root category.
<span>{{ category.root? }}</span>
<span>true</span>
category.current?
Returns whether category is the category currently open with category url.
<span>{{ category.current? }}</span>
<span>true</span>
category.open?
Returns whether category is child of current category.
<span>{{ category.open? }}</span>
<span>false</span>
category.parents
Returns list of categories category belongs to.
category.children
Returns list of categories under category.
category.children?
Returns whether category has children.
<span>{{ category.children? }}</span>
<span>false</span>
category.products
Returns list of products under category.
category.products_with_children
Returns list of products under category and category's child-categories.
Collection
collection.each
collection.count
collection.size
collection.any?
collection.many?
collection.one?
collection.empty?
collection.first
collection.last
collection.to_json
collection.pluck(key)
Country
country.code
Returns country's code.
<span>{{ country.code }}</span>
<span>EE</span>
country.name
Returns country's name.
<span>{{ country.name }}</span>
<span>Estonia</span>
country.iso3
Returns country's iso3.
<span>{{ country.iso3 }}</span>
<span>EST</span>
country.numeric
Returns country's numeric.
<span>{{ country.numeric }}</span>
<span>233</span>
country.eu
Returns whether country is in EU.
<span>{{ country.eu }}</span>
<span>true</span>
country.na
Returns whether country is in North America.
<span>{{ country.na }}</span>
<span>false</span>
country.abstract
Returns whether country is abstract.
<span>{{ country.abstract }}</span>
<span>false</span>
country.states_json
Returns country's states in json.
<span>{{ country.states }}</span>
<span>[{"name":"Harjumaa","code":"EE-37"},{"name":"Tartumaa","code":"EE-78"},...]</span>
Currency
currency.name
Returns currency's name.
<span>{{ currency.name }}</span>
<span>Euro</span>
currency.code
Returns currency's code.
<span>{{ currency.code }}</span>
<span>EUR</span>
currency.symbol
Returns currency's symbol.
<span>{{ currency.symbol }}</span>
<span>€</span>
Customer
customer.name
Returns customer's full name.
<span>{{ customer.name }}</span>
<span>John Doe</span>
customer.first_name
Returns customer's first name.
<span>{{ customer.first_name }}</span>
<span>John</span>
customer.last_name
Returns customer's last name.
<span>{{ customer.last_name }}</span>
<span>Doe</span>
customer.email
Returns customer's email address.
<span>{{ customer.email }}</span>
<span>john.doe@gmail.com</span>
customer.accepts_newsletter?
Returns if customer accepts newsletters.
<input type="checkbox" id="newsletter" name="customer[newsletter]"
value="1" {% if customer.accepts_newsletter? %}checked="checked"{% endif %}>
<input type="checkbox" id="newsletter" name="customer[newsletter]"
value="1" checked="checked" />
customer.registred?
Returns whether customer is registered.
<span>{{ customer.registered? }}</span>
<span>true</span>
customer.discount_pct
Returns customer's discount percentage.
<span>{{ customer.discount_pct }}</span>
<span>20</span>
customer.last_billing_address
Returns customer's last billing address.
customer.last_shipping_address
Returns customer's last shipping address.
customer.addresses
Returns list of addresses under customer.
customer.orders
Returns list of orders under customer.
customer.logged_in?
Returns whether customer is logged in.
<span>{{ customer.logged_in? }}</span>
<span>true</span>
customer.recommended_products
Returns list of recommended products for customer.
customer.company?
Returns whether customer is a company.
<span>{{ customer.company? }}</span>
<span>false</span>
customer.personal?
Returns whether customer is a person.
<span>{{ customer.personal? }}</span>
<span>true</span>
customer.company_name
Returns customer's company name.
<span>{{ customer.company_name }}</span>
<span>Company OÜ</span>
customer.vat_number
Returns customer's vat_number.
<span>{{ customer.vat_number }}</span>
<span>37887287</span>
Image
image.width
Returns image's width.
<span>{{ image.width }}</span>
<span>1280</span>
image.height
Returns image's height.
<span>{{ image.height }}</span>
<span>720</span>
image.url
Returns image's url.
<img src="{{ image.url }}">
<img src="https://...">
image.aspect_ratio
Returns image's aspect ratio.
<img src="{{ image.aspect_ratio }}">
<img src="https://...">
Integration
integration.id
Returns integration's id.
<span>{{ integration.id }}</span>
<span>1</span>
integration.name
Returns integration's name.
<span>{{ integration.name }}</span>
<span>Google Analytics</span>
integration.handle
Returns integration's handle.
<span>{{ integration.handle }}</span>
<span>google-analytics</span>
integration.code_layout
Returns integration's html.
<span>{{ integration.code_layout }}</span>
<span><script "type"="javascript">...</script></span>
integration.count
Returns integration's count.
<span>{{ integration.count }}</span>
<span>1</span>
Integrations
integrations.head
Returns list of integrations for head tag.
integrations.start_body
Returns list of integrations for start of body tag.
integrations.end_body
Returns list of integrations for end of body tag.
Language
language.name
Returns language's name.
<span>{{ language.name }}</span>
<span>Estonian</span>
language.code
Returns language's code.
<span>{{ language.code }}</span>
<span>EST</span>
language.active?
Returns whether language is active.
<span>{{ language.active? }}</span>
<span>true</span>
Link
link.url
Returns link's url.
<a href="{{ link.url }}">{{ link.name }}</a>
<a href="/about">About</a>
link.index_action?
Returns whether link is an index action.
<span>{{ language.index_action? }}</span>
<span>false</span>
link.menu
Returns link's menu.
link.name
Returns link's name.
<span>{{ link.name }}</span>
<span>About</span>
link.handle
Returns link's handle.
<span>{{ link.handle }}</span>
<span>about</span>
link.object
Returns link's object.
<span>{{ link.object.id }}</span>
<span></span>
link.object?
Returns whether link has object.
<span>{{ link.object? }}</span>
<span>false</span>
link.parent
Returns link's parent.
link.children
Returns list of links under link.
link.children?
Returns whether link has children.
<span>{{ link.children? }}</span>
<span>true</span>
link.style
Returns link's style.
One of home, search, product, products, category, page, blog_posts, blog_post, collection, collections, custom, blank
<span>{{ link.style }}</span>
<span>page</span>
MediaFile
mediafile.id
Returns mediafile's id.
<span>{{ mediafile.id }}</span>
<span>1</span>
mediafile.mime
Returns mediafile's mime type.
<span>{{ mediafile.mime }}</span>
<span>application/text</span>
mediafile.extension
Returns mediafile's extension.
<span>{{ mediafile.extension }}</span>
<span>txt</span>
mediafile.filename
Returns mediafile's filename.
<span>{{ mediafile.filename }}</span>
<span>my-file.txt</span>
mediafile.url
Returns mediafile's url.
<a href="{{ mediafile.url }}">{{ mediafile.filename }}</a>
<a href="...">my-file.txt</span>
mediafile.image?
Returns whether mediafile is an image.
<span>{{ mediafile.image? }}</span>
<span>false</span>
Menu
Selecting menu for examples {% assign menu = menus['footer'] %}
menu.id
Returns menu's id.
<span>{{ menu.id }}</span>
<span>1</span>
menu.name
Returns menu's name.
<span>{{ menu.name }}</span>
<span>My Menu</span>
menu.handle
Returns menu's handle.
<span>{{ menu.handle }}</span>
<span>my-menu</span>
menu.links
Returns list of all of menu's links.
menu.root_links
Returns list of menu's root links.
Menus
menus.links
Meta
meta.title
Returns meta's title.
<head>
<title>{{ meta.title }}</title>
</head>
<head>
<title>My Product</title>
</head>
meta.description
Returns meta's description.
<head>
<meta name="description" content="{{ meta.description }}">
</head>
<head>
<meta name="description" content="My Products description">
</head>
meta.keywords
Returns meta's keywords.
<head>
<meta name="keywords" content="{{ meta.keywords }}">
</head>
<head>
<meta name="keywords" content="My Products keywords">
</head>
Order
order.name
order.number
order.token
order.email
order.total
order.total_items
order.total_wo_discount
order.subtotal
order.subtotal_wo_discount
order.total_shipping
order.total_taxes
order.requires_shipping?
order.requires_taxation?
order.created_at
order.state
order.notes
order.discount_code
order.neto_discount
order.bruto_discount
order.shipping_method
order.payment_method
order.billing_address
order.shipping_address?
order.shipping_address
order.items
order.customer
order.currency
order.url
order.payment_url
OrderItem
orderitem.name
orderitem.quantity
orderitem.qty
orderitem.sku
orderitem.attributes
orderitem.weight
orderitem.width
orderitem.height
orderitem.depth
orderitem.price
orderitem.subtotal
orderitem.total
orderitem.total_weight
orderitem.total_taxes
orderitem.requires_shipping?
orderitem.digital?
orderitem.url
orderitem.requires_taxation?
orderitem.category
orderitem.product_id
orderitem.product_name
OrderItemAttribute
orderitemattribute.
Page
page.id
Returns page's id.
<span>{{ page.id }}</span>
<span>1</span>
page.name
Returns page's name.
<span>{{ page.name }}</span>
<span>About</span>
page.handle
Returns page's handle.
<span>{{ page.handle }}</span>
<span>about</span>
page.content
Returns page's content.
{{ page.url }}
<HTML...>
page.url
Returns page's url.
<a href="{{ page.url }}">{{ page.name }}</a>
<a href="/about">About</a>
Pages
Collection
pages.
PaymentMethod
paymentmethod.name
Returns paymentmethod's name.
<span>{{ paymentmethod.name }}</span>
<span>Swedbank</span>
paymentmethod.provider
Alias for name.
paymentmethod.state
Returns paymentmethod's state (active or hidden).
<span>{{ paymentmethod.state }}</span>
<span>active</span>
paymentmethod.invoice_instructions
Returns paymentmethod's invoice instructions.
<span>{{ paymentmethod.invoice_instructions }}</span>
<span>Text to put on invoices</span>
paymentmethod.checkout_instructions
Returns paymentmethod's checkout instructions.
<span>{{ paymentmethod.checkout_instructions }}</span>
<span>Text to put on checkout</span>
ProductAttribute
Product
product.id
Returns product's id.
<span>{{ product.id }}</span>
<span>1</span>
product.name
Returns product's name.
<span>{{ product.name }}</span>
<span>My Product</span>
product.handle
Returns product's handle.
<span>{{ product.handle }}</span>
<span>my-product</span>
product.url
Returns product's url.
<a href="{{ product.url }}">{{ product.name }}</a>
<a href="/products/my-product">My Product</a>
product.reviews_url
Returns the URL for product reviews page.
<a href="{{ product.reviews_url }}">See all</a>
<a href="/products/my-product/reviews">See all</a>
product.max_price
Returns product's max price.
<span>{{ product.max_price }}</span>
<span>13.17</span>
product.min_price
Returns product's min price.
<span>{{ product.min_price }}</span>
<span>11.17</span>
product.price
Alias for min price.
product.min_discount_price
Returns product's min discount price.
<span>{{ product.min_discount_price }}</span>
<span>8.17</span>
product.max_discount_price
Returns product's max discount price.
<span>{{ product.min_discount_price }}</span>
<span>9.17</span>
product.min_active_price
Returns product's min active price.
<span>{{ product.min_active_price }}</span>
<span>8.17</span>
product.max_active_price
Returns product's max active price.
<span>{{ product.max_active_price }}</span>
<span>9.17</span>
product.available?
Returns whether product is available.
<span>{{ product.available? }}</span>
<span>true</span>
product.reviewable?
Returns true if the product is reviewable by current customer.
<span>{{ product.reviewable? }}</span>
<span>true</span>
product.rating
Returns the average review rating for the product.
<span>{{ product.rating }}</span>
<span>4.5</span>
product.description
Returns product's description.
<span>{{ product.description }}</span>
<span>My Products description</span>
product.options
Returns product's attributes values.
<span>{{ product.options }}</span>
<span></span>
product.category
Returns product's category.
product.vendor
Returns product's vendor.
product.type
Returns product's type.
product.variants
Returns list of product's variants.
product.available_variants
Returns list of product's available variants.
product.image
Returns product's image.
product.images
Returns list of product's images.
product.attributes
Returns list of product's attributes.
product.variant_properties
Returns list of product's variant attributes.
product.others_in_category
Returns list of products in category.
product.similar_products
Returns list of similar products.
product.tags
Returns list of product's tags.
product.reviews
Returns list of product's reviews.
Products
Collection
ProductCollection
productcollection.id
Returns productcollection's id.
<span>{{ productcollection.id }}</span>
<span>1</span>
productcollection.name
Returns productcollection's name.
<span>{{ productcollection.name }}</span>
<span>My Collection</span>
productcollection.handle
Returns productcollection's handle.
<span>{{ productcollection.handle }}</span>
<span>my-collection</span>
productcollection.image
Returns productcollection's image.
productcollection.url
Returns productcollection's url.
<a href="{{ productcollection.url }}">{{ productcollection.name }}</a>
<a href="/collections/my-collection">My Collection</a>
productcollection.description
Returns productcollection's handle.
<span>{{ productcollection.handle }}</span>
<span>my-collection</span>
productcollection.products
ProductCollections
Collection
ProductType
producttype.id
Returns producttype's id.
<span>{{ producttype.id }}</span>
<span>1</span>
producttype.name
Returns producttype's name.
<span>{{ producttype.name }}</span>
<span>My Product Type</span>
producttype.handle
Returns producttype's handle.
<span>{{ producttype.handle }}</span>
<span>my-product-type</span>
ProductTypes
Collection
Returns list of ProductType
product_types.each
Review
review.title
review.body
review.rating
review.created_at
review.customer
review.product
Search
ShippingItem
shippingitem.product_name
shippingitem.amount
ShippingMethod
shippingmethod.name
shippingmethod.rate
shippingmethod.provider
shippingmethod.provider_box
shippingmethod.tracking_number
ShippingParcel
shippingparcel.barcode
shippingparcel.number
shippingparcel.state
shippingparcel.order
shippingparcel.shipping_items
Shop
shop.name
Returns shop's name.
<span>{{ shop.name }}</span>
<span>My Shop</span>
shop.email
Returns shop's email.
<span>{{ shop.email }}</span>
<span>email@example.com</span>
shop.domain
Returns shop's domain.
<span>{{ shop.domain }}</span>
<span>my-shop</span>
shop.meta_title
Returns shop's meta title.
<head>
<title>{{ shop.meta_title }}</title>
</head>
<head>
<title>My Shop</title>
</head>
shop.meta_keywords
Returns shop's meta keywords.
<head>
<meta name="keywords" content="{{ shop.meta_keywords }}">
</head>
<head>
<meta name="keywords" content="My Shops keywords">
</head>
shop.meta_description
Returns shop's meta description.
<head>
<meta name="description" content="{{ shop.meta_description }}">
</head>
<head>
<meta name="description" content="My Shops description">
</head>
shop.current?
shop.metric?
Propose changing to shop.weight_system that returns either metric or imperial
shop.reviews?
Returns true if reviews are enabled in current store.
shop.address
Returns shop's address.
shop.language
Returns shop's language.
shop.current_locale
Returns shop's current locale.
<span>{{ shop.current_locale }}</span>
<span>en-US</span>
shop.possible_languages
Propose changing to shop.available_languages
shop.currency
Returns shop's currency.
shop.account
Returns shop's account.
shop.customer_accounts
shop.account_types
shop.google_analytics
ThemeSection
themesection.id
themesection.blocks
themesection.settings
themesection.type
ThemeSectionBlocks
Collection
themesectionblocks.each
ThemeSectionImage
Image
themesectionimage.each
ThemeSectionSettings
ThemeSettings
themesectionsettings.each
ThemeSettings
themesettings.
Url::Get
url.root
url.products
url.collections
url.cart
url.signup
url.login
url.logout
url.account
url.recover
url.reset
url.orders
url.addresses
url.new_address
url.search
url.blog
url.current_url
url.current_path
url.canonical_url
url.canonical_path
url.current_host
Url::Post
form_actions.cart_add
form_actions.cart_checkout
form_actions.cart_update
form_actions.signup
form_actions.new_login
form_actions.account
form_actions.password_request
form_actions.password_change
form_actions.reviews
form_actions.address_create
form_actions.auth_input
Variant
variant.id
Returns variant's id.
<span>{{variant.id}}</span>
<span>1</span>
variant.name
Returns variant's name.
<span>{{variant.name}}</span>
<span>color: green, size: M</span>
variant.price
Returns variant's price.
<span>{{variant.price}}</span>
<span>11</span>
variant.discount_price
Returns variant's discount price.
<span>{{variant.discount_price}}</span>
<span>10</span>
variant.discount?
Returns whether variant has discount.
<span>{{variant.discount?}}</span>
<span>true</span>
variant.discount_period?
Returns whether variant's discount works during a certain time.
<span>{{variant.discount_period?}}</span>
<span>true</span>
variant.discount_start
Returns when variant's discount starts to work.
<span>{{variant.discount_start}}</span>
<span>2018-05-10T00:00:00</span>
variant.discount_end
Returns when variant's discount stops working.
<span>{{variant.discount_end}}</span>
<span>2018-05-10T00:00:00</span>
variant.current_price
Returns variant's current_price.
<span>{{variant.current_price}}</span>
<span>10</span>
variant.available?
Returns whether variant is in stock.
<span>{{variant.available?}}</span>
<span>true</span>
variant.sku
Returns when variant's sku.
<span>{{variant.sku}}</span>
<span>SKU-0001</span>
variant.stock
Returns variant's stock count.
<span>{{variant.stock}}</span>
<span>25</span>
variant.weight
Returns variant's weight.
<span>{{variant.weight}}</span>
<span>100</span>
variant.width
Returns variant's width.
<span>{{variant.width}}</span>
<span>100</span>
variant.height
Returns variant's height.
<span>{{variant.height}}</span>
<span>100</span>
variant.depth
Returns variant's depth.
<span>{{variant.depth}}</span>
<span>100</span>
variant.digital
Returns whether variant is digital.
<span>{{variant.digital}}</span>
<span>false</span>
variant.url
Returns variant's digital file url.
<a href="{{variant.url}}">DOWNLOAD</a>
<a href="...">DOWNLOAD</a>
variant.options
Returns variant's attribute's values as a list.
{% for option in variant.options %}
<span>{{ option }}</span>
{% endfor %}
<span>green</span>
<span>M</span>
variant.image
Returns variant's image.
variant.images
Returns list of variant's images.
variant.attributes
Returns list of variant's attributes.
VariantAttribute
Attribute
Variants
variants.order_by_price
Returns list of variants ordered by price.
variants.order_by_sku
Returns list of variants ordered by sku.
Vendor
Should be renamed to brands
vendor.id
Returns vendor's id.
<span>{{vendor.id}}</span>
<span>1</span>
vendor.name
Returns vendor's name.
<span>{{vendor.name}}</span>
<span>Acme</span>
Subscription
subscription.id
Returns subscription id
subscription.plan
Returns subscription plan drop
subscription.auto_collection?
Returns boolean which shows if subscription is automatically charging money each month.
subscription.active?
Returns boolean which shows if subscription is active right now.
subscription.in_trial?
Returns boolean which shows if subscription is in trial period right now.
subscription.qty
Returns how much subscriptions you are subcribed.
subscription.starts_at
Returns when subscriptions has been started.
subscription.ends_at
Returns when subscription has been ended.
subscription.trial_starts_at
Returns when subscription trial has been started.
subscription.trial_ends_at
Returns when subscription trial has been ended.
subscription.deleted?
Returns boolean which shows if subscription is deleted.
subscription.delete_url
Returns url to delete subscription.
SubscriptionPlan
subscritpionplan.id
Returns subscription plan id
subscritpionplan.name
Returns subscription plan name.
subscritpionplan.invoice_name
Returns subscription plan name for invoice.
subscritpionplan.description
Returns subscription plan description.
subscritpionplan.handle
Returns subscription plan handle.
subscritpionplan.interval
Returns subscription plan interval which can be year, month or day. Usually it is month.
subscritpionplan.interval_count
Returns after how many intervals next billing period will be called.
subscritpionplan.price
Returns how much subscription costs.
subscritpionplan.setup_cost
Returns how much subscription creation costs.
subscritpionplan.trial_interval
Returns subscription plan trial interval which can be year, month or day.
subscritpionplan.trial_interval_count
Returns after how many trial intervals trial period lasts.
subscritpionplan.create_subscription_url
Returns url to create new subscription.
PaymentCard
paymentcard.id
Returns payment card id.
paymentcard.url
Returns url to edit/show payment card.
paymentcard.delete_url
Returns url to delete payment card.
paymentcard.service
Returns payment card service name. Right now the only value is stripe
paymentcard.card
Returns hash data with card information. Example:
{
"name"=>nil,
"brand"=>"Visa",
"last4"=>"4242",
"country"=>"US",
"exp_year"=>2022,
"exp_month"=>11,
"type"=>"credit"
}