- Logic For Dummies Cheat Sheet
- Logic Cheat Sheet
- Logic Cheat Sheet Pdf
- Logic Pro Cheat Sheet Pdf
- Logic Cheat Sheet Pdf
- Propositional Logic Cheat Sheet
Note: Because cheat codes can sometimes make unexpected changes to your game, it is recommended that you save your game before using cheat codes. Usage To use the cheat code stats.setskilllevel majorlogic 1-10 hit the Ctrl Shift C keys on Windows or the Cmd Shift C keys on a Mac to open the cheats console. LOGIC PRO X PLUGINS Channel EQ Even with the new vintage equalizers, this will still be your workhorse EQ. Fully parametric EQ’s like this are great for subtractive EQ in any case, like the narrow notch cut you see in the image above. Plus, this is the only EQ with a spectrum analyzer, which can be incredibly helpful!
Liquid
Logic
My name is {% comment %}Mark{% endcomment %} Dunkley
My name is Dunkley
if username is elvis
{% if user.name 'elvis' %}
hey Elvis
{% endif %}
hey Elvis
Else if example {% if user.name 'elvis' %}
hey elvis
{% elsif user.name 'Mark' %}
hey mark
{% else %}
hi stranger
{% endif %}
hey ugly
username is not 'elvis'
{% unless user.name 'elvis' %}
hey ugly
{% endunless %}
hey ugly
case [handle is 'cookie']
{% case handle %}
{% when 'cake' %}
This is a cake
{% when 'cookie' %}
This is a cookie
{% else %}
This is not a cookie/cake
{% endcase %}
This is a cookie
Basic example
{% cycle 'one', 'two' %}
{% cycle 'one', 'two' %}
{% cycle 'one', 'two' %}
one
two
one
Group cycles {% cycle 'group 1': 'one', 'two', 'three' %}
{% cycle 'group 1': 'one', 'two', 'three' %}
{% cycle 'group 2': 'one', 'two', 'three' %}
{% cycle 'group 2': 'one', 'two', 'three' %}
one two one two
For Loop [product are: hat, pez, pad]
{% for product in collection.products %}
{{ product.name }},
{% endfor %}
hat, pez, pad,
Limit [product are: hat, pez, pad] {% for product in collection.products limit:2 %}
{{ product.name }},
{% endfor %}
hat, pez,
Example [products are: hat, pez, pad]
<table>
{{% tablerow product in collection.products cols: 2 %}
<td>
{{ product.title }}
</td>
{% endtablerow %}
</table>
<table>
<tr>
<td>hat</td>
<td>pez</td>
</tr>
<tr>
<td>pad</td>
</tr>
</table>
{% assign myvariable = false %}
{% if myvariable != true %}
The if statement is valid
{% endif %}
The if statement is valid
{% increment variablename %}
{% increment variablename %}
0
1
{% decrement variablename %}
{% decrement variablename %}
-1
-2
{% capture productlink %}
{% product.url %}
{% endcapture %}
{% productlink %}
/products/apple
Within the snippet color.liquid
color: '{{ color }}'
shape: '{{ shape }}'
Within the template index.liquid {% assign shape = 'circle' %}
{% include 'color' %}
{% include 'color' with 'red' %}
{% include 'color' with 'blue' %}
{% assign shape = 'square' %}
{% include 'color' with 'red' %}
color: '
shape: 'circle'
color: 'red'
shape: 'circle'
color: 'blue'
shape: 'circle'
color: 'red'
shape: 'square'
Operators
- equal
- != not equal
- > bigger than
- < less than
- >= bigger or equal
- <= less or equal
- or this or that
- and must be this and that
- contains includes the substring if used on a string, or element if used on an array
Images
sizes
- 16x16 pico
- 32x32 icon
- 50x50 thumb
- 100x100 small
- 160x160 compact
- 240x240 medium
- 480x480 large
- 600x600 grande
- 1024x1024 1024x1024
- 2048x2048 2048x2048
- master largest image (2048x)
Misc
Will output something
{{ 'output me' }}
output me
Logic statement {% logic %}
Logic For Dummies Cheat Sheet
Renders the template's default page title text selected by Shopify {{ page_title }}
{% if fulfillment.tracking_number %}We have a tracking number!{% endif %}
<input type='hidden' name='type' value='product' />
Theme Settings
- Text field
- Multiline text field
- Select menus
- Checkboxes
- File Uploads
- CSS/Specialty Classes
- Shopify credit
- Necessary for any themes on the theme store
Loop Helpers
- forloop.length
- length of the entire for loop
- forloop.index
- index of the current iteration
- forloop.index0
- index of the current iteration
- forloop.rindex
- how many items are still left?
- forloop.rindex0
- how many items are still left?
- forloop.first
- is this the first iteration?
- forloop.last
- is this the last iteration?
Pagination
- paginate.page_size
- The size of each page. That's the amount of items displayed.
- paginate.current_page
- On which page are we right now? You can also use {{ current_page }} as well.
- paginate.current_offset
- How many items did we skip over so far
- paginate.pages
- The amount of pages there are
- paginate.items
- Total amount of items in this collection
- paginate.previous
- Exists if there is a previous page.
- paginate.previous.title
- Title of the link
- paginate.previous.url
- URL of the link
- paginate.next
- paginate.next.title
- paginate.next.url
- URL of the link
- paginate.parts
- Array of all the parts which make up a good navigation for this pagination. Each element will have any of these three elements: part.is_link (Is this part a link?), part.title (Link Title), part.url (Link URL)
- part.is_link
Liquid Filters
{{ 'sales' | append: '.jpg' }}
sales.jpg
{{ product.tags | join: ', ' }}
tag1, tag2, tag3

{{ article.content | strip_html | truncate: 20 }}
- %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
{{ product.images | last | to_img }}
{{ product.description | replace: 'super', 'mega' }}
{{ product.description | replace_first: 'super', 'mega' }}
{{ product.description | remove: 'way too expensive'}}
{{ product.description | remove_first: 'remove-me'}}
{% assign somearray = 'one two three' | split: ' ' %}
One
Two
Three
Showing {{ paginate.current_offset }}-{{ paginate.current_offset | plus: paginate.page_size }} items
{{ product.price | minus: 10 | money_with_currency }}
Filters
{{ 'camel case' | camelize }}
CamelCase
{{ 'image.png' | global_asset_url }}
Basic usage
{{ 'image-name.gif' | asset_url | img_tag }}
<img src='http://static.shopify.com/s/files/1/0036/9672/assets/image-name.gif?1255697690' alt=' />
To add alt text: {{ 'image-name.gif' | asset_url | img_tag:'whatever alt text' }}
Simple
{{ 'Click' | link_to: 'http://markdunkley.com' }}
<a href='http://markdunkley.com' >Click</a>
Add a title {{ 'Click' | link_to: 'http://markdunkley.com','Title text' }}
<a href='http://markdunkley.com'>Click</a>
{{ 'Pepsi' | link_to_vendor }}
<a href='/collections/vendors?q=Pepsi'>Pepsi</a>
{{ 'Cola' | link_to_type }}
<a href='/collections/vendors?q=Cola'>Cola</a>
{% for tag in collection.tags %}
{{ tag | link_to_tag: tag }}
{% endfor %}
{% for tag in collection.tags %}
{{ '+' | link_to_add_tag: tag }} {{ tag }}
{% endfor %}
{% for tag in collection.tags %}
{{ '+' | link_to_add_tag: tag }} {{ tag }}
{% endfor %}
{% for tag in collection.tags %}
{{ tag | highlight_active_tag | link_to_tag: tag }}
{% endfor %}
{{ product.price | money_with_currency }}
$19.00 CAD
{{ product.price | money }}
$19.00
{{ 1 | pluralize: 'item', 'items' }}
items
{{ 4 | pluralize: 'item', 'items' }}
item
{{ cart.item_count | pluralize: 'item', 'items' }}
Will output 'item' if the number items in the customers cart is 1, if greater/less than 1 it will output 'items'
{{ product.featured_image | product_img_url}}
http://static.shopify.com/files/shopify_shirt_small.png?1255
Specify the img size {{ product.featured_image | product_img_url: 'thumb' }}
http://static.shopify.com/files/shopify_shirt_thumb.png?1255
{{ collection.url | sort_by: 'price-ascending' }}
/collections/frontpage?sort_by=price-ascending
{{ 'shop.js' | asset_url | script_tag }}
<script src='http://static.shopify.com/files/assets/shop.js' type='text/javascript'></script>
{{ 'shop.css' | asset_url | stylesheet_tag }}
<link href='http://static.shopify.com/files/assets/shop.css' type='text/css' media='all' />
{{ 'Used car' | url_for_type }}
/collections/types?q=Used+car
{{ 'Armani' | url_for_vendor }}
/collections/vendor?q=Armani
{{ product.variants.first.weight | weight_with_unit }}
44.0 kg
Template variables
blog.liquid
{{ blogs['the-handle'].title }}
{% if blog.next_article %}
{{ 'next post >>' | link_to: blog.next_article }}
{% endif %}
{% if blog.previous_article %}
{{ '<< previous post' | link_to: blog.previous_article }}<br/> {% endif %}
<ul>
{% for tag in blog.all_tags %}
{% if current_tags contains tag %}
<li>{{ tag | link_to_tag: tag }} - current tag</li>
{% else %}
<li>{{ tag | link_to_tag: tag }}</li>
{% endif %}
{% endfor %}
</ul>
The snippet below works for both article.liquid and blog.liquid
{% if blog.all_tags != blank %}
<h2>Categories</h2>
<ul>
{% for tag in blog.all_tags %}
<li>
<a href='{{ shop.url}}/blogs/{{ blog.handle }}/tagged/{{ tag | handleize }}'>{{ tag }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
This means that if the current view is filtered to only articles with a certain tags this variable will hold all the tags these remaining articles actually have.
article.liquid
- article.id
- Returns the id of this article.
- article.title
- Returns the title of this article.
- article.author
- Returns the name of the author of this article.
- article.content
- Returns this article's content (the actual article).
- article.created_at
- Returns the date/time of when this article was created.
- article.published_at
- Returns the date/time of when this article was last published. Different from article.created_at if you import blog posts or hide/show a blog post.
- article.url
- Relative url where the blog can be found. Will append #article-id as anchor so that the page should automatically scroll to the corresponding article.
- article.comments
- Returns all published comments for this article if comments are enabled for the blog that this article belongs to. Otherwise, returns an empty array.
- article.comments_count
- Returns the number of published comments for this article.
- article.comment_post_url
- Relative url where comments are listed for this article.
- article.comments_enabled?
- Returns true if comments are enabled for the blog that this article belongs to, otherwise returns false.
- article.moderated?
- Returns true if the blog that this article belongs to is moderated, otherwise returns false.
- article.excerpt
- Renders the article's excerpt
{% for article in blog.articles %}
{% if article.excerpt blank %}
The article has no excerpt so let's truncate the text instead:
{{ article.content | strip_html | truncate: 30 }}
{% else %}
Here is the article excerpt
{{ article.excerpt }}
{% endif %}
{% endfor %} - article.tags
- Returns all the tags for an article
- comment.id
- Returns the id of this comment.
- comment.author
- Returns the author of this comment.
- comment.email
- Returns the e-mail address of the author.
- comment.content
- Returns the body of the comment (in html).
- comment.status
- Returns the status of the comment. Will be one of 'unapproved', 'published', 'removed', or 'spam'.
- comment.url
- Relative url where the article can be found. Will append the comment's id as anchor so that the page should automatically scroll to the corresponding comment.
collection.liquid
- collections['the-handle'].variable
- Access any collection globally in your store
{{ collections['the-handle'].url }}
- collection.id
- Returns the id of this collection
- collection.title
- Returns the title of this collection
- 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'.
- collection.description
- Returns the description of this collection
- collection.all_types
- Returns a list of all unique product types in the collection
<ul>
{% for product_type in collection.all_types %}
<li>
{{ product_type | link_to_type }}
</li>
{% endfor %}
</ul> - collection.all_vendors
- Returns a list of all unique vendors in the collection
Shop by vendors:
<ul>
{% for product_vendor in collection.all_vendors %}
<li>
{{ product_vendor | link_to_vendor }}
</li>
{% endfor %}
</ul> - collection.products
- Returns a collection of all products that are associated with this collection which match the current view. This takes into account things like paginate and selected tags.
- collection.products_count
- Returns a count of all of the products in this collection which match the current view. This takes into account things like paginate and selected tags.
- collection.all_products
- Returns all products that are associated with this collection. Default limit is 50, use pagination for more products
- collection.all_products_count
- Returns a count of all of the products in this collection.
- 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.
- collection.all_tags
- This shows all tags associated with the collection.
- collection.next_product
- These methods are available if you scope your product pages to a certain collection.
- collection.previous_product
- These methods are available if you scope your product pages to a certain collection.
- collection.url
- Returns the url for the specific collection.
pages.liquid
- page['the-handle'].variable
- Access any page globally in your store
{{ page['the-handle'].variable }}
- page.id
- Returns the id of this page.
- 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.
- page.title
- Returns the title of this page
- page.content
- Returns the content of this page.
- page.url
- Relative url where the page can be found.
- page.author
- Returns the author of this page.
Images
{{ image.src | product_img_url: 'original' }}
Customers
{% for address in customer.addresses %}
{{ customer_address.first_name }}
or {{ customer_address.phone }}
{% endfor %}
{% for address in customer.default_address %}
{{ customer_address.first_name }}
or {{ customer_address.phone }}
{% endfor %}
Template variables
Product.liquid
- all_products['the-handle'].variable
- Access any product globally in your store. You can do this with most other objects like blogs and collections.
{{ all_products['the-handle'].title }}
- product.id
- Returns the id of this product
- product.title
- Returns the title of this product
- product.handle
- Returns the handle of this product
- product.type
- Returns the type of this product, e.g. 'snowboard', 'headphones'
- product.vendor
- Returns the vendor of this product, e.g. 'Sony', 'Apple'
- product.price
- Returns the price for this product. By default this is the minimum price.
- product.price_min
- Returns the minimum price for this product.
- product.compare_at_price_min
- Returns a 'compare at' price, e.g. recommended retail price for the least expensive variant of this product.
- product.price_max
- Returns the maximum price for this product.
- product.compare_at_price_max
- Returns a 'compare at' price, e.g. recommended retail price for the most expensive variant of this product.
- product.price_varies
- Returns true if the product's variants have varying prices. Returns false if all variants have the same price.
- product.compare_at_price_varies
- Returns true if the compare_at_price_min is different from compare_at_price_max
- product.url
- Returns the url of this product. You need this for hyperlinking to this product's detail page from anywhere else in the store
- product.featured_image
- Returns the filename with a relative path of the featured image.
- product.images
- Returns a collection of all image filenames for this product.
{% for image in product.images %} {{ image.src | product_img_url: 'grande' }} {% endfor %}
- product.description
- Returns the description of this product.
- product.content
- Alias of product.description.
- product.variants
- Returns a collection of all of this product's variants.
- product.available
- Returns false if all variants' quantities are zero and their policies are set to 'stop selling when sold out'.
- product.template_suffix
- If using a custom product template (like product.bike-landing.liquid) then it will return the name of the template (bike-landing)
- product.selected_variant
- Returns the variant object if passed in through the url (ex: ?variant=123 would return '123').
- product.selected_or_first_
available_variant - Returns the variant objet if there is a ?variant= url parameter. If there is no param the first variant with inventory will be selected.
- product.collections
- Returns a list of collections a product is listed in.
- product.tags
- Returns a list of the product's tags (represented by simple strings).
- product.options
- Returns a list of the product's options. By default, there is always at least one option, but there can be up to three. You can do a check to see how many Options a product may have by using the size filter.
- variant.id
- Returns the variant’s unique id
- variant.title
- Returns the concatenation of all the variant's option values, joined by ' / '.
- variant.price
- Returns the variants price
- variant.image
- You can also use {{ variant.image.src }}, but you probably want to use {{ product.selected_or_first_available_variant.featured_image }} tag instead of variant.image
- variant.compare_at_price
- Returns the variant’s recommended retail price
- variant.available
- Returns whether the variant is available for sale or not.
- variant.inventory_management
- Returns the variant’s inventory tracking service
- variant.inventory_quantity
- Returns how many of this variants are in stock for this shop
- variant.weight
- Returns the weight of the variant
- variant.sku
- Returns the variant's SKU
- variant.option1
- Returns the value of option1 for given variant
- variant.option2
- If a product has a second option defined, then returns the value of this variant's option
- variant.option3
- If a product has a third option defined
Cart
- cart.item_count
- Returns the number of items currently in the shopping cart.
- 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)
- cart.total_price
- Returns the total of all the prices added up in your shopping cart.
- 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.
- 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.
- cart.attributes
- The attributes property is similar to the note property above in that it is an optional field you can add to your shop’s checkout form. Simply define an input field named “attributes[]” and it will be captured automatically and displayed on the order detail page in your admin area.
Linklist
- linklists['the-handle'].variable
- Access any blog globally in your store
{{ linklists['footer'].handle }}
- linklist.title
- Returns the title of this linklist
- linklist.handle
- Returns the handle of this linklist
{{ linklists.footer.handle }}
- linklist.links
- Returns a collection of this linklist's links.
- linklist.object
- The object the link points to. If the link points to a product {{link.product.title}} will, for example, print the name of the product. This is a very powerful feature and can be used for many complex liquid tasks.
{% for link in linklists.main-menu.links %}
<li>
<a {% if link.active %}class='active'{% endif %}>
{{ link.title }}
</a>
</li>
{% endfor %}
{% if link.type 'collection_link' %}{% endif %}
Logic Cheat Sheet
{% if link.type 'collection_link' %}
{% if link.object.all_tags.size > 0 %}
Shop
Logic Cheat Sheet Pdf
{% if shop.description != blank and template 'index' %}
<meta name='description'>
{% endif %}
{% for type in shop.enabled_payment_types %} <img src='{{ type | payment_type_img_url }}' /> {% endfor %}
Logic Pro Cheat Sheet Pdf
Logic Cheat Sheet Pdf
Propositional Logic Cheat Sheet
<ul>
{% for product_vendor in shop.vendors %}
<li>{{ product_vendor | link_to_vendor }}</li>
{% endfor %}
</ul>
<ul>
{% for product_type in shop.types %}
<li>
{{ product_type | link_to_type }}
</li>
{% endfor %}
</ul>
