Guest Posted May 19, 2004 Posted May 19, 2004 Hi Guys, I'm trying to do a mod on the "Loyalty Discount" Contribution but I'm not good with PHP at all, can some one help me with the Programming please... Thanks. Here it goes... This file contains the define : /catalog/includes/languages/english/modules/order_total/ot_loyalty_discount.php define('MODULE_LOYALTY_DISCOUNT_TITLE', 'Customer Loyalty Discount'); define('MODULE_LOYALTY_DISCOUNT_MONTH', 'month'); define('MODULE_LOYALTY_DISCOUNT_QUARTER', 'quarter'); and the rest... you get the idea. B) This file contains the processing codes: /catalog/includes/modules/order_total/ot_loyalty_discount.php and I think this is the line I'm looking for : function process() { global $order, $ot_subtotal, $currencies; $od_amount = $this->calculate_credit($this->get_order_total(), $this->get_cum_order_total()); if ($od_amount>0) { $this->deduction = $od_amount; $this->output[] = array('title' => $this->title . ':<br>' . MODULE_LOYALTY_DISCOUNT_SPENT . $currencies->format($this->cum_order_total) . $this->period_string . MODULE_LOYALTY_DISCOUNT_QUALIFY . $this->od_pc . '%:', 'text' => '<b>' . $currencies->format($od_amount) . '</b>', 'value' => $od_amount); $order->info['total'] = $order->info['total'] - $od_amount; if ($this->sort_order < $ot_subtotal->sort_order) { $order->info['subtotal'] = $order->info['subtotal'] - $od_amount; }}} Which should out put something like this when check out: as like you see on the picture, I would like to be able to write the total amount that the cutomer has purchased, and the discount percentage they qualify for in the customer's "My Account" section in catalog/admin.php like here : However, I've been trying this for the pass I don't know how many hours and counldn't get it to work..... Please help me out on this if you know how, If you need the full codes, here it is : http://www.oscommerce.com/community/contributions,1286 Thanks in advance.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.