Shopify recently introduced some neat new Math Filters, making it possible to round numbers. I spent a lot of time figuring out how to show a percentage-based discount on the Cart Page and Product Page for a Shopify Client. I haven’t seen it posted anywhere else in its entirety; just in smaller pieces which are difficult to piece together. To save you the trouble, here’s what you’ll need:
CART PAGE
{{ item.variant.compare_at_price | money }}
{% endif %}
PRODUCT PAGE
Replace item.variant with product, like this:
{% if product.compare_at_price > item.variant.price %}
{% endif %}
—
***
Gracias de nuevo por mantenerse al día con nuestro Shopify Insider blog @ Blackbelt Commerce. Por favor, asegúrese de revisar nuestra Productos. También tenemos algunas recomendaciones principales del blog para que usted Compruebe hacia fuera; Los beneficios del pensamiento multicanal, how to increase shopify revenue, an overview to e-commerce regulations, the most excited e-commerce marketing trendsY Los mejores recursos de la hoja de trucos de Shopify. Como siempre, vigila las nuevas publicaciones del blog.
Questions? Ask away in the comments below.
¿Cuáles son las principales tiendas de Shopify?
Toma lo que aprendimos y utilíla para tu ventaja.
Obtenga nuestra investigación exclusiva: Insights de más de 500 tiendas Shopify.