Post by deevooneh » Mon Jun 13, 2011 4:34 pm

Alice, are you talking to me? I dont quite understand your reply if so. Otherwise no one else has posted in this thread for months!!

Newbie

Posts

Joined
Wed Jun 08, 2011 3:34 am

Post by Johnathan » Mon Jun 13, 2011 9:05 pm

Alice520 is a spammer, so just ignore it.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by deevooneh » Mon Jun 13, 2011 11:32 pm

lol, thanks! I got excited that someone knew the answer to my question. stupid spammer, what a disappointment. :-(

Newbie

Posts

Joined
Wed Jun 08, 2011 3:34 am

Post by cryoutcreations » Wed Jun 22, 2011 5:58 pm

deevooneh wrote: 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!

As I read it in Qphoria's first post:
Qphoria wrote: 5c. For modules that use underscores (i.e. pp_standard) You must ensure that the class name at the top of the controller & model files does NOT have this _ after doing the replace all.
Correct: class ControllerPaymentPPStandard extends
Incorrect: class ControllerPaymentPP_Standard extends
The underline is most likely the cause of your issue :)


Posts

Joined
Tue Jun 14, 2011 7:24 pm


Post by CypherUK » Fri Jul 15, 2011 11:47 pm

Hi Guys - Can i use this concept to develop a new shipping module that integrates with the companies API?

I have a shipping module i would like to develop but it's a new concept for me so looking for a little guidance.

Cheers
Mark

User avatar
New member

Posts

Joined
Sun Oct 17, 2010 7:36 pm
Location - Essex, United Kingdom

Post by Itonedci » Tue Jul 26, 2011 5:18 pm

I get it, thanks so much

User avatar
Newbie

Posts

Joined
Fri Jun 24, 2011 10:52 am

Post by eNgage » Sat Aug 13, 2011 5:20 am

I've the newest opencart version and I followed this guide to dublicate a module.
I've now dublicated the moduble cod, to cop.

But when I try to check out in the webshop I get this error:
Notice: Undefined index: code in C:\webs\Utv\shop1\catalog\view\theme\default\template\checkout\payment.tpl on line 9

payment.cpl

line 8 <tr>
line 9 <td style="width: 1px;"><?php if ($payment_method['code'] == $code || !$code) { ?>
line 10 <?php $code = $payment_method['code']; ?>

Anyone knows what's wrong?

Thanks!

Newbie

Posts

Joined
Wed Oct 08, 2008 1:12 am

Post by madimar » Sat Aug 13, 2011 3:57 pm

... I'm not sure... but try to take a look to controller payment.php.
Maybe you replaced cod with cop, a and "code" became "cope"!
Anyway I'm not really sure the guide is still valid for oc 1.5

Sent from my Desire HD using Tapatalk

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by Zaboor » Sun Aug 14, 2011 2:47 pm

eNgage wrote:I've the newest opencart version and I followed this guide to dublicate a module.
I've now dublicated the moduble cod, to cop.

But when I try to check out in the webshop I get this error:
Notice: Undefined index: code in C:\webs\Utv\shop1\catalog\view\theme\default\template\checkout\payment.tpl on line 9

payment.cpl

line 8 <tr>
line 9 <td style="width: 1px;"><?php if ($payment_method['code'] == $code || !$code) { ?>
line 10 <?php $code = $payment_method['code']; ?>

Anyone knows what's wrong?

Thanks!
Appeared to me the same error

Newbie

Posts

Joined
Sun Aug 14, 2011 2:44 pm

Post by Zaboor » Sun Aug 14, 2011 3:22 pm

Zaboor wrote:
eNgage wrote:I've the newest opencart version and I followed this guide to dublicate a module.
I've now dublicated the moduble cod, to cop.

But when I try to check out in the webshop I get this error:
Notice: Undefined index: code in C:\webs\Utv\shop1\catalog\view\theme\default\template\checkout\payment.tpl on line 9

payment.cpl

line 8 <tr>
line 9 <td style="width: 1px;"><?php if ($payment_method['code'] == $code || !$code) { ?>
line 10 <?php $code = $payment_method['code']; ?>

Anyone knows what's wrong?

Thanks!
Appeared to me the same error
I have found the solution

in file : catalog/model/payment/cop.php
in line 22 Find :

Code: Select all

        		'cope'       => 'cop',
replace it with :

Code: Select all

        		'code'       => 'cop',
save the file and re-upload it.

Best Regards,

Newbie

Posts

Joined
Sun Aug 14, 2011 2:44 pm

Post by editorbb » Tue Aug 16, 2011 4:20 pm

Hello,

I can ask for help? When I select Cash on PickUp and click the next button I'm getting an error message:

SyntaxError: JSON.parse: unexpected character

Anyone knows how to fix it please?

Richard

Newbie

Posts

Joined
Tue Aug 16, 2011 3:58 am

Post by engchun » Thu Aug 25, 2011 6:33 pm

Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/justgame/public_html/system/database/mysql.php on line 54Warning: Cannot modify header information - headers already sent by (output started at /home/justgame/public_html/admin/index.php:75) in /home/justgame/public_html/system/engine/controller.php on line 29Warning: Cannot modify header information - headers already sent by (output started at /home/justgame/public_html/admin/index.php:75) in /home/justgame/public_html/system/engine/controller.php on line 30

i am getting this error after duplicate features module under OC 1.5.1 , it able to install just not able to add in module, any idea guys ?

i have done all changes as rename to 2 and changes the class name as well.

class ControllerModulefeatured2 extends Controller

New member

Posts

Joined
Sat Dec 11, 2010 12:01 am

Post by boxrick » Thu Sep 01, 2011 3:58 am

This has come in handy, made multiple additional delivery modules!

Newbie

Posts

Joined
Fri Aug 19, 2011 12:06 am

Post by sash_007 » Sun Sep 18, 2011 2:18 pm

hello i tried ur method for making information_footer module but when i try to install it i get this error

Fatal error: Class 'ControllerModuleinformationfooter' not found in D:\wamp\www\opencart\admin\controller\extension\module.php on line 134
me using opencart 1.4.9.5 and tested on wamp
i guess i need to change some thing inside those files too to make it work?

this is the php file within admin\controller\module\information_footer.php

Code: Select all

<?php
class ControllerModuleInformation extends Controller {
	private $error = array(); 
	
	public function index() {   
		$this->load->language('module/information_footer');

		$this->document->title = $this->language->get('heading_title');
		
		$this->load->model('setting/setting');
				
		if (($this->request->server['REQUEST_METHOD'] == 'POST') && ($this->validate())) {
			$this->model_setting_setting->editSetting('information_footer', $this->request->post);		
					
			$this->session->data['success'] = $this->language->get('text_success');
						
			$this->redirect(HTTPS_SERVER . 'index.php?route=extension/module&token=' . $this->session->data['token']);
		}
				
		$this->data['heading_title'] = $this->language->get('heading_title');

		$this->data['text_enabled'] = $this->language->get('text_enabled');
		$this->data['text_left'] = $this->language->get('text_left');
		$this->data['text_right'] = $this->language->get('text_right');
		$this->data['text_disabled'] = $this->language->get('text_disabled');
		
		$this->data['entry_position'] = $this->language->get('entry_position');
		$this->data['entry_status'] = $this->language->get('entry_status');
		$this->data['entry_sort_order'] = $this->language->get('entry_sort_order');
		
		$this->data['button_save'] = $this->language->get('button_save');
		$this->data['button_cancel'] = $this->language->get('button_cancel');

 		if (isset($this->error['warning'])) {
			$this->data['error_warning'] = $this->error['warning'];
		} else {
			$this->data['error_warning'] = '';
		}

  		$this->document->breadcrumbs = array();

   		$this->document->breadcrumbs[] = array(
       		'href'      => HTTPS_SERVER . 'index.php?route=common/home&token=' . $this->session->data['token'],
       		'text'      => $this->language->get('text_home'),
      		'separator' => FALSE
   		);

   		$this->document->breadcrumbs[] = array(
       		'href'      => HTTPS_SERVER . 'index.php?route=extension/module&token=' . $this->session->data['token'],
       		'text'      => $this->language->get('text_module'),
      		'separator' => ' :: '
   		);
		
   		$this->document->breadcrumbs[] = array(
       		'href'      => HTTPS_SERVER . 'index.php?route=module/information_footer&token=' . $this->session->data['token'],
       		'text'      => $this->language->get('heading_title'),
      		'separator' => ' :: '
   		);
		
		$this->data['action'] = HTTPS_SERVER . 'index.php?route=module/information_footer&token=' . $this->session->data['token'];
		
		$this->data['cancel'] = HTTPS_SERVER . 'index.php?route=extension/module&token=' . $this->session->data['token'];

		if (isset($this->request->post['information_position'])) {
			$this->data['information_footer_position'] = $this->request->post['information_footer_position'];
		} else {
			$this->data['information_footer_position'] = $this->config->get('information_footer_position');
		}
		
		if (isset($this->request->post['information_status'])) {
			$this->data['information_footer_status'] = $this->request->post['information_footer_status'];
		} else {
			$this->data['information_footer_status'] = $this->config->get('information_footer_status');
		}
		
		if (isset($this->request->post['information_sort_order'])) {
			$this->data['information_footer_sort_order'] = $this->request->post['information_footer_sort_order'];
		} else {
			$this->data['information_footer_sort_order'] = $this->config->get('information_footer_sort_order');
		}				
		
		$this->template = 'module/information_footer.tpl';
		$this->children = array(
			'common/header',	
			'common/footer'	
		);
		
		$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));
	}
	
	private function validate() {
		if (!$this->user->hasPermission('modify', 'module/information_footer')) {
			$this->error['warning'] = $this->language->get('error_permission');
		}
		
		if (!$this->error) {
			return TRUE;
		} else {
			return FALSE;
		}	
	}
}
?>

New member

Posts

Joined
Wed Apr 28, 2010 10:33 am

Post by tadaamar » Fri Dec 02, 2011 11:57 pm

Hello there,
I have also duplicate a Module (information)
I’m trying to make a Recipes Module
I did all as instructed, I also duplicate in mySQL, "information, information_description, information_to_store" to "recipes, recipes_description, recipes_to_store"
It installs and show's to my shop

but in admin panel at dropdown menu Catalog is not showing my new module "Recipes" like Information, so I can't change the infos, only thru SQL

So, What I’m missing?!?

I have also attached my module if someone can help!
Thanks

Seroquel lawsuits


Newbie

Posts

Joined
Fri Dec 02, 2011 11:53 pm


Post by mollos » Wed Dec 21, 2011 7:55 pm

sash_007 wrote:hello i tried ur method for making information_footer module but when i try to install it i get this error

Fatal error: Class 'ControllerModuleinformationfooter' not found in D:\wamp\www\opencart\admin\controller\extension\module.php on line 134
me using opencart 1.4.9.5 and tested on wamp
i guess i need to change some thing inside those files too to make it work?

this is the php file within admin\controller\module\information_footer.php

Code: Select all

<?php
class ControllerModuleInformation extends Controller {
	private $error = array(); 
	
[/quote]

Maybe you should change ControllerModuleInformation in the code into ControllerModuleInformationfooter?

Newbie

Posts

Joined
Wed Oct 27, 2010 6:25 am

Post by webpr » Tue Jan 03, 2012 9:24 am

Hi, does this guide still work for v1.5.1.3?

Newbie

Posts

Joined
Tue Nov 22, 2011 9:10 pm

Post by Qphoria » Tue Jan 03, 2012 10:47 pm

webpr wrote:Hi, does this guide still work for v1.5.1.3?
yes

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by swazemarket » Thu Jan 05, 2012 1:54 am

Thanks for this post guys.

I was able to successfully duplicate the cheque payment module by editing the corresponding files in the 7 locations listed.

Much appreciated.

Newbie

Posts

Joined
Sat Oct 01, 2011 2:22 am
Location - Mbabane

Post by bobwhite » Sat Mar 03, 2012 7:45 am

Hi Qphoria,
I have question regarding creation/duplication of the module. I created new module based on existing category module.
Hi Qphoria,
I have question regarding creation/duplication of the module. I created new module based on existing category module. (Following your instructions posted earlier).
This is what I did:
1. Created new files named brands based on category in following directories:
admin/controller/module/catgory.php -> brands.php
admin/language/English/module/category.php -> brands.php
admin/view/template/module/category.tpl -> brands.tpl
catalog/controller/module/category.php -> brands.php
catalog/language/English/module/category.php -> brands.php
catalog/view/theme/default/template/module/category.tpl -> brands.tpl
2. Changed everything inside files from category to brands
3. Assigned permission to these files 0777
4. Created 4 new tables in my database:
• brands
• brands_description
• brands_to_layout
• brands_to_structure
Now, in the admin console Extension/Modules I was able to install new module called Brands
I modified it to: Layout: HOME, Position: Column Left, Status: Enabled, Sort Order: 2
When I am trying to get to my home page I am getting error message:
Notice: Error: Could not load model catalog/brands! in C:\wamp\www\example.com\system\engine\loader.php on line 37
Qphoria, please let me know what I did wrong or what I am missing. I kind of stack here.
You help is really appreciated.
Thanks,
Bob

User avatar
New member

Posts

Joined
Thu Jan 26, 2012 8:20 am
Who is online

Users browsing this forum: No registered users and 23 guests