O'Reilly logo

Take My Money by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applying Discounts

It’s another fine day in the Snow Globe Theater offices when the phone rings. It’s ConHugeCo, a local business. ConHugeCo would love to take its staff to a production of Much Ado About Nothing, and they are willing to buy hundreds of tickets.

But they want a 25 percent discount.

As the site currently exists, we have no good way to offer this price, short of creating or editing a whole bunch of ticket objects, which creates other problems. Instead, we’d like to allow the purchase to go through as normal, but apply a discount to it.

I wasn’t sure I wanted to talk about discounts and discount codes here—they tend to be extremely specific to the domain you are working in. But nearly every business that exchanges money on the web ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required