# 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:

# 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>EE</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

# blog_post.id

Returns blog posts's id.

<span>{{ blog_post.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.image

Returns Blogpost's main image. Can be used as preview image

# 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.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

Returns the number of items in the collection

# collection.size

Returns the number of items in the collection

# collection.any?

Returns true if the collection has at least one item

# collection.many?

Returns true if the collection has more than one item

# collection.one?

Returns true if collection has one item.

# collection.empty?

Returns true if the collection is empty

# collection.first

Returns the first item in the collection

# collection.last

Returns the last item in the collection

# 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.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>

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>

Returns link's url.

<a href="{{ link.url }}">{{ link.name }}</a>
<a href="/about">About</a>

Returns whether link is an index action.

<span>{{ language.index_action? }}</span>
<span>false</span>

Returns link's menu.

Returns link's name.

<span>{{ link.name }}</span>
<span>About</span>

Returns link's handle.

<span>{{ link.handle }}</span>
<span>about</span>

Returns link's object.

<span>{{ link.object.id }}</span>
<span></span>

Returns whether link has object.

<span>{{ link.object? }}</span>
<span>false</span>

Returns link's parent.

Returns list of links under link.

Returns whether link has children.

<span>{{ link.children? }}</span>
<span>true</span>

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>

Selecting menu for examples {% assign menu = menus['footer'] %}

Returns menu's id.

<span>{{ menu.id }}</span>
<span>1</span>

Returns menu's name.

<span>{{ menu.name }}</span>
<span>My Menu</span>

Returns menu's handle.

<span>{{ menu.handle }}</span>
<span>my-menu</span>

Returns list of all of menu's links.

Returns list of menu's root links.

Returns list of all 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

# order.invoice_url

return the url for the order invoice

# OrderItem

# orderitem.name

Returns the name of the product associated with the item, relative to time of order.

# 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

Returns the current name of product, or nil if the product was deleted

# orderitem.image

Returns the image associated with the item or null.

# OrderItemAttribute

# orderitemattribute.

# OrderReturn (order_return)

# order_return.delivery_date

# order_return.comment

# order_return.items

# order_return.parcel

# order_return.url

# order_return.state

# order_return.generate_parcel_url

# 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.

# Paginate

# paginate.pages

number of pages

# paginate.total

total results,

# paginate.last

last element index

# paginate.size

size of collection

# paginate.offset

how many results are skipped

# paginate.first

first page number

# paginate.page

number of current page

# paginate.previous

previous page link

# paginate.next

next page link

# paginate.parts

an array of links. Part may include:

Key Description
title the title of the part, as numer, or &hellip; if an ellipsis
is_link boolean to know if the part is a link
url url to the page of the part
current boolean to check if this is the current page

# paginate.collection

collection of your objects used with {% paginate object by number %} declaration for the current page

# PaymentMethod (payment_method)

# payment_method.name

Returns payment_method's name.

<span>{{ payment_method.name }}</span>
<span>Swedbank</span>

# payment_method.provider

Alias for name.

# payment_method.state

Returns payment_method's state (active or hidden).

<span>{{ payment_method.state }}</span>
<span>active</span>

# payment_method.invoice_instructions

Returns payment_method's invoice instructions.

<span>{{ payment_method.invoice_instructions }}</span>
<span>Text to put on invoices</span>

# payment_method.checkout_instructions

Returns payment_method's checkout instructions.

<span>{{ payment_method.checkout_instructions }}</span>
<span>Text to put on checkout</span>

# ProductAttribute

Returns an Attribute drop

# 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.market_price

<span>{{ product.market_price }}</span>
<span>19.99</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.

It is possible to get different sizes of the image, by using image.size-*. Possible sizes are 160, 240, 480, 720 and 2048px wide.

Example:

{{ product.image.size-240.url }}

# 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.

# product.variant_attributes

Returns a hash with a map of all possible attributes, title and values.

Example:

{
  attribute.not_translated_name: {
    title: "Attribute translated name", 
    values: ["One", "Two"]
  }
}

# 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

Returns list of 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 (product_types)

Collection

Returns list of ProductType

# product_types.each

# Review

# review.title

Returns the title of the review

Example:

<span>{{ review.title }}</span>

Output:

this is a review title 

# review.body

Returns the body of the review in plain text

Example:

<span>{{ review.body }}</span>

Output:

This just an example for a body of a review 

# review.rating

Returns rating for the review, as integer.

Example:

<span>{{ review.rating }}</span>

Output:

4 

# review.created_at

Returns the date, in full format.

Example:

<span>{{ review.created_at }}</span>

Output:

Tue, 23 Apr 2019 08:32:07 UTC +00:00 

Can be used with a filter to format the string, using ruby time formatting

<span>{{ review.created_at | date: '%B %e %Y' }}</span>

Output:

April 23 2019

# review.customer

Returns the name of the customer who wrote the review

Example:

<span>{{ review.customer }}</span>

Output:

John Doe 

# review.product

Example:

<span>{{ review.product }}</span>

Returns the product associated with the review

# search.size

Returns the size (number) of results

Example:

<span>{{ search.size }}</span>

Output:

5 

# ShippingMethod (shipping_method)

# shipping_method.name

# shipping_method.rate

# shipping_method.provider

# shipping_method.provider_box

# shipping_method.tracking_number

# ShippingParcel (shipping_parcel)

can only be used inside email templates

# shipping_parcel.barcode

# shipping_parcel.number

# shipping_parcel.state

# shipping_parcel.order

# shipping_parcel.shipping_items

# Shop

Shoperb has various elements that apply on the higher store/account level. These are things like store name, contact information, as well as other elements that are related to checkout, languages and currencies.

# 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="META Keywords Content">
</head>

# shop.meta_description

Returns shop's meta description.

<head>
  <meta name="description" content="{{ shop.meta_description }}">
</head>
<head>
  <meta name="description" content="META Description Content">
</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

Shoperb has three options for managing customer accounts. Customer accounts can be either required, optional or disabled.

Most common use case is to show or hide account links from navigation when customer accounts are disabled. For that we can use a simple boolean check. In the following statement if customer accounts is either required or optional, we show account link.

{% if shop.customer_accounts? %}
  <a href="{{ url.account }}">{{ 'account.my_account' | translate }}</a>
{% endif %}

In more complex cases you may want to use the more specific customer account values. While there is very little reason to expose the specific string by using shop.customer_accounts you do get same results as above by using string comparison.

{% if shop.customer_accounts != "disabled" %}
  <a href="{{ url.account }}">{{ 'account.my_account' | translate }}</a>
{% endif %}

# shop.account_types

Shoperb has two customer account types - personal and business accounts. You can as well use a value of both that applies when either account type is enabled.

{% if shop.account_types == "both" %}
  <div>Content that applies to both <strong>Personal</strong> and <strong>Business</strong> customer accounts</div>
{% elsif shop.account_types == "personal" %}
  <div>Content that applies to both <strong>Personal</strong> customer accounts</div>
{% elsif shop.account_types == "business" %}
  <div>Content that applies to both <strong>Business</strong> customer accounts</div>
{% endif %}

# 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

always Returns locale url (e.g. /en/orders)

# url.root

Returns the url for index

# url.products

Returns the url for products

# url.collections

Returns the url for store collections

# url.cart

Returns the url for cart page

# url.signup

Returns the url for signup page

# url.login

Returns the url for login page

# url.logout

Returns the url for logout page

# url.account

Returns the url for account page

# url.recover

Returns the url for password recover

# url.reset

Returns the url for password reset

# url.orders

Returns the url for orders

# url.addresses

Returns the url for user addresses

# url.new_address

Returns the url for new address creation

Returns the url for search page

# url.blog

Returns the url for blog page

# url.current_url

Returns the url for the current page

# url.current_path

Returns the path part of the current url (e.g. /en/account)

# url.canonical_url

Returns canonical url for the current url

# url.canonical_path

Returns canonical relative url for the current url

# url.current_host

Returns the current host (e.g. localhost) or domain

# url.billing_payment_methods

Returns the url for user payment methods page

# url.new_billing_payment_method

Returns the url for creating a new billing method

# Url::Post (form_actions)

# 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.variants

# 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.state

Returns the status of the subscription

<span>{{subscription.state}}</span>
<span>active</span>

# 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 many times the subscription is for

<span>{{subscription.qty}}</span>
<span>3</span>

# subscription.starts_at

Returns when subscriptions has been started.

<span>{{subscription.starts_at}}</span>
<span>2019-07-11T09:34:01.015Z</span>

Can also be configured to use specific date format

<span>{{subscription.starts_at | date: '%d %b %Y' }}</span>
<span>11 Jul 2019</span>

# 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

# subscription_plan.id

Returns subscription plan id

# subscription_plan.name

Returns subscription plan name.

# subscription_plan.invoice_name

Returns subscription plan name for invoice.

# subscription_plan.description

Returns subscription plan description.

# subscription_plan.handle

Returns subscription plan handle.

# subscription_plan.interval

Returns subscription plan interval which can be year, month or day. Usually it is month.

<span>{{subscription_plan.interval}}</span>
<span>month</span>

# subscription_plan.interval_count

Returns after how many intervals next billing period will be called.

# subscription_plan.price

Returns how much subscription costs.

# subscription_plan.setup_cost

Returns how much subscription creation costs.

# subscription_plan.trial_interval

Returns subscription plan trial interval which can be year, month or day.

# subscription_plan.trial_interval_count

Returns after how many trial intervals trial period lasts.

# subscription_plan.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.last4

Returns the last 4 digits of the card

<span>{{ paymentcard.last4 }}</span>

Output:

<span>4590</span>

# 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"
}