Skip to content

BonusOffer

Displays the Discount Text Description used with the BOGO optional module.

ACEweb Area(s)

BonusDeal.awp

Required Parameters

None

Optional Parameters

  1. Lead-in – If a string is supplied it will be used as the lead in to the offer. Defaults to “Buy one, get one” if the target is 1, or “Buy N, get the next one” if BonusDeal HowMany parameter is > 1.

  2. Offer – Describes the deal. Default is described below in Offer Deal section.

  3. Opening tag – will be pre-pended to the output, if it’s nonempty.

  4. Closing tag – will be appended to the output. If you supply an opening tag, you must include a closing parameter.

Offer Deal

If the Offer parameter (#2) is blank, these are the defaults used for the discount text description (discount amount is set in BonusDeal INI Discount parameter):

0,"free!"

.5,"at half price!"

.33,"for one third off!"

.34,"for one third off!"

.25,"for one fourth off!"

5,"for just Five Bucks!"

.99,"for 99% off!"

999,"for $$,$$9.99!"

If you want a different statement, place a file called BonusOffer.txt into the wconnect\ace folder. The file should contain comma delimited entries (based on above statement) consisting of discount amounts followed by the phrase to be associated with it. Note: above defaults will be used for any amount not explicitly set in the BonusOffer.txt file.

A sample BonusOffer.txt file can be downloaded from the ACEware website.

Example(s)

<%= BonusOffer('Enroll in '+TRANSFORM(this.page.nThreshold)+' course'+iif(this.page.nThreshold=1,'','s')+' from our '+quikcode(bonusterm(1),"discript","grou")+' group, get the next one ')%>

Returns "Enroll in [number of courses from BonusDeal INI HowMany parameter] course[s] from our [grouping code description as set in BonusDeal INI GROUP parameter] group, get the next one [discount details as set in BonusDeal INI Discount parameter]."

<%=BonusOffer("Purchase 5, get the 6th ")%> Purchase 5, get the 6th for 15% off!

<%=BonusOffer("Purchase 5, get the 6th ", "at a 15% discount")%> Purchase 5, get the 6th at a 15% discount

<%=BonusOffer("Purchase 5, get the 6th ", "at a 15% discount","<strong>","</strong>"))%> Purchase 5, get the 6th at a 15% discount

<%=BonusOffer(,,"<strong>","</strong>")%> Buy 5, get the next one for 15% off!