PDA

View Full Version : Discounts Custom Expression


jdoane282989
05-02-2009, 06:32 AM
I'm trying to add a discount on the shopping cart page for customers who are members of a certain association. If they belong to the group, I want to give them $5 off their first purchase.

I have put a radio group with "yes" and "No" for choices. I want a custom expression that will give the discount if the customer says "Yes." (proof might be a memberID)

Can anyone help me design a custom expression in eCart discounts that will work.

Here is the code for my radio buttons:

<label>
<input name="green_alliance" type="radio" id="green_alliance_0" value="yes" />
Yes</label>
<label>
<input name="green_alliance" type="radio" id="green_alliance_1" value="no" checked="checked" />
No</label>

Thanks

Ray Borduin
05-05-2009, 09:54 AM
You would probably want to use something like SecurityAssist or the user registration solution pack, since you would need user login for something like this to work to keep track of things like member ID and whether this is someone's first purchase or not.

At the end of the day you would store the value as a session variable and create a discount rule from the discounts tab to check that session variable value and offer the appropriate discount.

jdoane282989
05-06-2009, 07:44 PM
Hi Ray,

Thanks for helping me find a solution to this.