Tuesday, March 15, 2011

Best practices for managing pricing/discount business rules on rails

I am fairly new to Rails and I have never developed a large application. A friend of mine and I are developing two separate applications and we found out we both have a need for a way to generically manage pricing / discount rules.

Scenario: Say you have a conference registration application and depending on who uses the application, they may choose to offer different pricing plans. $50 1 attendee $40 >5 attendees Exhibitor gets 3 free attendees and $30 each additional

Instead of baking in the specifics of these rules, it would be nice to abstract it in some way so rules can change over time and by conference.

What are the best practices for handling this? Are there Rails plugins? We have both searched, but have yet to find the solution.

From stackoverflow
  • I also don't know of an existing plugin for this but since you have at least two apps that need this why not try and make it a rails engine?

    That way you and your friend can halve your effort and have something you can open source and show off and improve via community feedback.

    noel_g : we are both newbies, so it may be something we can do when we gain more experience.
  • I think you should have a look at RuleBy. I haven't used it myself, but am still meaning to find the time to experiment with it. It should solve precisely these problems.

0 comments:

Post a Comment