How can I get the Quantity of products selected instead of the price total?

  • Profile Image
    Asked on January 18, 2018 at 09:47 PM
  • Profile Image
    Answered on January 19, 2018 at 03:55 AM

    This is not doable since you're using a payment field (PAYPAL). The only output you will get from a payment field would be the total price.

    I'm assuming your prices are not final yet, correct? I don't think you will be selling 3 different products (shirt, sweatshirt, shoes) that are all priced at exactly $100 a piece. If your products were of the same prices, then you can just divide the total by $100 and you'll get the quantity.

    e.g. $1000 / $100 = 10 Quantity

    But if the prices will be changed, then your only option is to build your products outside the payment field. Below are the key features you need to get this done if you're interested.

    🔘 CALCULATION VALUES - You would need this feature to assign values to your fields when setting up your products.

    Complete guide: How-to-Assign-Calculation-Value

    🔘 FORM CALCULATION WIDGET - Instead of having the payment field automatically compute the total for you, you would need to calculate this yourself using this widget.

    Complete guide: How-to-Perform-Form-Calculation-Using-a-Widget

    🔘 PASS THE CALCULATED VALUE TO YOUR PAYMENT FIELD - And finally, you will pass the calculated value to your payment field so you can charge them through PayPal.

    Complete guide: How-to-Pass-a-Calculation-to-a-Payment-Field 

    Give it a spin with the demo forms given on the guides above and let us know if you'd need more help.