Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi - I want to create a flow that auto creates a tag based on the discounted price of a product - so it would need to do a calculation [(price / compare at price) - 1] - is this possible?
any advice gratefully received!
thanks
Yes, possible. You likely need to put Liquid in the tag field (and hit enter to save the tag). Something like:
{{ productVariant.price | divided_by: productVariant.compareAtPrice | minus: 1 }}
One note...depending on the trigger you may not have access to productVariant, or you'll need to loop over lineItems (for orders) or variants (for product triggers)
Hi Paul - great - I want to round the discount level in the tag but am getting an error
I think you need to move the round inside the curly brackets. Try:
{{ productVariant.price | divided_by: productVariant.compareAtPrice | minus: 1 | round: 2 }}
To learn more visit the Shopify Help Center or the Community Blog.
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024