#1 It is possible to use the new calculation functionality to implement a Product Field that has a negative price which would could be used to apply a discount.

You would disable the quantity option on that field so that a quantity of 1 is assumed if it is present and then you could then apply conditional logic to this field and use that to determine when it should or should not be displayed and thus applied.

You would have to be able to determine what that discount is via a calculation because the Price of the Product Field when configured as a Calculation field type is the result of the calculation.

The trick to having the calculation return a negative value instead of a positive value will be to create your calculation so that it returns the amount of the discount you want to apply as a positive number and then wrap that calculation in parentheses and multiple it by -1.

For example:

(1+1) * -1

That would result in a value of -2. 1+1 is 2 and when you multiple it by -1 it will result in the same value but as a negative. Just keep in mind that if the first part of the calculation results in a negative value, multiplying it by -1 would do the opposite and return a positive value.

Because the Product Field is currently the only Pricing Field that supports calculations, the discount wouldn't actually apply to one of the other product field on your form like an option would. It would result in having a new Product line item on the order that has a negative price which results in discounting the total.

#2 I can't tell if calculations will be good for this scenario or not. It sounds like it could be if you setup the calculation properly. All I can say is give the beta a shot and play around with the calculation functionality.

Posted 3 years ago on Thursday April 12, 2012 |

Permalink