O'Reilly logo

Learning Laravel 4 Application Development by Hardik Dangar

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

Managing Foldagram pricing

The next functionality we need to build for the administrator is to manage the pricing per Foldagram based on range. Jordan wants to give discounts to users who buy credits (buy credits and prepay for Foldagram). Say if you are buying seven credits, you will pay less as the Foldagram price will depend on the range as follows:

  • 1 to 4 Foldagrams: 4 USD/Foldagram or per credit
  • 5 to 10 Foldagrams: 3.5 USD/Foldagram or per credit
  • 11 to 20 Foldagrams: 3 USD/Foldagram or per credit

We will need to build an interface that will allow our admin to add price and also manage pricing. Let's start building an interface for to add pricing.

Adding pricing

As you can see, the interface is quite simple; we just need to ask admin about the "from" ...

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