Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sk3pt1c

macrumors 6502a
Original poster
Nov 29, 2005
918
6
a simulacrum
so, the thing is, tomatocart has payment modules and i want to charge customers for the "pay on delivery" option, which is not supported, hence i have to edit the module itself.

i quote from TomatoCart's guides:

The payment php files in the “/includes/modules/payment/” are responsible for rendering payment information for customers and handling payment gateway notifications; the files in the “/admin/includes/modules/payment/” contains the configuration options to configure the payment module. And each payment method also have a language resource XML file in the “/includes/languages/LANGUAGE_CODE/ modules/payment/”.

so i basically have to edit the first two files, the one in "admin" and the one in "includes", and then update the language files...

i'm uploading the three files in folders that denote their location in a zip file.

i've edited the "admin" cod (cash on delivery) file and added the following, basically taken from a shipping method, that includes cost details (i'm adding the file in the zip file):

Code:
$osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Payment Cost', 'MODULE_PAYMENT_COD_COST', '3.50', 'The payment cost for all orders using this payment method.', '6', '0', now())");
      $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_PAYMENT_COD_TAX_CLASS', '0', 'Use the following tax class on the payment fee.', '6', '0', 'osc_cfg_use_get_tax_class_title', 'osc_cfg_set_tax_classes_pull_down_menu', now())");

i've also added the respective values in the getKeys() function at the end.

so basically i'm asking for help to edit these files cause i'm not sure if i'm doing the right thing here...
 

Attachments

  • Archive.zip
    6.9 KB · Views: 199
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.