Post by jamesg » Mon Apr 25, 2016 2:32 am

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?

Newbie

Posts

Joined
Thu Feb 18, 2016 4:23 am

Post by artcore » Mon Apr 25, 2016 4:40 am

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

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by jamesg » Sat Apr 30, 2016 6:15 am

Thats great cheers man!

Really appreciate your reply.

Newbie

Posts

Joined
Thu Feb 18, 2016 4:23 am
Who is online

Users browsing this forum: No registered users and 9 guests