This is a discussion on Easy Discount within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; This modifies the easy discount code so it follows the oSC naming policy of creating the file as {name}.php & ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| This modifies the easy discount code so it follows the oSC naming policy of creating the file as {name}.php & the configuration_key as MODULE_ORDER_TOTAL_{name}_SORT_ORDER. I did this specifically to be compatible with ot_sort_order Folder contrib, but may be needed for other contribs. ***IMPORTANT*** DISABLE YOUR CURRENT EASY DISCOUNT MODULE BEFORE INSTALLING THIS UPDATE 1. catalog:includes:languages:english:modules:order_t otal:ot_easy_discount.php: CHANGE: define('MODULE_EASY_DISCOUNT_TITLE', 'Easy Discount'); define('MODULE_EASY_DISCOUNT_DESCRIPTION', 'Easy discount.'); TO: define('MODULE_ORDER_TOTAL_EASY_DISCOUNT_TITLE', 'Easy Discount'); define('MODULE_ORDER_TOTAL_EASY_DISCOUNT_DESCRIPTI ON', 'Easy discount.'); 2. catalog:includes:modules:order_total:ot_easy_disco unt.php: CHANGE: function ot_easy_discount() { $this->code = 'ot_easy_discount'; $this->title = MODULE_EASY_DISCOUNT_TITLE; $this->description = MODULE_EASY_DISCOUNT_DESCRIPTION; $this->enabled = ((MODULE_EASY_DISCOUNT_STATUS == 'true') ? true : false); $this->sort_order = MODULE_EASY_DISCOUNT_SORT_ORDER; $this->output = array(); } TO: function ot_easy_discount() { $this->code = 'ot_easy_discount'; $this->title = MODULE_ORDER_TOTAL_EASY_DISCOUNT_TITLE; $this->description = MODULE_ORDER_TOTAL_EASY_DISCOUNT_DESCRIPTION; $this->enabled = ((MODULE_ORDER_TOTAL_EASY_DISCOUNT_STATUS == 'true') ? true : false); $this->sort_order = MODULE_ORDER_TOTAL_EASY_DISCOUNT_SORT_ORDER; $this->output = array(); } 3. catalog:includes:modules:order_total:ot_easy_disco unt.php: CHANGE: $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_EASY_DISCOUNT_STATUS'"); TO: $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_EASY_DISCOUNT_STATUS'"); 4. catalog:includes:modules:order_total:ot_easy_disco unt.php: CHANGE: return array('MODULE_EASY_DISCOUNT_STATUS', 'MODULE_EASY_DISCOUNT_SORT_ORDER'); TO: return array('MODULE_ORDER_TOTAL_EASY_DISCOUNT_STATUS', 'MODULE_ORDER_TOTAL_EASY_DISCOUNT_SORT_ORDER'); 5. catalog:includes:modules:order_total:ot_easy_disco unt.php: CHANGE: ('Activate Easy Discount', 'MODULE_EASY_DISCOUNT_STATUS', 'true', 'Do you want to enable the Easy discount module?', '6', '1','tep_cfg_select_option(array('true', 'false'), ', now())"); TO: ('Activate Easy Discount', 'MODULE_ORDER_TOTAL_EASY_DISCOUNT_STATUS', 'true', 'Do you want to enable the Easy discount module?', '6', '1','tep_cfg_select_option(array('true', 'false'), ', now())"); 6. catalog:includes:modules:order_total:ot_easy_disco unt.php: CHANGE: ('Sort Order', 'MODULE_EASY_DISCOUNT_SORT_ORDER', '2', 'Sort order of display.', '6', '2', now())"); TO: ('Sort Order', 'MODULE_ORDER_TOTAL_EASY_DISCOUNT_SORT_ORDER', '2', 'Sort order of display.', '6', '2', now())"); NOT A COMPLETE PACKAGE More...
__________________ Michael Sasek osCMax Developer
|
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Quantity discount | Keilew | osCMax v2 Customization/Mods | 4 | 08-05-2007 09:03 AM |
| Discount Plus | michael_s | New osCommerce Contributions | 0 | 01-12-2007 02:14 AM |
| "easy discount" anyone? | ganast | osCMax v2 Customization/Mods | 0 | 07-13-2006 02:16 PM |
| Discount Coupon and Authorize.net - NOT PULLING DISCOUNT... | irwin04 | osCMax v1.7 General Mods Discussion | 5 | 03-07-2005 06:59 PM |
| Discount Contributions?? | ReginaStelling | osCommerce 2.2 Modification Help | 0 | 08-18-2004 03:34 AM |