PHP Classes
elePHPant
Icontem

ShoppingOptimizer: Find shopping cart items with most discounts

Recommend this page to a friend!
  Info   View files Example   Demos   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-10-25 (3 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 65 This week: 3All time: 9,046 This week: 226Up
Version License PHP version Categories
shoppingoptimizer 1.0.0GNU General Publi...5.5PHP 5, E-Commerce
Description Author

This class can find shopping cart items with most discounts.

It can take an array of items and a list of available coupons to find the those that provide the greatest discount on the whole shopping cart items total.

The class returns a list of possible cart combinations using the different discount coupons that can be applied.

Innovation Award
PHP Programming Innovation award nominee
December 2017
Number 12
Many sites implement shopping carts that support applying one or more discount coupons.

Each discount coupon may provide a better discount than others. This class is able to find which coupon of a list is better.

Manuel Lemos
  Performance   Level  
Name: Ovunc Tukenmez <contact>
Classes: 11 packages by
Country: Turkey Turkey
Age: 31
All time rank: 82415 in Turkey Turkey
Week rank: 134 Up1 in Turkey Turkey Up
Innovation award
Innovation award
Nominee: 5x

Details

ShoppingOptimizer PHP Class

<strong>ShoppingOptimizer </strong> is a <strong>PHP</strong> class that is used to find the most profitable ways to purchase items using cart discount coupons in one or multiple cart parts.

Example script is included in the package. (example.php)<br /> <h2>Sample Outputs</h2> <ul> <li>Example with no budget limit (example_output.html) (example_output_sample.png)</li> <li>Example with budget (example_with_budget_output.html)</li> </ul>

<h2>Public Methods of Class</h2> <ul> <li>getAvailableCartSortOrders()</li> <li>getCartSortOrders()</li> <li>getCoupons()</li> <li>getDiscountedCarts()</li> <li>removeMaximumBudget()</li> <li>resetItems()</li> <li>setCartSortOrders()</li> <li>setCoupons()</li> <li>setDefaultCartSortOrders()</li> <li>setItems()</li> <li>setMaximumBudget()</li> <li>setOnlyDistinctSum()</li> </ul>

<h2>Class Requirements</h2> <ul> <li>PHP 5 >= 5.5.0</li> </ul>

Thanks for checking out this class! If you have improvement idea or bug fix, please feel free to contribute this class.<br /> <br /> <br /> Ovunc Tukenmez ovunct@live.com

  example script outputExternal page   example script with budget outputExternal page  

Open in a separate window

Open in a separate window

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example script
Accessible without login HTML file example_output.html Output Sample output
Accessible without login Image file example_output_sample.png Data Auxiliary data
Accessible without login HTML file example_with_budget_output.html Output Sample output
Accessible without login Plain text file README.md Doc. Documentation
Plain text file ShoppingOptimizer.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:65
This week:3
All time:9,046
This week:226Up