php booking price help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: php booking price help

Post by Celauran »

If the price is set in the admin, you definitely don't want to be hardcoding anything. Once they're ready to check out, you can count the number of classes they've purchased. If it's two or more, check that they're on recurring days and apply the discount. The discount could possibly even be its own line item with a negative value.

What if they select three classes? Does the third get the discount as well? Is it for consecutive days, or specific to Wednesday and Thursday?
Post Reply