Skip to main content

Add product price to Recurpay widget

Quick steps to help you add in product price to Recurpay widget.

Updated over 3 years ago
  1. To show the product prices with Recurpay subscription app widget, there will be a few javascript customizations required on the file named as recurpay.liquid

  2. Pull the product price or the selected variant price from the liquid variable {{product.selected_or_first_available_variant.price}}

  3. Every plan displayed on the subscription widget will have a data-plan-discount the attribute which represents the percentage of discount applicable for the plan can be used to show up the comparison of price and the subscription price after the discount.

  4. By using javascript functions use product price and discount percentage to calculate and show the subscription price under the widget.
    ​

    Subscription app Shopify

Note: In case the prices of your variants are different use a callback function with variant selection to repeat the process and update the price dynamically.

Did this answer your question?