Last active
August 29, 2015 14:04
-
-
Save zakhardage/d24bcf888011b173d89b to your computer and use it in GitHub Desktop.
opengraph wholesale price
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Replace this | |
| <meta property="og:price:amount" content="15.00" /> | |
| <meta property="og:price:currency" content="USD" /> | |
| // With this | |
| {% assign price = product.price_max %} | |
| {% for v in product.variants %} | |
| {% unless v.title contains 'wholesale' or v.title contains 'Wholesale' or v.price > price %} | |
| {% assign price = v.price %} | |
| {% endunless %} | |
| {% endfor %} | |
| <meta property="product:price:currency" content="{{ shop.currency }}" /> | |
| <meta property="og:price:amount" content="{{ price | money_without_currency }}"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment