So I'm wondering the best way.
Option 1: Create a new "Blocks" type which I believe is the term Dragonfly, phpnuke, etc use for centered modules. Then there would be its own catalog/controller/blocks/xxx.php path
Option 2: Use the current "module" area for these new "Content Modules" and just name them accordingly:
popular_center
latest_center
specials_center
I'm leaning towards option 1
For placement, the center would be the main idea, header and footer don't really have room unless the module is specifically designed for those locations, which would likely just be better off hardcoded in.
Thoughts?
And I do like your idea about creating such blocks but I'm not sure why not use the module section as they are modules that contain content and will only show in the center of the store.
But on the other hand, the bestseller module is only showing content to, and that is called a module. Does this mean these will all be renamed so that it is clear that this "block" only show content?
So a module is named a module when it is used for: Payment, Shipping etc.
It is called a block when used for showing special content like: Specials, Infopages etc.
Makes sence to me.
Reason: changed
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
And you use the term "module" too loosely.
a "module" in the terms of OpenCart is foremost a "Sidebox"
Extensions:
- Module - Sideboxes mostly
- Payment - payment integration options
- Shipping - shipping integration options
- Order Totals - Confirmation page totals
- Feeds - Product feeds
- Affiliates - tbd
Since the word "Module" is so ambiguous, I fear that putting "center" modules along with "sidebox" modules might be confusing, so I figured the name "Blocks" is a good differentiator. Although, "Blocks" is equally ambiguous and Joomla refers to "blocks" as sideboxes.. so its a mess either way. But focusing on OpenCart, should "Blocks" be used to define "center modules" ?
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
If you put it that way, Blocks would be a good choice.Qphoria wrote:a "module" in the terms of OpenCart is foremost a "Sidebox"
Extensions:
- Module - Sideboxes mostly
- Payment - payment integration options
- Shipping - shipping integration options
- Order Totals - Confirmation page totals
- Feeds - Product feeds
- Affiliates - tbd
Since the word "Module" is so ambiguous, I fear that putting "center" modules along with "sidebox" modules might be confusing, so I figured the name "Blocks" is a good differentiator. Although, "Blocks" is equally ambiguous and Joomla refers to "blocks" as sideboxes.. so its a mess either way. But focusing on OpenCart, should "Blocks" be used to define "center modules" ?
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
I was torn on that too. Homepage mod added a third option to position. But what if you want Featured sidebox to show 10 items always but also featured on the homepage to show only 4 at the top of the homepage. Again, as you said, what if you want it somewhere else besides the homepage. That is why I thought blocks may be better.Xsecrets wrote:I really saw no problem with the way the homepage mod did it. It's pretty easy to write your modules so they change when homepage is selected to look proper in the content area. The only issue with that is it doesn't have the ability to put things on pages other than the homepage.
1. A module is something which displays existing data
2. A module should be displayed anywhere - no matter which position YOU prefer!
3. Template designers should be able to define positions THEY like (or the users - see #6)
4. Positions (for modules) could be everywhere: top, banner, left, right, footer, etc.
5. Module positions should be not fixed (as they are now) - the positions should be read from the template and dynamically selectable (admin)
6. Finally OC should be able to let the admin define their own position (names) like Joomla does (if you call Joomla as reference)
7. No matter where a 'Module' is displayed, renaming some to a 'Block' which will be only displayed in the center (which one and what for ??) will confuse the people more
btw: could you point me please where Joomla use 'blocks' or 'sideboxes' as official term?
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
You may be right. I guess the point then is that modules will need to have different tpl files for their positions. Or the tpl file will have some conditionals based on its position to determine which html to display.OSWorX wrote:From my point of view, this is the wrong approach.
1. A module is something which displays existing data
2. A module should be displayed anywhere - no matter which position YOU prefer!
3. Template designers should be able to define positions THEY like (or the users - see #6)
4. Positions (for modules) could be everywhere: top, banner, left, right, footer, etc.
5. Module positions should be not fixed (as they are now) - the positions should be read from the template and dynamically selectable (admin)
6. Finally OC should be able to let the admin define their own position (names) like Joomla does (if you call Joomla as reference)
7. No matter where a 'Module' is displayed, renaming some to a 'Block' which will be only displayed in the center (which one and what for ??) will confuse the people more
Highly irrelevant but surmised from: http://www.google.com/search?q=joomla+b ... =firefox-abtw: could you point me please where Joomla use 'blocks' or 'sideboxes' as official term?
I originally got the "blocks" term from phpnuke and DragonflyCMS
http://forum.opencart.com/viewtopic.php?f=21&t=13311

Qphoria wrote:For placement, the center would be the main idea, header and footer don't really have room unless the module is specifically designed for those locations, which would likely just be better off hardcoded in.
www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel
For example, I recently added some additional content to the header of an OpenCart installation and had to re-work the entire header section to accommodate this in all browsers.
From a user standpoint, I would like to be able to activate/install any "block" that I like, and then choose where it is displayed (header, footer, content, left column, right column) as well as its priority (i.e. order that the blocks appear).
Perhaps it might be best to have some standard blocks that are not simply enabled/disabled, but installed as a new instance. For example, a block called "Most viewed products" could be installed in the content area and assigned a priority etc, then another instance of this block could be installed in the right column with its own settings.
Q, the tpl files have the same code for all modules. Even though I add the required code in the controller file, since the template file has same code for all module it only picks up the 1st module code in the controller file. Is there a smart way to handle this? As you can see in my pic, all the module boxes have come up to be bestsellers.
Qphoria wrote:Yea I guess in your example it does, but thats a custom job to have a footer that tall. I guess I'll leave it up to the theme maker to handle it tho
www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Which idea?Xsecrets wrote:so are you going to give up on the idea of being able to choose pages?
my plan in my head is:
- Add additional positions
- Figure out how to handle the tpl for those different positions
- Add a list of the main controller pages that these will show on. Which means I will probably have to do this "per-position" which adds some complexity.
- Add some backwards compatibility for 3rd party modules that don't have these new features.
I guess something like this:

Unless someone has a better idea
Looking good!Qphoria wrote:
I guess something like this:
*knip*
Unless someone has a better idea
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
How to handle templates?
I could do
1 tpl file with If/Else statements:
Code: Select all
if ($position == 'header' ) {
// header module tpl code here
} elseif ($position == 'center') {
// center module tpl code here
} elseif ($position == 'footer') {
// footer module tpl code here
} else {
//left or right module code here
}
1 tpl for each position:
cart_header.tpl
cart_center.tpl
cart_footer.tpl
cart.tpl (left or right)
I'm leaning towards the first one, tho I think the second way is more proper, but there are so many more files that it can get unruly and harder to maintain
Users browsing this forum: No registered users and 6 guests