Community Forums

How to create/duplicate a module?

Support for mods, payments, shipping, totals, modules, and languages in OpenCart v1.x

Re: How to create/duplicate a module?

Postby jon21021985 » Sat Nov 27, 2010 2:54 pm

I am also trying to duplicate the featured products module, I have managed to duplicate other modules but there seems to be a step missing, I either get a blank page in the admin for the duplicated module or I seem to lose the session with an invalid token.

has anyone managed to duplicate this module?

thanks
J
jon21021985
 
Posts: 7
Joined: Fri Nov 19, 2010 12:54 am

Re: How to create/duplicate a module?

Postby simple_one » Thu Dec 02, 2010 12:06 am

got a couple of minor hiccups atm in regards to duplicating the 'weight based shipping module'

basically I have downloaded I think all the relevant files and put them into folders reflective of their names like so;

1.admin_controller_language_shipping > weight.php
2.admin_controller_shipping > weight.php
3.admin_view_template_shipping > weight.tpl
4.catalog_language_english_shipping > weight.php
5.catalog_model_shipping > weight.php

Next thing I have done is to rename all the files from 'weight.xxx' to 'weight2.xxx'

now i just want to be sure that i have all the files needed for this operation first and foremost.

here's the next part please refer to screen-shot below;

files4.jpg
files4.jpg (508.29 KiB) Viewed 4086 times


Am i correct to assume that I replace all instances of 'weight' & 'weight_' with 'weight2' & 'weight2_' ?

what about in instances like the following;

$this->load->language('shipping/weight'); >> I assume that this also needs to be changed to
$this->load->language('shipping/weight2'); ?

and/or this code;

$this->data['entry_weight_class'] = $this->language->get('entry_weight_class');
$this->data['entry_weight_class'] = $this->language->get('entry_weight2_class');

apart from that I think Iam nearly there.

once completed I will upload here for others.

My main concern atm is that I have all the files needed for the operation.

Thanks.
???
simple_one
 
Posts: 22
Joined: Wed Oct 27, 2010 5:53 am

Re: How to create/duplicate a module?

Postby mehrdad.t » Wed Dec 15, 2010 10:23 pm

I want create a module that connect to other system's database (dle) and display results in

header.tpl ! please tell me ! ... ???
mehrdad.t
 
Posts: 8
Joined: Sat Dec 04, 2010 12:33 pm

Re: How to create/duplicate a module?

Postby memomium » Thu Dec 23, 2010 3:46 am

Hi Q

I went through the steps to clone a flat rate shipping and everything seemed to have gone correctly except when I try to enable it, i get a message saying

"You do not have permission to access this page, please refer to your system administrator."

I checked the user groups to make sure the permissions were checked off and they are.
Any guesses on why this might be happening?

Thanks for you help.
memomium
 
Posts: 9
Joined: Tue Apr 27, 2010 11:25 pm

Re: How to create/duplicate a module?

Postby Qphoria » Thu Dec 23, 2010 4:22 am

A. You should never need to clone the flat rate. Just use weightbased and create multiple geozones with:
Zone 1: 9999999:5.00
Zone 2: 9999999:10.00
Zone 3: 9999999:15.00

B. you didn't set the user group permissions for the clone
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18199
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: How to create/duplicate a module?

Postby memomium » Thu Dec 23, 2010 5:04 am

hey q

thanks for replying.

i know about the weight based shipping... but the problem was that i needed additional charges per item for different flat rates. i found a mod to incorporate that here (viewtopic.php?f=114&t=17681&start=0) and needed multiple flat rates with the same.

can you point me in the right direction to set the permissions for the new clone?

thanks again
memomium
 
Posts: 9
Joined: Tue Apr 27, 2010 11:25 pm

Re: How to create/duplicate a module?

Postby wandotshop » Sun Jan 02, 2011 4:39 pm

Hi.. Someone teach me how to duplicate "Information"??
coz i need to separate others link page into information no 2...
maybe can put it as "Others Information"?
could someone tell me step by step :( TQ
wandotshop
 
Posts: 38
Joined: Tue Oct 05, 2010 4:15 pm


Re: How to create/duplicate a module?

Postby Kawalya » Tue Jan 18, 2011 10:25 am

Hi, I've just cloned the Bank Transfer module; it works fyn, until the terms and conditions screen, beyond which i run into this error: Fatal error: Class 'Controllerpaymentmymodule' not found in /home/dave/public_html/opencart/system/engine/controller.php on line 42.

Hope somebody can help; Thanks
Kawalya
 
Posts: 12
Joined: Fri Dec 17, 2010 1:31 pm

Re: How to create/duplicate a module?

Postby OnNets » Tue Jan 18, 2011 4:29 pm

wandotshop wrote:Hi.. Someone teach me how to duplicate "Information"??
coz i need to separate others link page into information no 2...
maybe can put it as "Others Information"?
could someone tell me step by step :( TQ


Hi wandotshop,

Here is the duplicated information module I call Guide. Hope this help.

Guide-Module.zip
Duplicate Information Module
(50.13 KiB) Downloaded 454 times
OnNets
 
Posts: 53
Joined: Wed Jan 06, 2010 9:53 am

Re: How to create/duplicate a module?

Postby whitelogicsolutions » Mon Jan 24, 2011 2:35 pm

hi, I am using 1.4.9.3 version of open cart and tried all the step, when i go to Admin >> Extension >> Module, it shows blank line instead of name of Module I have created, and when i press install or edit, it says it doen;t exist.
Please help me, what I am doing wrong.

Thanks
Ash
whitelogicsolutions.com
whitelogicsolutions
 
Posts: 6
Joined: Mon Jan 24, 2011 2:32 pm
Location: United Kingdom

Re: How to create/duplicate a module?

Postby justinv » Thu Feb 17, 2011 12:41 am

This free module might be helpful: http://opencart.hostjars.com/writing-modules. It's more aimed at creating new modules than duplicating, but maybe a similar audience.
justinv
 
Posts: 660
Joined: Tue Oct 12, 2010 5:24 am

Re: How to create/duplicate a module?

Postby bajaber » Sat Feb 19, 2011 11:49 pm

justinv wrote:This free module might be helpful: http://opencart.hostjars.com/writing-modules. It's more aimed at creating new modules than duplicating, but maybe a similar audience.


Is 1.4.9.1 similar to 1.4.9.3 with regards to the skeleton codes?
bajaber
 
Posts: 54
Joined: Mon Dec 27, 2010 1:08 pm

Re: How to create/duplicate a module?

Postby justinv » Sun Feb 20, 2011 1:10 am

There was no change to the module between 1.4.9.1 and 1.4.9.3.
justinv
 
Posts: 660
Joined: Tue Oct 12, 2010 5:24 am

Re: How to create/duplicate a module?

Postby steppen321 » Thu Feb 24, 2011 1:14 pm

OnNets wrote:Here is the duplicated information module I call Guide. Hope this help.

Guide-Module.zip


Thanks for the module - it works, but I have an issue with it.
Module always shows full URL's instead of the ones defined in the "SEO Keyword".

Any help here? (OpenCart 1.4.9.3)
steppen321
 
Posts: 18
Joined: Mon Dec 13, 2010 3:32 pm

Re: How to create/duplicate a module?

Postby memomium » Sat Mar 12, 2011 11:35 pm

does anyone know what effect this will have on the import/export extension if you duplicate a category?
memomium
 
Posts: 9
Joined: Tue Apr 27, 2010 11:25 pm

Re: How to create/duplicate a module?

Postby Ljubo » Tue Apr 05, 2011 1:34 pm

Opencart 1.4.9.4 and I can not use this excellent module.

Have installed the copy of Information module ('Guide'), it showed in the admin panel, but it says Permission denied...
user/user groups checked all, even created new ones, logout, login... no success.

It seems like this new module is not listed at all in the list with permission options...
I have even tried to put it manualy in the table, but I lost the back-end of the OC as the result, so I let it be as original.

Can anybody help what exactly to do so I could reach this new module?
Thank you !
Ljubo
 
Posts: 134
Joined: Mon Jan 31, 2011 2:07 pm
Location: Serbia

Re: How to create/duplicate a module?

Postby thegeekz » Thu Apr 07, 2011 2:12 am

webstudent1 wrote:Well back to creating a new shipping method based on weight based shipping...

Find the 3 php page in admin area for 'weight' (language / model / template)
Change all the weight values from weight to yourshippingname (except the ones used to aquire cart weight)

On the user end (controller) they are Langange and Model (2 files)
Change your text again in language and in model change all the weight values from weight to yourshippingname (except the ones used to aquire cart weight)

Works 100%

WebStudent1



Could you enlighten how is it exactly that it can be done?

I tried and there's error during the checkout process.

"Except the ones used to acquire cart weight" --> could you pin point which are the codes?

I changed everything "weight" to "weight_fe" / "weight_s" but couldn't go pass the checkout... then I just changed back some of the codes to just "weight" but still cannot... (not sure if there are any codes I should not change?????)

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/thegeekz/public_html/o-cart/catalog/model/shipping/weight_s.php on line 49

Maybe a part of the coding in that file will help you to detect the problem?

Code: Select all

42  if ($this->config->get('weight_fe_' . $result['geo_zone_id'] . '_basecost')) {
43  $cost += $this->config->get('weight_fe_' . $result['geo_zone_id'] . '_basecost');
44 } 
45
46  if ((float)$cost > $this->config->get('weight_fe_' . $result['geo_zone_id'] . '_basecost')) {
47  $quote_data['weight_fe_' . $result['geo_zone_id']] = array(
48  'id' => 'weight.weight_fe_' . $result['geo_zone_id'],
49  'title' => $result['name'] . ' (' . $this->language->get('text_weight') . ' ' . $this->weight->format($weight_fe, $this->config->get('config_weight_class')) . ')',
50  'cost' => $cost,
51 'tax_class_id' => $this->config->get('weight_fe_tax_class_id'),
52  'text' => $this->currency->format($this->tax->calculate($cost, $this->config->get('weight_fe_tax_class_id'), $this->config->get('config_tax')))
53  );
Production Cart @ http://eshop.kgshop-sg.com -- OC 1.5.4.1 -- pending
No more using Apsona, as they are not updated.
    Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC
Test cart @ http://tshop.kgshop-sg.com -- pending -- still busy with friend's OC cart.
thegeekz
 
Posts: 326
Joined: Tue Nov 02, 2010 2:24 am

Re: How to create/duplicate a module?

Postby rudhro_bd » Sat Apr 23, 2011 5:00 am

i am a very new user of opencart. i need help.
is there any update for mymodule MS module for v1.4.9.4???! i downloaded the module from here http://www.opencart.com/index.php?route ... order=DESC & i installed this module in my opencart v1.4.9.4 but it doesn't work because it compatible for v1.4.9.3. ??? now my question is - how can i duplicate/create "mymodule MS" module for v1.4.9.4???

also inform me is there any alternative module for this mymodule MS module??? ???


any help is appreciated.
rudhro_bd
 
Posts: 20
Joined: Sat Apr 23, 2011 4:45 am

Re: How to create/duplicate a module?

Postby deevooneh » Fri Jun 10, 2011 1:40 am

I have two authorize.net accounts and want to use different ones depending on if I have already exceeded my monthly transaction volume with one merchant.

I copied all the files and replaced them with a different name ("authorizenet_aim_chase")

admin/controller/payment/authorizenet_aim.php
admin/language/english/payment/authorizenet_aim.php
admin/view/template/payment/authorizenet_aim.tpl
catalog/controller/payment/authorizenet_aim.php
catalog/language/english/payment/authorizenet_aim.php
catalog/model/payment/authorizenet_aim.php
catalog/view/theme/default/template/payment/authorizenet_aim.tpl


I then did a find replace for "authorizenet_aim" in the file and replaced with "authorizenet_aim_chase".
After i did this, "Authorize Net (chase)" shows up as a module however when I click install, it takes me to a blank page and does not install.

Can someone please help? what am i doing wrong?

Thanks!
deevooneh
 
Posts: 13
Joined: Tue Jun 07, 2011 7:34 pm

PreviousNext

Return to Extension Support

Who is online

Users browsing this forum: No registered users and 10 guests

Hosted by Arvixe Web Hosting