String Filters


wiki
append
Use this filter to append characters to a string.
{{ 'sales' | append: '.jpg' }}
sales.jpg
wiki
camelize
Converts the text into CamelCase.
{{ 'camel_case' | camelize }}
CamelCase
wiki
capitalize
Capitalizes the text.
{{ 'capitalize me' | capitalize }}
Capitalize Me
wiki
downcase
Convert a input string to 'downcase'
{{ 'Downcase Me' | downcase }}
downcase me
wiki
escape
Use this filter to escape a string.
{{ link.title | escape }}
wiki
handleize
Strips and converts special characters (%@*$...etc) out of the string, so you can use the text in a url.
{{ '100% M&Ms!!!' | handleize }}
100-m-and-ms
wiki
money
Adds the currency symbol wrapped into a span of class 'currency'.
{{ product.price | money }}
wiki
newline_to_br
Inserts a <br /> linebreak tag in front of every \n linebreak character.
wiki
pluralize
Specify the pluralized version of the word you need and if the number is greater than 1 it will pluralize it.
{{ 1 | pluralize: 'item', 'items' }}
{{ 4 | pluralize: 'item', 'items' }}
{{ cart.item_count | pluralize: 'item', 'items' }}
wiki
prepend
Use this filter to prepend characters to a string.
{{ '.jpg' | prepend: 'offer' }}
offer.jpg
          
wiki
remove
Removes all occurrences of the substring from the input.
{{ product.description | remove: 'way too expensive'}}
wiki
remove_first
Removes only the first occurrence of the substring from the input.
{{ product.description | remove_first: 'remove-me'}}
wiki
replace
Will replace all occurrences of a string with another.
{{ product.description | replace: 'super', 'mega' }}
wiki
replace_first
Will replace the first occurrence of a string with another.
{{ product.description | replace_first: 'super', 'mega' }}
wiki
strip_html
This will strip all html tags from the text passed to the filter. Very useful in combination with truncate.
{% assign html_text="<p>This is the <strong>current</strong> description.</p>" %}
{{ html_text | strip_html}}
This is the description.
wiki
strip_newlines
Removes all newlines from the input.
wiki
truncate
Truncate a string down to X characters. Take care with truncating text which has html elements in it. In these cases you probably want to run the string through the strip_html filter first.
{% assign html_text="<p>This is the <strong>current</strong> description.</p>" %}
{{ html_text | strip_html | truncate: 10 }}
This is th...
wiki
truncatewords
Truncate string down to x words.
wiki
upcase
convert a input string to UPCASE.
{{ 'upcase' | upcase }}
UPCASE

URL Filters


wiki
asset_url
Gives you the url for an asset
{{ 'shop.css' | asset_url }}
wiki
product_img_url
Generates the product img url
{{ product.featured_image | product_img_url}}
{{ product.featured_image | resize: '128x128' }}
wiki
url_for_type
This filter creates an url for a type name by transforming it to a handle and adding the appropriate directory in front of it to make the url work.
{{ "Used car" | url_for_type }}
/categories/used-car
wiki
url_for_vendor
This filter creates a url for a vendor name by transforming it to a handle and adding the appropriate directory in front of it to make the url work.
{{ "Armani" | url_for_vendor }}
/vendors/armani

Logic


wiki
{% assign %}
Create variables
{% assign myvariable = false %}
{% if myvariable != true %}
The if statement is valid
{% endif %}
The if statement is valid
wiki
{% capture %}
Captures the content of the block into a variable.
<div>
{% capture captured %}
Welcome {% if customer.logged_in %}{{ customer.name }}{% else %}dear customer.{% endif %}. Today, on {{ now | date }} we have some interesting offers for you within our special collection: {{ collections.xmas.title | link_to: collections.xmas.url }}. 
{% endcapture %}
</div>

<p>{{ captured }}</p>
<div></div>
<p>Welcome dear customer. Today, on 2000-12-24 we have some interesting offers for you within our special collection: <a href="/collections/xmas">Christmas</a></p>
wiki
{% case %}
while 'if' statements make a comparison, case statements expect something already known. Here, the variable 'baked' contains 'cookie'.
{% case baked %} 
{% when 'cake' %}
This is a cake
{% when 'cookie' %}
This is a cookie
{% else %}
This is not a cookie/cake
{% endcase %}
This is a cookie
wiki
{% comment %}
Comments will be hidden
My name is {% comment %}Jonna{% endcomment %} Obama
My name is Obama
wiki
{% cycle %}
Use when you need to alternate between something.
{% cycle 'one', 'two' %}
{% cycle 'group 1': 'one', 'two', 'three' %}
{% cycle 'group 2': 'one', 'two', 'three' %}
wiki
{% filter %}
Lets you filter a collection within collection.liquid by tags.
Single selection:
{% assign tags = "rot,grün,blau"|split %}
<ul>
{% filter collection by one of tags %}
  {% for filter in all_filters %}
  <li>{{ filter.name | link_to: filter.url }}</li>
  {% endfor %}
{% endfilter %}
</ul>
Multiple filters connected with logical AND.
<ul>
{% filter collection by each of tags %}
  <li>{{ 'Alle' | link_to: reset_filter.url }}</li>
  {% for filter in filters %}
  <li>{{ filter.name | link_to: filter.url }}</li>
  {% endfor %}
{% endfilter %}
</ul>
Multiple filters connected with logical OR.
<ul>
{% filter collection by any of tags %}
  <li>{{ 'Alle' | link_to: reset_filter.url }}</li>
  {% for filter in all_filters %}
  <li>{{ filter.name | link_to: filter.url }}</li>
  {% endfor %}
{% endfilter %}
</ul>
wiki
{% for %}
Use "for loops" if you want to repeat/test something over and over
{% for product in collection.products %}
{{ product.name }}
{% endfor %}
{% for product in collection.products limit:2 %}
{{ product.name }}
{% endfor %}
wiki
{% if %}
"If" statements let you determine if something is true or not.
1.
{% if user.name == 'elvis' %}
hey Elvis
{% endif %}
hey Elvis
2.
{% if user.name == 'elvis' %}
hey elvis
{% elsif user.name == 'Mark' %}
hey mark
{% else %}
hi stranger
{% endif %}
hi stranger
wiki
{% include %}
Insert a snippet in your templates. This example creates a simple navigation ul / li code. Two parameters have to be passed: "headline" and "linklist"
1. /include/navigation.liquid
<h3>{{ headline }}</h3>
<ul>{% for link in linklist.links %}
  <li><a href="{{ link.url }}"{% if link.highlights? %} class="current"{% endif %}>{{ link.title }}</a></li>
</ul>
2. /templates/product.liquid
...
  {% include 'navigation' headline: "Produktübersicht", linklist: linklists.seiten-navigation %} 
... 
wiki
{% tablerow %}
Generate table rows/cells. Within the block use the 'tablerowloop' variable.
<table>
{% tablerow item in items cols: 3 limit: 12 %}
  {{ item.variable }}
{% endtablerow %}
</table>
<table>
  <tr>
    <td>Entry 1</td>
    <td>Entry 2</td>
    <td>Entry 3</td>
  </tr>
  <tr>
    <td>Entry 4</td>
    <td>Entry 5</td>
    <td>Entry 6</td>
  </tr>
  <tr>
    <td>Entry 7</td>
    <td>Entry 8</td>
    <td>Entry 9</td>
  </tr>
  <tr>
    <td>Entry 10</td>
    <td>Entry 11</td>
    <td>Entry 12</td>
  </tr>
</table>
wiki
{% unless %}
Username is not 'elvis'. See 'if'
{% unless user.name == 'elvis' %} 
hey ugly
{% endunless %}
hey ugly

Variable: cart


wiki
cart.coupon
Returns the 'coupon' variable, if a coupon code was entered by the customer.
{{ coupon }}
AAB110
wiki
cart.delivery_countries
Returns a list of country codes that are included by the shipping types of this cart.
wiki
cart.destination_country
Returns the destination country code chosen by the user. If none was entered, the default country is "de".
wiki
cart.discount
Returns the value of the coupon assigned to this cart´s items.
wiki
cart.estimated_delivery
Returns the estimated delivery time. If the items of this cart will be shipped different, the latest time will be returned.
wiki
cart.extra_price
Returns the sum of all extra prices that may have been defined in your products. Useful to inform about extra fees.
wiki
cart.extra_shipping_cost
Returns the sum of all costs of extra shipping types used in this cart.
wiki
cart.extra_shipping_items
Returns all special shipping items of this cart, each as variable 'line_item'.
wiki
cart.extra_shipping_items_count
Returns all the amount of all special shipping items of this cart.
wiki
cart.extra_shipping_types
Returns all special shipping types of this cart, each as variable 'shipping_type'. These have been manually assigned to specific products.
wiki
cart.item_count
Returns the number of items currently in the shopping cart.
wiki
cart.items
Returns all items in the shopping cart. Each one is of the type 'line_item'. You will want to iterate through the return value (see example)
{% for item in cart.items %}
{{ item.quantity }} x {{ item.title }}
{% endfor %}
wiki
cart.note
allows you the option of adding a note field to your checkout template. Usage of this feature is very flexible. The general idea is that you simply define an input field named “note” in the form that submits to ”/cart” in cart.liquid.
wiki
cart.order_code
Returns the uniq order code of this cart.
wiki
cart.payment
Returns the 'payment' variable. Available after the customer has chosen a payment method.
wiki
cart.payment_cost
Returns the amount of the payment cost. The value will be available after the customer has chosen a payment type.
wiki
cart.reduced_tax_amount
The sum of all reduced taxes included in the items.
wiki
cart.reduced_tax_rate
Returns the reduced tax rate of this shop.
wiki
cart.shipping_cost
Returns the cost for shipping the cart´s items. If there are several shipping types, the sum of all will be returned.
wiki
cart.shipping_type
Returns the default shipping type of this cart as variable 'shipping_type'
wiki
cart.standard_shipping_cost
Returns the sum of all costs of standard shipping types used in this cart.
wiki
cart.standard_shipping_items
Returns all standard shipping items of this cart, each as variable 'line-item'. These items will be shipped by the standard shipping type.
wiki
cart.standard_shipping_items_count
Returns all the amount of all standard shipping items of this cart.
wiki
cart.standard_shipping_types
Returns all standard shipping types of this cart, each as variable 'shipping_type'. Useful to let the customer choose between the preselected shipping types.
wiki
cart.standard_tax_amount
The sum of all standard taxes included in the items prices and shipping costs.
wiki
cart.subtotal_price
Returns the total of all the prices of line items added up in your shopping cart
wiki
cart.tax_amount
The sum of all taxes included in the items prices and shipping costs.
wiki
cart.tax_rate
Returns the standard tax rate of this shop.
wiki
cart.total_price
Returns the total of all the prices added up in your shopping cart. Shipping cost and payment costs included, coupons values substracted.
wiki
cart.total_weight
Returns the total weight of all items in the cart combined. Weight is always returned as grams. Use weight or weight_with_unit from the filter library to display the actual weight in your preferred unit system.

Variable: collection


wiki
collection.all_products
Returns all products that are associated with this collection. Default limit is 50, use pagination for more products.
wiki
collection.all_products_count
Returns a count of all of the products in this collection.
wiki
collection.all_tags
This shows all tags associated with the collection.
wiki
collection.all_tags_count
Returns the amount of all tags associated with the collection.
wiki
collection.all_vendors
Returns a collection of all vendors of the specific collection, each as variable "vendor".
wiki
collection.all_vendors_count
Returns the amount of all vendors associated with the collection.
wiki
collection.categories
Returns a uniq collection of all categories of a collection, each as a collection variable. Within a paginate block it will collect only the categories of products that are displayed on the current page.
{% for category in collection.categories %}
{{ category.title }}: {{ category.count }}
{% endfor %}
Sunglasses: 17
Caps: 28
Trousers: 7
wiki
collection.categories_count
Returns the amount of uniq categories in this specific collection.
wiki
collection.content_meta_description
Returns the SEO - relevant content meta description.
wiki
collection.content_meta_keywords
Returns the SEO relevant meta keywords content
wiki
collection.content_title_tag
Returns the SEO - relevant content title tag.
wiki
collection.current_product_index
Returns the index of a product in a scoped collection. The index is zero-based. This exsists only in nested structures, like "/collections/origami/products/bird"
wiki
collection.description
Returns the description of this collection
wiki
collection.full_url
Returns the full URL to this collection if you used the "within" filter in nested structures.
wiki
collection.handle
Returns this collection's handle, which is by default its title in lowercase. Whitespaces in the original title are replaced by dashes in the handle. The handle of a collection with the title "Winter Sale" would be "winter-sale".
wiki
collection.id
Returns the id of this collection. If this is a generic collection (searches), the id will be 0.
wiki
collection.next_product
These methods are available if you scope your product pages to a certain collection.
wiki
collection.option_01
Returns the value of option01 for given collection.
wiki
collection.option_02
Returns the value of option02 for given collection.
wiki
collection.option_03
Returns the value of option03 for given collection.
wiki
collection.previous_product
These methods are available if you scope your product pages to a certain collection.
wiki
collection.products
Returns a collection of all products that are associated with this collection matching the current page view. Maximum are 50 products. For more products use pagination.
wiki
collection.products_count
Returns a the count of all products that are associated with this collection which match the current page on paginated collection views. Limit is 50 defined by the max. amount of collection.products.
wiki
collection.tags
Returns all tags of all products on in this particular collection which match the current view. This means that if the current view is filtered to only products with a certain tags this variable will hold all the tags these remaining products actually have.
wiki
collection.title
Returns the title of this collection
wiki
collection.url
Returns the url for the specific collection.
wiki
collection.vendors
Returns a collection of all vendors of the specific collection, each as variable "vendor". Within a paginate block it will collect only the vendors of products that are displayed on the current page.
wiki
collection.vendors_count
returns the amount of uniq vendors in this collection.

Liquid Syntax


wiki
Command: {% .. %} {% end..%}
Standard Liquid Command syntax.
{% for product in collection products %}
  {{ product.title }}<br/>
{% endfor %}
wiki
Output: {{ .. }}
To get an output from any variable you will use this syntax.
The 'now' variable is always present.
{{ now }}
Fri, 14 Jan 2011 10:31:12 +0100
wiki
Output Filter: {{ .. | .. }}
The pipe symbol | indicates, that you pass the output from the left side to the right side of the pipe symbol. The filter takes the output as the first parameter and modifies it.
{{ now | date: "A%" }}
Tuesday
In this example the variable "now" contains the current DateTime object. The date filter takes two parameters. The first one is the DateTime object passed by the pipe |; the second parameter is the "%A" format - string. The date filter generates the new output.

Format Filters


wiki
date
Reformat a date.
%a - The abbreviated weekday name (``Sun'')
%A - The full weekday name (``Sunday'')
%b - The abbreviated month name (``Jan'')
%B - The full month name (``January'')
%c - The preferred local date and time representation
%d - Day of the month (01..31)
%H - Hour of the day,24-hour clock (00..23)
%I - Hour of the day,12-hour clock (01..12)
%j - Day of the year (001..366)
%m - Month of the year (01..12)
%M - Minute of the hour (00..59)
%p - Meridian indicator (``AM'' or ``PM'')
%S - Second of the minute (00..60)
%U - Week number of the current year, starting with the first Sunday as the first day of the first week (00..53)
%W - Week number of the current year, starting with the first Monday as the first day of the first week (00..53)
%w - Day of the week (Sunday is 0,0..6)
%x - Preferred representation for the date alone,no time
%X - Preferred representation for the time alone,no date
%y - Year without a century (00..99)
%Y - Year with century
%Z - Time zone name
%% - Literal ``%'' character
wiki
money_with_currency
Wraps with the currency symbol and abbreviation
{{ product.price | money_with_currency }}
wiki
money_without_currency
Formats the price using a decimal
{{ product.price | money_without_currency }}
wiki
weight_with_unit
Formats the product variant's weight
{{ product.variants.first.weight | weight_with_unit }}

HTML Filters


wiki
default_pagination
used in conjunction with the {{ paginate }} liquid tag
{{ paginate | default_pagination }}
wiki
img_tag
Generates an img tag
{{ 'image-name.gif' | asset_url | img_tag }}
<img src="../assets/image-name.gif" />
wiki
link_to
Generates a html link
{{ 'Click' | link_to: 'http://versacommerce.de' }}
<a href="http://versacommerce.de">Click<a/>
wiki
link_to_tag
This filter creates a link to all products in a collection that have the given tag.
{% for tag in collection.tags %}
{{ tag | link_to_tag: tag }}
{% endfor %}
wiki
link_to_type
Generates a html link to the type of the product
{{ product.title | link_to_type }}
<a href="/categories/sunglasses">Oakley Super-Sun</a>
wiki
link_to_vendor
Generates a html link to the vendor of the product
{{ product.title | link_to_vendor }}
<a href="/categories/pepsi">Cola</a>
wiki
script tag
Generates a script tag
{{ 'shop.js' | asset_url | script_tag }}
<script src="../assets/shop.js" type="text/javascript" charset="utf-8"></script>
wiki
stylesheet_tag
Generates a stylesheet tag
{{ 'shop.css' | asset_url | stylesheet_tag }}
<link rel="stylesheet" href="../assets/shop.css" type="text/css" media="screen" title="no title" charset="utf-8">

Logic Filters


wiki
first
Get the first element of the passed in array.
{{ product.images | first | to_img }}
wiki
join
"joins" an array with the specified character. Example:
{{ product.tags | join: ', ' }}
red, paper, bird
wiki
last
Get the last element of the passed in array.
{{ product.images | last | to_img }}
wiki
minus
Gets the result of subtracting input from operand. When strings are passed, it parses strings as integers before adding.
{{ product.price | minus: 10 | money_with_currency }}
wiki
plus
Gets the result of adding input to operand. When strings are passed, it parses strings as integers before adding.
Showing {{ paginate.current_offset }}
-
{{ paginate.current_offset | plus: paginate.page_size }}
items
wiki
size
Return the size of an array or string.
{{ 'this is an 30 character string' | size }}

Variable: image


wiki
image.filename
Returns the filename of this image.
wiki
image.height
Returns the height of this image in pixels.
wiki
image.id
Returns the id of this image.
wiki
image.url
Returns the width of this image in pixels.
wiki
image.width
Returns the width of this image in pixels.

Operators


wiki
== !- > < >= <= or and
You can use operators in all the above logic statements
== equal
!= not equal
> bigger than
< less than
>= bigger or equal
<= less or equal
or this or that
and must be this and that

Variable: page


wiki
page.content
Returns the content of a page.
{{ pages.info.content }}
wiki
page.content_meta_description
Returns the SEO - relevant content meta description tag.
wiki
page.content_meta_keywords
Returns the SEO - relevant content meta keywords tag.
wiki
page.content_title_tag
Returns the SEO - relevant content title tag.
wiki
page.full_url
Returns the URL of a page if it has parent objects in a nested navigation structure.
/collections/all/collections/some/pages/this_page
wiki
page.handle
This is the accessor for this page. It is usually the page's title in underscore with every blank space replaced by a dash.
wiki
page.id
Returns the id of this page.
wiki
page.option_01
Returns the value of the Field "Option 01"
wiki
page.option_02
Returns the value of the Field "Option 02"
wiki
page.option_03
Returns the value of the Field "Option 03"
wiki
page.title
Returns the title of this page.
wiki
page.url
Relative url where the page can be found.

Variable: pages


wiki
pages.all
Returns a collection of all pages you have created.
wiki
pages.#page-handle
Get any page by selecting it from the pages collection.
Select a page with via the handle based syntax...
{{ pages.info-page.content }}
... or use the index based syntax:
{{ pages['Info Page'].content }}

Variable: product


wiki
product["Attribut"]
product["attribute"] returns all assigned properties with a key of "an-attribute-name". As an alternative you can use product.an-attribute-name.
{% if product["Color"].size > 0 %}
{% assign options = product["Color"] %}
<label for="options_color">Color: </label>
<select id="options_color" name="product[options][Color]">
{% for property in options %}
   <option value="{{ property }}">{{ property }}</option>
{% endfor %}
</select>
{% endif %}
wiki
product.available
Returns false if 'stock' is zero and 'considers_stock' is active.
{% unless product.available %}
<p>sold!</p>
{% endunless %}
wiki
product.base_price
Returns the base price for this product.
{% if product.calculates_base %}
base price: {{ product.base_price | money }} per {{ product.base_unit }}
{% endif %}
wiki
product.base_quantity_package
Returns the quantity per package of this product.
wiki
product.base_quantity_sold
Returns the quantity of packages in which this product will be sold. 1 by default.
wiki
product.base_unit
Returns the base unit for this product.
{% if product.calculates_base %}
base price: {{ product.base_price | money }} per {{ product.base_unit }}
{% endif %}
wiki
product.calculates_base
Returns true if this product calculates the base price.
wiki
product.calculates_shipping_cost
Returns true if the cart will calculate shipping costs for this product.
{% unless product.calculates_shipping_cost %}
Free Shipping!
{% endunless %}
wiki
product.category
Returns the category of this product, e.g. "origami", "cloth"
{{ product.category }}
Sunglasses
wiki
product.code
Returns the products SKU
{{ product.code }}
123456789ABC
wiki
product.collection
Returns the full URL to this product if you used the "within" filter in nested structures.
wiki
product.compare_at_price
Returns the strike through price of this product.
wiki
product.compare_at_price_max
Returns a "compare at" price, e.g. recommended retail price for the most expensive variant of this product.
wiki
product.compare_at_price_min
Returns a "compare at" price, e.g. recommended retail price for the least expensive variant of this product.
wiki
product.compare_at_price_varies
Returns true if the compare_at_price_min is different from compare_at_price_max
wiki
product.considers_stock
Returns true, if if this product calculates the stock amount.
wiki
product.content
Alias of product.description.
wiki
product.content_meta_description
Returns the SEO - relevant content meta description tag.
wiki
product.content_meta_keywords
Returns the SEO - relevant content meta keywords tag.
wiki
product.content_title_tag
Returns the SEO - relevant content title tag.
wiki
product.description
Returns the description of this product.
wiki
product.extra_price
Returns the extra-price for this product. E. g. deposit or contract fees.
wiki
product.featured
Returns true if this product was marked as "Top".
Liefert "true", wenn für das Produkt "Top" aktiviert ist.
wiki
product.featured_image
Returns the the featured image as variable 'asset'.
wiki
product.full_url
Returns the full URL to this product if you used the "within" filter in nested structures.
wiki
product.handle
Returns the handle of this product.
wiki
product.id
Returns the id of this product
wiki
product.images
Returns a collection of all images for this product, each as variable 'asset'.
wiki
product.images_count
Returns the amount of images uploaded for this product.
wiki
product.is_recommendation
Returns true if this product was recommended by another product.
wiki
product.is_variant
Returns true if this product is a variant of a main product.
wiki
product.link
Returns the representation of this product as 'link' variable.
{% assign a_link = product.link %}
<a href="{{ a-link.url }}>{{ a-link.title }}</a>
<a href="/products/12345">Sunglasses UV-Pro</a>
wiki
product.new
Returns true if this product was marked as "New".
wiki
product.new_and_featured
Returns true if this product was marked as "Top" and "New".
wiki
product.option_01
Returns the value of option1 for given product.
wiki
product.option_02
Returns the value of option 2 for given product.
wiki
product.option_03
Returns the value of option 3 for given product.
wiki
product.price
Returns the price for this product.
{{ product.price }}
12.98
wiki
product.price_extra_included
Returns the sum of price and extra-price for this product
wiki
product.price_max
Returns the maximum price of this product or one of its variants.
wiki
product.price_min
Returns the minimum price of this product and its variants.
wiki
product.price_varies
Returns true if the product's variants have varying prices. Returns false if all variants have the same price.
wiki
product.properties
Returns a list of the product's properties, each as variable 'property'.
{% for property in product.properties %}
{{ property.title }}: {{ property.value }}
{% endfor %}
wiki
product.recommendations
Returns a list of the product's recommendation, each as variable 'recommendation'.
{% for r in product.recommendations %}
  <p>
    {{ r.product.featured_image | product_img_url | refit: '50x50'  | img_tag }}"
    {{ r.product.title | link_to: recommendation.product.url }}<br>
    {{ r.description }}
  </p>
{% endfor %}
wiki
product.recommendations_count
Returns the amount of recommendations comnnected to this product.
wiki
product.shipping_types
Returns a list of available shipping types for this product, each as variable 'carrier'.
{% for s in product.shipping_types %}
{{ s.title }}
{% endfor %}
wiki
product.shows_stock_amount
Returns true, if if this product shows the calculated stock amount in the template.
wiki
product.stock
Returns how many of this product are in stock.
wiki
product.subtitle
Returns the subtitle of this product.
{{ product.subtitle }}
These are the sunglass for the sporty ones.
wiki
product.tag_list
Returns a list of tags as string. It´s always formatted as CSV
"long,very thin,'more than 50,0cm wide'"
wiki
product.tags
Returns a list of the product's tags, each as variable 'tag'.
wiki
product.tags_count
Returns the amount of this product´s tags.
wiki
product.title
Returns the title of this product.
{{ product.title }}
Oakley UV-Pro
wiki
product.url
Returns the url of this product. By default this url is "/products/:product-handle". If you entered a custom url this will be returned.
wiki
product.variants
Returns a collection of all of this product's variants each as a "product" variable. This product itself is included in the list.
wiki
product.variants_count
Returns the amount of variants for this product. The product itself is not included in the counter.
wiki
product.vendor
Returns the vendor of this product, e.g. "Milka", "Siemens".
{{ product.vendor }}
Aramani
wiki
product.weight
Returns the weight of the product.
{{ product.weight }}
1.8

Variable: shop


wiki
shop.all_products_count
Returns the amount of products as well as variants available in this shop.
wiki
shop.carriers
Returns a list of all shipping-types created in this store, each as variable 'carrier'.
wiki
shop.carriers_count
Returns the amount of shipping-types created in this store.
wiki
shop.categories
Returns all uniq categories that have been mentioned in this shop, each as variable 'category'.
wiki
shop.categories_count
Returns the amount of all uniq categories that have been mentioned in this shop.
wiki
shop.checkout_logo_url
Returns the URL to the shop´s logo used in the checkout.
wiki
shop.collections_count
Returns the amount of collections created for this shop.
wiki
shop.currency_code
Returns a string with the name of the currency (usually a 3 letter representation, e.g. EUR) this shop uses.
wiki
shop.design
Returns the name of the currently activated design.
wiki
shop.locale
Returns the locale for this shop. Default is "de".
{% if shop.locale == "de" %}
Willkommen bei {{ shop.name }}
{% elsif shop.locale == "en" %}
Welcome at {{ shop.name }}
{% endif %}
wiki
shop.logo_url
Returns the URL to the shop´s logo.
wiki
shop.name
Returns a string with the shop's name.
wiki
shop.products_count
Returns the number of products you have online.
wiki
shop.recent_searches
Returns the last most successful 100 searches of this shop´s customers, each as varaiable 'track_search'
wiki
shop.tags
Returns all tags that have been used in this shop, each as variable 'tag'.
wiki
shop.url
Returns a full url to your shop. If you defined a main domain alias shop.url will return this.
wiki
shop.vendors
Returns all vendors that have been mentioned in this shop, each as variable 'vendor'.
wiki
shop.vendors_count
Returns the amount of all uniq vendors that have been mentioned in this shop.
wiki
shop.version
Returns the current version of this shop. Whenever an object has been saved the version increases by 1.