Post by masterbeta » Thu Mar 17, 2016 3:49 pm

artcore wrote:I say create a module so you can just echo it in the header or footer or anywhere you feel like ;D

controller>module>information_menu.php
Add all your custom stuff from header controller in here
End with
return $this->load->view('default/template/module/info_menu.tpl',$data);

module folder>info_menu.tpl
html markup with data

OCMOD 2 files[/]
In header controller
$data['info_menu'] = $this >load->controller(module/information_menu)

In header tpl: echo $info_menu; at a nice spot :)

Minimum core changes FTW


still needs to add tables in the db ;) and alter current tables

New member

Posts

Joined
Thu Nov 26, 2015 3:55 pm
Location - Ikaria, Greece

Post by OSWorX » Thu Mar 17, 2016 4:19 pm

Please do not do it that way!
Leave the original tables as they are and create new.
Combine them when needed, that way the original system stays intact and in case the extension is not needed anymore no troubles will arrise!

thx.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by masterbeta » Fri Mar 18, 2016 5:13 am

OSWorX wrote:Please do not do it that way!
Leave the original tables as they are and create new.
Combine them when needed, that way the original system stays intact and in case the extension is not needed anymore no troubles will arrise!

thx.
ocmods can create/alter table as well as remove so that is no problem - but to make a module vs extension, not sure how to accomplish that...

either way, i figure this information pages hierarchy should be a base setup for oc
not an extension or mod - should be out of the box already in oc from the beginning.... not sure why the devs didn't include it that way to start with...

New member

Posts

Joined
Thu Nov 26, 2015 3:55 pm
Location - Ikaria, Greece

Post by OSWorX » Fri Mar 18, 2016 5:31 am

masterbeta wrote:
OSWorX wrote:Please do not do it that way!
Leave the original tables as they are and create new.
Combine them when needed, that way the original system stays intact and in case the extension is not needed anymore no troubles will arrise!

thx.
ocmods can create/alter table as well as remove so that is no problem - but to make a module vs extension, not sure how to accomplish that...

either way, i figure this information pages hierarchy should be a base setup for oc
not an extension or mod - should be out of the box already in oc from the beginning.... not sure why the devs didn't include it that way to start with...
Thx for pointing me that way .. but I guess I have made more modules - also vq- & ocmods - than many others here 8)

Anyway, modifying core db.tables is never a good way for an extension.
What if the shopowner does not want your extension anymore?
Now you have to alter the database tables again ... nonsens.

Better to create a new table and call from there what you want/need.

Discussing here if that should be in the core or not - is useless.
Create an extension (best OCMod if) and publish.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by masterbeta » Wed Mar 23, 2016 8:26 pm

Thx for pointing me that way .. but I guess I have made more modules - also vq- & ocmods - than many others here 8)

Anyway, modifying core db.tables is never a good way for an extension.
What if the shopowner does not want your extension anymore?
Now you have to alter the database tables again ... nonsens.

Better to create a new table and call from there what you want/need.

Discussing here if that should be in the core or not - is useless.
Create an extension (best OCMod if) and publish.
then you should know that a standard ocmod can create/alter current tables as well as remove the alterations when uninstall of the extension ;)

sorry guys for delay - i have to finish a pay system before i can make the ocmod for the information pages - if anyone can help here is the thread:
viewtopic.php?f=185&t=159330

New member

Posts

Joined
Thu Nov 26, 2015 3:55 pm
Location - Ikaria, Greece
Who is online

Users browsing this forum: No registered users and 34 guests