Php – The best possible way to implement Business Rules in PHP

business-intelligencebusiness-logicbusiness-rulesPHP

I'm planning to write an e-commerce app using PHP & MySQL with lots & lots of custom rules. Say for example, I want to have a rule like "Give Customer X, a 10% a discount for Product Y if he bundles it with Product Z"

I've heard about Business rules engine(in Java and others). I intend to implement a flexible business rules functionality without hard-coding anything into PHP and with a good, solid architecture with the goal of maintainability and re-usability with the help of PHP OOPS.

Please advice me on the following aspects:

Does decision table fit my intended purpose?

How can I change rule/business logic of the PHP application without redeploying/re-writing?

Best Answer

I used to work with magento, which was an e-commerce platform (in php-mysql) that was doing exactly that. There is too-much effort for doing the functionality you want from scratch, so integrating an off-the-shelf solution might be more appropriate.

From the answer above: "Forget business people updating them, they don't have the necessary skill." This is timeless advice. People have tried it in the past, it always failed...