Skip to main content
All CollectionsBuilding Calculators
Using default Shopify price in formula - Single calculator for similar products with different price
Using default Shopify price in formula - Single calculator for similar products with different price

Shopify product price in the formula.

K
Written by Kristina
Updated over a week ago

If you have a store with multiple products following the same pricing logic but with different default/base prices then you don't have to create a unique calculator for each product. You can use the same calculator with a variable - "shopify_product_price" instead of the constant value (price) in the formula. The variable - "shopify_product_price" would automatically detect the default price set by you for each product.

Please note, when you implement it and view it in the preview mode within the calculator configuration, it will use "10" as the default value as it is not being applied to any specific product.

Example:

  • You are a Rug / Carpet seller with different qualities of rugs in your store. You may want to use the Custom Price Calculator app to calculate the price of the rugs based on the area selected by the customers.

  • Here, the pricing logic may be the same, however, the material price of each rug might vary. Let's assume you set the price as $2 per m. sq. for the standard rug and $5 per m. sq. for the premium in the respective product settings. For the two different products, you can use the same calculator by using the variable - "shopify_product_price" in the formula.
    ​

  • It will automatically detect $5 when applied to the premium rug

  • and will automatically detect $2 when applied to the standard rug


    ​
    ​

Did this answer your question?