Difference between revisions of "Ticket Class Rules"

From Rts
Jump to: navigation, search
Line 26: Line 26:
 
|}
 
|}
  
 +
==Examples==
  
 
A rule that enables a ticket at or after 6pm and before 3am.
 
A rule that enables a ticket at or after 6pm and before 3am.
  
'''(Showtime >= cdate("6:00pm"))'''
+
<code>(Showtime >= cdate("6:00pm")) or (Showtime < cdate("3:00am))</code>
  
'''or'''
+
A rule that enables a ticket at or after 6pm Friday and before 3am Saturday.
 +
 
 +
<code>((Showtime >= cdate("6:00pm")) and DayofWeek="FRI") or ((Showtime < cdate("3:00am)) and DayofWeek="Sat")</code>
  
'''(Showtime < cdate("3:00am))'''
 
  
A rule that enables a ticket at or after 6pm Friday and before 3am Saturday.
 
  
'''( (Showtime >= cdate("6:00pm")) and DayofWeek="FRI" )'''
+
For 3D performances, add this to the rule.
  
'''or'''
+
<code>(ThreeD=1)</code>
  
'''( (Showtime < cdate("3:00am)) and DayofWeek="Sat" )'''
 
  
The same rule but only for 3D performances.
 
  
'''ThreeD=1 and ('''
+
To add seat type price codes, used for different ticket prices within the same auditorium based on seat type
  
'''( (Showtime >= cdate("6:00pm")) and DayofWeek="FRI" )'''
+
<code>(instr(seattypepricecode,"PriceCodeNameHere")=1)</code>
  
'''or'''
+
or
  
'''( (Showtime < cdate("3:00am)) and DayofWeek="Sat" )'''
+
<code>(instr(seatpricecode, "PriceCodeNameHere")=1)</code>
  
''')'''
+
Replace PriceCodeNameHere with the name of the price code set up in Reserved Seating.

Revision as of 19:09, 8 December 2018

Ticket class rules are used to automatically enable certain ticket types depending on show time, film, auditorium, and/or seat classification. Rules are written in the expression evaluator and applied for each ticket. There are variables that are set to the current film, showtime, auditorium, and seats when the rule is evaluated. Class rules can be mixed case eg. Mon is the same as MON.

Varibles in class rules
Showtime The time the performance starts. Compared with the cdate() operator.
DayOfWeek The day the performance starts. Values are abbreviated as 3 characters quoted strings using US 3 day abbreviations. (Mon, Tue, Wed...)
Rating The text rating that is assigned to the film.
ThreeD If the performance is marked as a 3D performance.
PlaceRuleCode A text code that is assigned to a location place.
SeatTypePriceCode A text code that is assigned to a reserved seating seat type in reserved seating.
SeatPriceCode A text code this is assigned to a specific seat in reserved seating.

Examples

A rule that enables a ticket at or after 6pm and before 3am.

(Showtime >= cdate("6:00pm")) or (Showtime < cdate("3:00am))

A rule that enables a ticket at or after 6pm Friday and before 3am Saturday.

((Showtime >= cdate("6:00pm")) and DayofWeek="FRI") or ((Showtime < cdate("3:00am)) and DayofWeek="Sat")


For 3D performances, add this to the rule.

(ThreeD=1)


To add seat type price codes, used for different ticket prices within the same auditorium based on seat type

(instr(seattypepricecode,"PriceCodeNameHere")=1)

or

(instr(seatpricecode, "PriceCodeNameHere")=1)

Replace PriceCodeNameHere with the name of the price code set up in Reserved Seating.