Skip to content

Instantly share code, notes, and snippets.

{
"name": "t:sections.header.name",
"type": "header",
"sections": {
"announcement-bar": {
"type": "announcement-bar",
"blocks": {
"announcement-bar-0": {
"type": "announcement",
"settings": {
└─ theme
├─ assets
├─ config
├─ layout
│ └─ theme.liquid
├─ locales
└─ sections
├─ footer-group.json
├─ header.liquid
├─ header-group.json
<ul class="block-grid mobile four-up product-collection">
{% for link in linklist.links %} //Here we are saying use the links in the linklist we created and assign them to the below code
<li>
<div class="product">
{% comment %}
You can connect collections, products, pages, & even blogs. By default it will use the first product that appears on a collection or you can pick a featured image.
{% endcomment %}
{% assign link_item = link.object %} //Creates a new variable for link_item using link.object which in-turn can access any of the attributes that are available (product, collection, page or blog)
{% assign link_image = '' %}//creates a new variable for link_image which assigns
@shopifypartners
shopifypartners / a-beginners-guide-to-sass-part-3-interpolation.liquid.scss
Last active February 13, 2023 08:04 — forked from stewartknapman/style.liquid.scss
A Beginner's Guide to Sass with Shopify — Part 3: Sass interpolation, Workflow and Object Oriented CSS - https://www.shopify.com/partners/blog/a-beginners-guide-to-sass-with-shopify-part-3
// Escaping Liquid in SCSS.
//
// Expected output:
// a{
// color: {{ settings.link-color }};
// }
a{
color: #{'{{ settings.link-color }}'};
}
<table class=”responsive-table”>
<thead>
<th>Product</th>
<th>Price</th>
<th>Quantity</th>
<th>Total</th>
</thead>
</tbody>
{% for item in cart.items %}
<tr class=”responsive-table__row”>
products = ShopifyAPI::Product.find(:all, params: { order: 'inventory_total desc', limit: 250 })
process_products(products)
3.times do
break unless products.next_page?
products = products.fetch_next_page
process_products(products)
end
@shopifypartners
shopifypartners / backup_rate_example.yml
Created October 25, 2022 17:14 — forked from krzysztofbialek/backup_rate_example.yml
Backup rates example for Shipping Applications development good practices
rate_definitions:
-
name: Standard
price: 0
currency: CAD
rate_class_id: 10
conditions:
-
field: total_price
criteria: 100