Follow

Global Variables

 

Variable Usage Explanation
theme.path (str) {{theme.path}} If you want to use an image from inside the theme in any other templates you can use this code.
theme.name (str) {{theme.name}} Returns the name of the current theme.
site.title {{site.title}} Returns the title of the current page. That field is automatically populated with the product/category/brand/page/blog/article meta title.
site.description {{site.description}} Returns the description of the current page. That field is automatically populated with the product/category/brand/page/blog/article meta description.
site.keywords {{site.keywords}} Returns the keywords of the current page. That field is automatically populated with the product/category/brand/page/blog/article meta keywords.
site.metaTitle (str) {{site.metaTitle}} Returns the meta title info of the Settings > Seo Tools.
site.metaDescription (str) {{site.metaDescription}} Returns the meta description info of the Settings > Seo Tools.
site.metaKeywords (str) {{site.metaKeywords}} Returns the meta keywords info of the Settings > Seo Tools.
store.name (str) {{store.name}} Returns the store name info of the General Settings.
store.title (str) {{store.title}} Returns the store title info of the General Settings.
store.domain (str) {{store.domain}} Returns the domain info of the General Settings.
store.description (str) {{store.description}} Returns the site description info of the General Settings.
store.email (str) {{store.email}} Returns the email info of the General Settings.
store.membershipRequirement (str) {{store.membershipRequirement}} Returns the Checkout Settings info of the General Settings.
store.currency (str) {{site.currency}} Returns the currency info of the General Settings.
store.subdomain {{store.subdomain}} Returns the Shopio subdomain of store. Example yourstore.myshop.io
cart.creationDate {{cart.creationDate}} Returns the Creation Date of the Cart.
cart.lastUpdate {{cart.lastUpdate}} Returns the last update info of the cart.
cart.items (array) {% for item in cart.items %}
{{ item.price }}
{% endfor %}
Returns the product infos of the chart. In the example it returns the product price of the cart.
cart.itemAmount {{cart.itemAmount}} Returns the total number of the products in cart.
cart.totalPrice {{cart.totalPrice}} Returns the total price of the products in cart.
amount (int) {% for item in cart.items %}
{{ item.amount }}
{% endfor %}
Returns the units of each product in the cart. (For example you may want to add an explanation about cart anywhere on your site like "You have 2 units of -Product A- and 3 units of -Product B- in your cart." If you want use an explanation like this, you can use this code.)
asset {{ asset('images/test.jpg') }} This code is used to return any file in the theme. In example, it returns the test.jpg file from image folder of theme.
product.label (str) {% for item in cart.items %}
{{ item.product.label }}
{% endfor %}
Returns the names of the products which are in the cart.
product.id (int) {% for item in cart.items %}
{{ item.product.id }}
{% endfor %}
Returns the ID number of products which are in the cart.
product.sku (str) {% for item in cart.items %}
{{ item.product.sku }}
{% endfor %}
Returns the SKU of the products which are in the cart.
product.stockAmount (int) {% for item in cart.items %}
{{ item.product.stockAmount }}
{% endfor %}
Returns the stock amounts of the products which are in the cart.
product.price {% for item in cart.items %}
{{ item.product.price }}
{% endfor %}
Returns the prices of the products which are in the cart.
weight (int) {% for item in cart.items %}
{{ item.product.weight }}
{% endfor %}
Returns the weights of the products which are in the cart.
product.images (array) {% for item in cart.items %}
{%for picture in item.product.images%}
{{ picture.path.original }}
{% endfor %}
{% endfor %}
Returns the images of the products which are in the cart.
product.categories (array) {% for item in cart.items %}
  {% for category in item.product.categories %}
    <li>
     <a href="/product/list/categoryId/{{category.id}}">{{category.title}}</a>
    </li>
  {% endfor %}
{% endfor %}
Returns the category infos of the products which are in the cart.
product.brand (str) {% for item in cart.items %}
  <li>
     <a href="/product/list/brandId/{{ item.product.brand.id }}">
     {{ item.product.brand.title }}
     </a>
  </li>
{% endfor %}
Returns the brands of the products which are in the cart.
product.url (str) {% for item in cart.items %}
{{ item.product.url }}
{% endfor %}
Returns the URLs of the products which are in the cart.

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk