Coupons, discounts and custom expressions
I have created a Coupon field on cart.php, and tested the functionality using the Solution Recipe and the discount facility in the eCart object - all good.
However, I have custom criteria that must be met for the person to be eligible for the discount, which is applied to a second member of the same family joining as a member. For obvious reasons the first member must have current membership before the discount is allowed.
The second member will be required to enter the alphanumeric membership number of the first family member into the coupon field, which must meet the following criteria against the recordset/table called member_details:
To allow the discount, the criteria for the value entered in the coupon field are:
That the value exists in the membershipNumber column in the member_details table
that the value in the membershipStatus column that corresponds to that membershipNumber (or membersID) equals 'current' OR 'verifying'
membersID (this is the unique ai index)
I have tried doing this by custom expressions within the discount tab of the eCart object, as well as playing around with server behaviours but have to admit to being totally lost.
Can you help please?