Meir Posted March 9, 2011 Posted March 9, 2011 We have a gallery of coupons, where each coupon has a coupon code. This code represents the product it appears on and the offer. We would like the customer to choose the offer from an image gallery, and have a rule that automatically figures out the coupon code. I tried two rules: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ RULE 1: var Var1 = "12"; //12 represents product yada yada if(Field("Offer1") == "$1 off regular subs") //offer1 'nickname' return Var1 + '01'; if(Field("Offer1") == "$1 off giant sub") //offer 2 'nickname' return Var1 + '02'; if(Field("Offer1") == "$1.50 off giant sub") //offer 3 'nickname' return Var1 + '03'; and so on for the rest of the 61 offers with a default value _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Rule 2 var Var1 = "12"; //12 represents product yada yada if(Field("Offer1") == "1201.eps") //offer1 file name return Var1 + '01'; if(Field("Offer1") == "1202.eps") //offer 2 file name return Var1 + '02'; if(Field("Offer1") == "1203.eps") //offer 3 file name return Var1 + '03'; and so on for the rest of the 61 offers with a default value _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ I have these as text rules because the return value is text. Neither rule works though. Each one displays the default value no matter the input. What is the proper way to get information from a graphic field for a text rule? Can anybody help me with this?
Meir Posted March 9, 2011 Author Posted March 9, 2011 We have a library of coupons. Each coupon is an eps file that they can choose and populate any product that has a coupon from the selection of approved offers. Each offer has a unique coupon code that represents the item and offer. I need to create a rule that takes the offer they choose from the image gallery, and return the appropriate coupon code. I tried two rules: _ _ _ _ _ _ _ _ _ _ _ _ _ Rule 1 var Var1 = "12";
Recommended Posts
Archived
This topic is now archived and is closed to further replies.