How to make discounted price in the product page and home page?

Hello,

I recently launch a sale on my Shopify store, I placed discount for 5 products of 12 products. How to make discounted price display on the Home/Collection/Product pages please? I’m using 2 type of discounts (Amount and percentage).

I hope I got help asap

@Abbie11

How did you place the discount? Can you please explain?

Hi @Abbie11 .

You can use product tag or metafields to save discount. Because when creating a discount, you cannot get the discounted price of each product, so saving an extra discount code for each product will be a solution.

Ex: discount 15%

{%- liquid 
        assign current_variant = product.selected_or_first_available_variant
        assign pr_tags = product.tags
        assign sale_tag_arr = pr_tags | where:'discount_'
        assign sale_tag = sale_tag_arr | first | remove:'discount_' | times: 0.01
        assign sale_price = current_variant.price | times: sale_tag
-%}

Hope it helps!

If you find my answer helpful for you, please mark it as a solution. Thank you and good luck