Dynamic Pricing
 
Dynamic pricing capability allows for the creation of family pass packages where the price of the package is computed based on the mixture of members. Items and modifiers are now displayed in red if they aren't valid or if the PREVENTUSE() Dynamic Pricing Rule has been applied. The condition SHAREMOD now only refers to modifiers other than one's self. (So, if the item MAIN has a modifier MOD1, the condition SHAREMOD(,,MOD1) is false until another MOD1 is added.)
HASMODS(D,C,I) - is equivalent in functionality to COUNTMODS. It returns a numeric value for functions that do mathematics (i.e., COMPARE)
SHAREMODS(D,C,I) - counts the number of other modifiers matching.
SHAREMODSPREV(D,C,I) - counts the number of previous modifiers matching.
 
These changes allow for a Family Pass option where the price is computed depending on the mixture of members.
 
Example rule:
IF(DCI(,,ADULT), SETPRICE(575)
IF(COMPARE(SHAREMODSPREV(,,ADULT)+SHAREMODSPREV(,,SENIOR),>=2),
PREVENTUSE()))
IF(DCI(,,SENIOR), SETPRICE(475)
IF(COMPARE(SHAREMODSPREV(,,ADULT)+SHAREMODSPREV(,,SENIOR),>=2),
PREVENTUSE()))
IF(DCI(,,YOUTH), SETPRICE(375)
IF(COMPARE(SHAREMODS(,,ADULT)+SHAREMODS(,,SENIOR)+
SHAREMODSPREV(,,YOUTH),>=4),SETPRICE(25)))
IF(DCI(,,CHILD), SETPRICE(235)
IF(COMPARE(SHAREMODS(,,ADULT)+SHAREMODS(,,SENIOR)+SHAREMODS(,,YOUTH)+ SHAREMODSPREV(,,CHILD),>=4),SETPRICE(25)))
 
This rule can be assigned to all modifiers of the main family pass package item. In this case, the modifier nicknames are SENIOR, ADULT, YOUTH and CHILD and all are configured as Create Pass item types. The Family Pass package only allows a total of two ADULT or SENIOR modifiers. If more than two of these modifiers are added, the PREVENTUSE() function is enabled. If four modifiers are added, the subsequent YOUTH/CHILD modifiers are discounted to $25.00.
 
Note: The use of SHAREMODS and SHAREMODSPREV in order to make sure the least expensive members are discounted first regardless of the order of the modifiers.
 
Example:
Enabling functionality in order that the user must select at least one ADULT or SENIOR modifier using the new HASMODS(D,C,I) condition:
 
IF(COMPARE(HASMODS(),>0),
IF(COMPARE(HASMODS(,,ADULT)+HASMODS(,,SENIOR),1-2),,PREVENTUSE()))
 
This rule is assigned to the main Family Pass package item. If the item does not have at least one ADULT or SENIOR modifier, then the PREVENTUSE() function kicks in.