Post by saccarrep » Wed Feb 03, 2010 3:36 pm

For this, you need to download Simple HTML Module first here http://www.opencart.com/index.php?route ... ion_id=396
because this is based on this module.

This is to show that you can easily make your own module as long as it is based on html code. For this example I will make Yahoo Pingbox module and it is easily configured for other like instant messanging status, counter, ads, announcement, etc.

Before we start you also need Yahoo Pingbox code, if you haven't yet you can get it here http://messenger.yahoo.com/pingbox/

Ok lets start.

1. extract simple HTML module and you will get these files

mymodule\admin\controller\module\mymodule.php
mymodule\admin\language\english\module\mymodule.php
mymodule\admin\view\template\module\mymodule.tpl
mymodule\catalog\controller\module\mymodule.php
mymodule\catalog\language\english\module\mymodule.php
mymodule\catalog\view\theme\default\template\module\mymodule.tpl

2. rename all files to your module name. For this I rename mymodule to yahoo_pingbox so the files become

yahoo_pingbox\admin\controller\module\yahoo_pingbox.php
yahoo_pingbox\admin\language\english\module\yahoo_pingbox.php
yahoo_pingbox\admin\view\template\module\yahoo_pingbox.tpl
yahoo_pingbox\catalog\controller\module\yahoo_pingbox.php
yahoo_pingbox\catalog\language\english\module\yahoo_pingbox.php
yahoo_pingbox\catalog\view\theme\default\template\module\yahoo_pingbox.tpl

3. open yahoo_pingbox\admin\controller\module\yahoo_pingbox.php on line 2 rename MyModule to YahooPingbox
before : class ControllerModuleMyModule extends Controller {
after : class ControllerModuleYahooPingbox extends Controller {
search text mymodule and replace it with yahoo_pingbox

4. open yahoo_pingbox\admin\language\english\module\yahoo_pingbox.php
search text My Module and replace it with Yahoo Pingbox
search text HTML Code to Yahoo Pingbox Code

5. open yahoo_pingbox\admin\view\template\module\yahoo_pingbox.tpl
search text mymodule and replace it with yahoo_pingbox

6. open yahoo_pingbox\catalog\controller\module\yahoo_pingbox.php on line 2 rename MyModule to YahooPingbox
before : class ControllerModuleMyModule extends Controller {
after : class ControllerModuleYahooPingbox extends Controller {

7.open yahoo_pingbox\catalog\language\english\module\yahoo_pingbox.php
replace text My HTML Module with Yahoo Pingbox

8. no need to change yahoo_pingbox\catalog\view\theme\default\template\module\yahoo_pingbox.tpl

That's it. Upload to your opencart, install and enable it from admin area. Just paste the code from yahoo pingbox to the yahoo pingbox code area.

Now if you want to make other module, for example module to show ads just follow the above step accordingly.

Note: if your site multilingual, don't forget to make the language file too.

Cheers ;)
Yahoo Pingbox.png

Yahoo Pingbox Module - Yahoo Pingbox.png (15.04 KiB) Viewed 8680 times


Before you judge a book by its cover, you've got to flip through the pages

Image


User avatar
New member

Posts

Joined
Thu Jan 28, 2010 5:59 pm

Post by Ben » Wed Feb 10, 2010 9:54 am

Hi, thanks for this module and guide, I love it. But I cannot get the latest version to work (v1.3 02/02/2010).

When I add a title and content in the admin section, it will not show up on the front end - it will only display default values.

The previous version works fine (v1.1 28/01/2010).

Ben
Newbie

Posts

Joined
Wed Feb 10, 2010 9:48 am

Post by saccarrep » Fri Feb 12, 2010 10:42 pm

Ben wrote:When I add a title and content in the admin section, it will not show up on the front end - it will only display default values.

The previous version works fine (v1.1 28/01/2010).
Well that's strange, it seems ok in my case ???

Before you judge a book by its cover, you've got to flip through the pages

Image


User avatar
New member

Posts

Joined
Thu Jan 28, 2010 5:59 pm

Post by bugsjr » Sun Feb 28, 2010 3:58 am

Is there a way to make this module for 1.3.2 version of opencart? I have install the 1.4.x module version but when i hit the edit button it's shows me a black page... ???
Thanks

Newbie

Posts

Joined
Thu Nov 05, 2009 5:19 am

Post by saccarrep » Tue Mar 09, 2010 7:05 pm

bugsjr wrote:Is there a way to make this module for 1.3.2 version of opencart? I have install the 1.4.x module version but when i hit the edit button it's shows me a black page... ???
Thanks
Unfortunately it is for oc 1.4 only

Before you judge a book by its cover, you've got to flip through the pages

Image


User avatar
New member

Posts

Joined
Thu Jan 28, 2010 5:59 pm

Post by dramony » Thu Apr 01, 2010 4:38 pm

me also, i need this for my 1.3.2.

Thanks!

User avatar
Active Member

Posts

Joined
Sat Oct 24, 2009 12:34 pm

Post by American » Sat May 22, 2010 5:08 pm

You need to amend your instructions:
6. open yahoo_pingbox\catalog\controller\module\yahoo_pingbox.php on line 2 rename MyModule to YahooPingbox
before : class ControllerModuleMyModule extends Controller {
after : class ControllerModuleYahooPingbox extends Controller {
And add:
search text mymodule and replace it with yahoo_pingbox
so it reads:
6. open yahoo_pingbox\catalog\controller\module\yahoo_pingbox.php on line 2 rename MyModule to YahooPingbox
before : class ControllerModuleMyModule extends Controller {
after : class ControllerModuleYahooPingbox extends Controller {
search text mymodule and replace it with yahoo_pingbox
Otherwise if you have another of your modules installed it will want to use the content from that module.

Brad G
Granbury, Texas
OC 1.5.6.4


User avatar
New member

Posts

Joined
Fri May 21, 2010 7:39 am
Location - Fort Worth, Texas

Post by gunset » Tue Jun 01, 2010 3:33 pm

solved...

New member

Posts

Joined
Fri Jan 08, 2010 2:32 pm
Who is online

Users browsing this forum: No registered users and 1 guest