How to show subscription price (with discount) on home page and collections page while using Recharge

Highlighted
New Member
2 0 0

I'm designing my site and using Recharge for subscription billing. I'm trying to get the home page and collections page to show the discounted subscription price instead of the one time buyer price. I believe it has something to do with the product-grid-price and modifying that code, but I'm not 100% sure how to do it. Can anyone help with this?

Thanks,

Eric

0 Likes
Highlighted
Tourist
9 0 1

Hi Eric,

I'm Diego from ReCharge Team. In your case to handle this you have to find the snippet called "product-grid-item.liquid" and use this code in the place where you display the normal price:

{% if product.metafields.subscriptions.subscription_id  %}

    $ {{ product.variants[0].metafields.subscriptions.discount_variant_price }}

{% else %}

    // NORMAL PRICE

{% endif %}

Please try it and if you have any questions or need any help just sent me an email to support@rechargepayments.com and i'll help you in the process.

Best,

- Diego Bechi

Highlighted
New Member
2 0 0

Perfect, that worked.

Thank you Diego.

0 Likes
Highlighted
New Member
1 0 0

Great Reply.. To add the money format you can use  " | money ".

 {{ product.variants[0].metafields.subscriptions.discount_variant_price | money}}

0 Likes