File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ This is a list of useful Shopify Snippets that I often reference while developin
14
14
* [ Add On Sale Badge on Products Based on Price] ( #add-on-sale-badge-on-products-based-on-price )
15
15
* [ Insert Block inside a for loop at any position] ( #insert-block-inside-a-for-loop-at-any-position )
16
16
* [ Open External links in New Tab] ( #open-external-links-in-new-tab )
17
-
17
+ * [ Add Original Price of Discounted products on Cart Page ] ( #add-original-price-of-discounted-products-on-cart-page )
18
18
19
19
## Display Products in a Collection
20
20
``` html
@@ -147,3 +147,11 @@ $(document).ready( function() {
147
147
jQuery (' a[href^="http"]' ).not (' a[href^="' + $ (location).attr (' hostname' )+ ' "]' ).attr (' target' , ' _blank' );
148
148
});
149
149
```
150
+
151
+ ## Add Original Price of Discounted products on Cart Page
152
+ Inset the following code inside items loop in cart template.
153
+ ``` html
154
+ {% if item.product.compare_at_price > item.price %}
155
+ <s >{{ item.product.compare_at_price | money }}</s >
156
+ {% endif %}
157
+ ```
You can’t perform that action at this time.
0 commit comments