Page 4 of 9

Re: How to create/duplicate a module?

Posted: Sat Nov 27, 2010 10:54 pm
by jon21021985
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

Re: How to create/duplicate a module?

Posted: Thu Dec 02, 2010 8:06 am
by simple_one
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 16520 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.
???

Re: How to create/duplicate a module?

Posted: Thu Dec 16, 2010 6:23 am
by mehrdad.t
I want create a module that connect to other system's database (dle) and display results in

header.tpl ! please tell me ! ... ???

Re: How to create/duplicate a module?

Posted: Thu Dec 23, 2010 11:46 am
by memomium
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.

Re: How to create/duplicate a module?

Posted: Thu Dec 23, 2010 12:22 pm
by Qphoria
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

Re: How to create/duplicate a module?

Posted: Thu Dec 23, 2010 1:04 pm
by memomium
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 (http://forum.opencart.com/viewtopic.php ... 81&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

Re: How to create/duplicate a module?

Posted: Mon Jan 03, 2011 12:39 am
by wandotshop
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

Re: How to create/duplicate a module?

Posted: Sun Jan 16, 2011 2:27 am
by Arsene Wenger
very useful for beginer :)

Re: How to create/duplicate a module?

Posted: Tue Jan 18, 2011 6:25 pm
by Kawalya
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

Re: How to create/duplicate a module?

Posted: Wed Jan 19, 2011 12:29 am
by OnNets
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.

Duplicate Information Module


Re: How to create/duplicate a module?

Posted: Mon Jan 24, 2011 10:35 pm
by whitelogicsolutions
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

Re: How to create/duplicate a module?

Posted: Thu Feb 17, 2011 8:41 am
by justinv
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.

Re: How to create/duplicate a module?

Posted: Sun Feb 20, 2011 7:49 am
by bajaber
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?

Re: How to create/duplicate a module?

Posted: Sun Feb 20, 2011 9:10 am
by justinv
There was no change to the module between 1.4.9.1 and 1.4.9.3.

Re: How to create/duplicate a module?

Posted: Thu Feb 24, 2011 9:14 pm
by steppen321
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)

Re: How to create/duplicate a module?

Posted: Sun Mar 13, 2011 7:35 am
by memomium
does anyone know what effect this will have on the import/export extension if you duplicate a category?

Re: How to create/duplicate a module?

Posted: Tue Apr 05, 2011 9:34 pm
by Ljubo
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 !

Re: How to create/duplicate a module?

Posted: Thu Apr 07, 2011 10:12 am
by thegeekz
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  );

Re: How to create/duplicate a module?

Posted: Sat Apr 23, 2011 1:00 pm
by rudhro_bd
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.

Re: How to create/duplicate a module?

Posted: Fri Jun 10, 2011 9:40 am
by deevooneh
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!