File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ This is a list of useful Shopify Snippets that I often reference while developin
8
8
* [ Add On Sale Badge on Products Based on Price] ( #add-on-sale-badge-on-products-based-on-price )
9
9
* [ Back or Continue Shopping link on Cart] ( #back-or-continue-shopping-link-on-cart )
10
10
* [ Calculate Discount on Products] ( #calculate-discount-on-products )
11
+ * [ Call a Product on any page] ( #call-a-product-on-any-page )
11
12
* [ Display Articles in a Blog] ( #display-articles-in-a-blog )
12
13
* [ Display Links in a Linklist] ( #display-links-in-a-linklist )
13
14
* [ Display Products in a Collection] ( #display-products-in-a-collection )
@@ -67,6 +68,12 @@ Inset the following code inside items loop in cart template.
67
68
<span class =" discount" >OFF: {{ discount }}</span >
68
69
```
69
70
71
+ ## Call a Product on any page
72
+ ``` html
73
+ {%- assign product = all_products['product-handle'] -%}
74
+ ```
75
+ Then do anything with product object like ``` {{ product.title }} ```
76
+
70
77
## Display Articles in a Blog
71
78
``` html
72
79
{% for article in blogs.blog-name.articles limit:1 %}
You can’t perform that action at this time.
0 commit comments