Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Promo Code Logic

Backend

We have two promotion types:

Multiplied by person

This promotion multiplies the discount by the number of people in the reservation.

Example:

If PROMOPERSON gives a discount of 100 baht, and the user books a package priced at 500 baht for 6 adults, the total discount is 600 baht.

Package price 500 baht x 6 adults   3,000
You saved                             600
Total prepaid                       2,400

We can also set a maximum discount cap. If the cap is 400 baht, the result becomes:

Package price 500 baht x 6 adults   3,000
You saved                             400
Total prepaid                       2,600

Even though 6 adults were selected, the discount stays capped at 400 baht.

Multiplied by package

This promotion multiplies the discount by the number of packages in the reservation.

Example:

If PROMOPACKAGE gives a discount of 50 baht, and the user books a package priced at 300 baht with quantity 5, the total discount is 250 baht.

Package A 300 baht x 5              1,500
You saved                             250
Total prepaid                       1,250

We can also set a maximum discount cap. If the cap is 200 baht, the result becomes:

Package A 300 baht x 5              1,500
You saved                             200
Total prepaid                       1,200

Even though 5 packages were selected, the discount stays capped at 200 baht.

For All You Can Eat packages, the discount follows the multiplied by person logic instead of multiplied by package.