Page 1 of 1

Duplicate Payment Module

Posted: Mon Apr 25, 2016 2:32 am
by jamesg
I am wanting to duplicate my worldpay payment module so that I can manually edit the files to create an initial % payment option at checkout - effectively options for a deposit.

I'm quite new to the opencart system - which files do I need to copy to make this happen? Could anybody give me some guidance please?

Re: Duplicate Payment Module

Posted: Mon Apr 25, 2016 4:40 am
by artcore
Hi and welcome :)
Basically you need to change all related files for admin and the catalog side.
Assuming the files are world_pay.xxx
admin: copy and rename:
controller>payment>world_pay.php
language>en-gb>payment>world_pay.php
model>payment>world_pay.php (if present)
view>payment>world_pay.tpl
...and the same for the catalog with slightly different folders for the view. They are as it were separate sites.

if you want the duplicate to have its own settings make sure you rename all inputs from world_pay_some_setting to world_pay2_some_setting and do the same in the controller including the section where it saves to the settings table!
Something like ...$this->model_setting_setting->editSetting('word_pay2',....);

Hope that helps,
Cheers

Re: Duplicate Payment Module

Posted: Sat Apr 30, 2016 6:15 am
by jamesg
Thats great cheers man!

Really appreciate your reply.