osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Easy Discount

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 & ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 08-15-2007, 10:20 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post Easy Discount

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


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 07:27 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax