View Full Version : Price Break Integration

12-20-2004, 09:48 AM
I hope this is kosher to post here:

I need to integrate the price-break-1.11.2 module:


At issue is the already embedded (oscMAX 1.7) Price Per Customer Module:


Either I need to remove the PPC module... which I really don't want to do, or I need to change the Price Break module to recognize the PPC discounts. In order to do this, some PPC code needs to be reworked, and provision made for it in the PriceFormatter.php class. The files that are affected are:


...and the PriceFormatter.php class from the Price Break module needs to have some code added to accomodate PPC discounts.

I think that one of the original authors or someone familiar with the code could do this without too much study of the code... I on the other hand would find it difficult at best.


PS: whatever comes of this, I will post the code back to the forum so that it can be integrated in 1.7 if that is wanted.

12-20-2004, 10:22 AM
Actually it appears that the following code just needs to be integrated into the PriceFormatter.php class...


global $customer_id;
$customer_group_id_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id = '". $customer_id . "'");
$customer_group_id = tep_db_fetch_array($customer_group_id_query);
$orders_customers_price = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where customers_group_id = '". $customer_group_id['customers_group_id'] . "' and products_id = '" . $products['products_id'] . "'");
if (($orders_customers = tep_db_fetch_array($orders_customers_price)) && ($customer_group_id['customers_group_id'] != 0)) {
$products_price = $orders_customers['customers_group_price'];

12-20-2004, 08:19 PM
Well, I have it almost done as an either/or deal... if you have a customer specific price, you get that, otherwise you get the tiered discount. Pretty lame implementation, but its all I need for this particular shop. I'll post the how-to file once I have finished it up, and tested it a bit.


PS: still looking for someone who might do a nice integration using the PriceFormatter.php class.

12-22-2004, 01:47 PM
I personally would wait until Master/Slave is done, and use that, however, if you need this now (like I did), I have hacked the Price Break mod into oscMAX 1.7

Small caveat: it does not do lowest price comparrison with per customer pricing. Either the customer has per customer price breaks and does not get quantity price breaks, or the customer has no per customer price breaks and gets quantity breaks.

Larger caveat: I have not done extensive testing.

The attached files should drop in on top of an unmodified oscMAX1.7 (you have to change the file names and copy them to the proper directories)


PS: the original contrib for MS2.2 can be seen here: