Liquid, JavaScript, themes, sales channels
I have a quantity discount app and want to show the pricing on the collection pages for the lowest price such as "as low as xxx". I figured for now I would just pull the product SKU and show the price based on that by coding it in manually using a capture statement to assign the SKU to a variable and then using a case statement but it does not seem to work even though I am able to pull the product SKU. The code I have is as follows:
{% assign current_variant = product.selected_or_first_available_variant %}
{% capture skuprice %} {{ current_variant.sku }} {% endcapture %}
{% case skuprice %}
{% when '312-L' %}
As low as $0.42
{% else %}
{% if emphasize_price %}
{{ product_item_price }}
{% endif %}
{% endcase %}
Is there another correct way of assigning the SKU to a variable which I can then use in my case statement? I tried ASSIGN but that resulted in an error.
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024