Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / More payment options based on check and money order

More payment options based on check and money order

Locked

Views: 1,626

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
18 Jan 2008, 12:30 PM
#1
martyndw2005 avatar

martyndw2005

Zen Follower

Join Date:
Aug 2005
Posts:
70
Plugin Contributions:
0

More payment options based on check and money order

Hi,

We currently offer check and money order payment method on our website using zencart 1.3.7.1. This has been renamed and configured for the following methods of payment in one
postal order/ bacs / Telephone order

however we would like to have these options split ie create new modules from the check and money order files:-

postal order
bacs
telephone order

I have looked through the forum and cant see how i could do this by cloning the money order payment option or by other means.

So i looked here:-

http://www.zen-cart.com/wiki/index.php/Developers_-_Payment_Classes
did not find a solution here

Then I looked in the zencart book (e-start your web store with zencart) i could see the payment options available pages 140-152 but no information on creating another option from the check and money order payment option.

I would like to know if i copy
The payment class is stored in

includes/modules/payment/<module name>.php 

while all text is stored in the appropriate language file

includes/languages/<current language>/modules/payment/<module name>.php 

and rename them for what i want and configure the different options like the text shown displayed is that going to provide what i want or will i cause problems with the programming?

if you want to see what i mean here is the website http://www.beeunique.co.uk/

regards

Martyn

18 Jan 2008, 2:43 PM
#2
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

Re: More payment options based on check and money order

As well as copying the payment class, you need to carry out a few slight changes.

IMPORTANT - The filename controls everything and can only be made up of alpha-numeric characters - no spaces, symbols or underscores.

1 - change the CLASS NAME, within the class file. This needs to be EXACTLY the same as the filename.
2 - change the CLASS FUNCTION name, which needs to be same as the filename.
3 - change the CLASS CODE variable, which is defined with $this->code = 'xxxxxx'; and is located in the first function. This CLASS CODE variable, again, MUST be the same as the filename.
4 - All constants must be changed, where they are inserted into the database. For instance, if you are copying the cc.php file, you would find a constant in the configuration table called MODULE_PAYMENT_CC_STATUS. If you are going to copy this module, you MUST change the constants throughout, so this one for example could be replaced with MODULE_PAYMENT_YOUR_MODULE_NAME_STATUS.
This is vital, as if you leave these in, and they exist in another module, all payment modules using the same constants may become unstable, and stop functioning.

Absolute