Post by Qphoria » Fri Feb 22, 2013 4:29 am

Creating your own theme is really quite easy.. you CAN just make css changes for much of the cart and there are lots of css tags already in the default theme. I'd actually like to see authors start pushing the limits of what can be done as CSS only and challenging themselves to making CSS only themes. There are many CSS only themes out there, though most are quite simple and do nothing more than change some colors. CSS is more power than that.

But as others have said, it might make it too easy to rip off commercial themes. And nobody rips off WP themes... no never ::)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by settysantu » Wed Feb 27, 2013 1:45 pm

I‘m planning on adding my own type of vqmod system to the next release so hopefully template designers will use this instead of modifying core files.
Above quote is taken from An Interview With OpenCart Founder Daniel Kerr

User avatar
New member

Posts

Joined
Mon Jan 03, 2011 11:59 am
Location - Hyderabad, India

Post by Johnathan » Wed Feb 27, 2013 8:31 pm

Qphoria wrote:Creating your own theme is really quite easy.. you CAN just make css changes for much of the cart and there are lots of css tags already in the default theme. I'd actually like to see authors start pushing the limits of what can be done as CSS only and challenging themselves to making CSS only themes. There are many CSS only themes out there, though most are quite simple and do nothing more than change some colors. CSS is more power than that.

But as others have said, it might make it too easy to rip off commercial themes. And nobody rips off WP themes... no never ::)
Not sure how I feel about that...vQmod is so prevalent at this point that developers will continue to use it, and if the core modification system is not as good as vQmod, it probably won't be used. It seems like it would have been better to just include vQmod in the download.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by rph » Sun Mar 03, 2013 4:12 am

Yeah, I don't think there's any need to go an re-invent the wheel after all the work Jay and Q already put in vqmod. That's a different discussion though.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by Qphoria » Tue Mar 05, 2013 3:09 am

Well you can see what has been done so far in the "ocmod" on github... it is quite a bit different...

small stuff like instead of this:

Code: Select all

<search position="replace"></search>
<add></add>
the position tag was moved to the <add> tag

There are goals of multiline search/replace so the offset attribute is gone.
it is still early I'm guessing but when its all said and done, it won't likely be vQmod compatible out of the box.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by rph » Tue Mar 05, 2013 9:35 am

As long as developers are still making extensions for previous versions of OpenCart I don't see much advantage in having a system that's like vqmod but not.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by JNeuhoff » Tue Mar 05, 2013 11:33 pm

There are goals of multiline search/replace so the offset attribute is gone.
it is still early I'm guessing but when its all said and done, it won't likely be vQmod compatible out of the box.
One of the biggest challenges for theme development still is to find a more elegant way of allowing multiple addons to modify the same core template file. While it is easy to have 3rd party addons extend core classes and override their methods, or even to change entries in the language files, I have yet to see any good solution when it comes to templates. VQmod does it for the latter to a degree, but I still think there could be a better solution.

When it comes to changing the look & feel only, nothing beats proper CSS and graphics, as demonstrated by the CSS ZenGarden example.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by rph » Wed Mar 06, 2013 3:31 pm

Perhaps further dividing the templates into distinct elements like with header, column_left, footer, etc.? Something like:

Code: Select all

<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content">
  <?php echo $content_top; ?>
  <?php echo $breadcrumbs; ?>
  <?php echo $heading_title; ?>
  <?php echo $category_info; ?>
  <?php echo $category_list; ?>
  <?php echo $category_products; ?>
  <?php echo $pagination; ?>
</div>
<?php echo $javascript; ?>
<?php echo $footer; ?>
That way you could add another block level element fairly easily or replace/modify an existing one with less a risk of collateral damage.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by JAY6390 » Thu Mar 07, 2013 9:22 am

Qphoria wrote:it won't likely be vQmod compatible out of the box.
It definitely won't and to me it's pointless making two versions of mods for different systems that are similar but not quite the same. vQmod works... and has been widely accepted as the standard simple way to get mods working without breaking the core. It takes 2 minutes if that to install and can save hours in custom editing. I've been watching the modification system's evolution in github closely, and it seems to me it becomes more and more like vQmod every day. As Ryan's said, it seems pointless to reinvent the wheel at this point

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by intersect » Fri Mar 08, 2013 7:53 am

JNeuhoff wrote: When it comes to changing the look & feel only, nothing beats proper CSS and graphics, as demonstrated by the CSS ZenGarden example.
I don't know if you have already tried to build a theme with a different structure from the default's theme but it can be really laborious and time consuming. I know that you can do a lot of things with just CSS, and believe me when I say that I always try it to the max, but there's a lot of things that CSS can't solve.
The CSS from the default is hardly commented, and sometimes it's just a lit bit odd. Besides that, the tpl files also don't have any comments and the code is kind messy - in the sense of organization - and barely indented. There isn't enough - descriptive and logical - classes and some are even used a lot of times in different places, making independent styling of elements impossible or very hard to style without use a lot of selectors.

I have a small business that just works with building webpages - we don't sell templates - and we use Joomla, Wordpress and Opencart building our own custom templates from the scratch, so we can have the cleanest code possible. To make things easier we are building a blank theme for Opencart using the Foundation Framework. Once it's ready we'll share it for free. We've built it trying to not modify the bases of the Default Theme, although it doesn't use any CSS from it. We got to keep it clean, with more logical, clean and commented CSS and tpl's, adding new - and pretty distinguishable - classes when needed and some divs and font icons just to make the framework work properly.

Now we can build our themes much easier and also we can use much more CSS than anything else :D
We're still testing it but till now it worked with anything we've thrown at it, but of course there's no guarantee.

http://www.intersect.com.br


User avatar
New member

Posts

Joined
Sat May 19, 2012 6:59 am

Post by Shark » Sun Mar 10, 2013 5:40 pm

Qphoria wrote:Creating your own theme is really quite easy.. you CAN just make css changes for much of the cart and there are lots of css tags already in the default theme. I'd actually like to see authors start pushing the limits of what can be done as CSS only and challenging themselves to making CSS only themes. There are many CSS only themes out there, though most are quite simple and do nothing more than change some colors. CSS is more power than that.

But as others have said, it might make it too easy to rip off commercial themes. And nobody rips off WP themes... no never ::)
That would have my vote if only the html output (templates) was better and the class hierarchy made actual sense, and (despite of an earlier promise) it still uses inline styles. I know the possibilities and limits of css, and I find it frustating that so much more would be possible, with some minor adjustments. The html of OC is developed not for theme flexibility, but rather to support the default theme, at some points almost in an amateurish way. This is also a problem for lots of extensions, where the html output is of course based on the OC output.

User avatar
Active Member

Posts

Joined
Sun Oct 31, 2010 9:43 pm
Location - Haarlem

Post by intersect » Mon Mar 11, 2013 3:20 am

Shark wrote:
Qphoria wrote:Creating your own theme is really quite easy.. you CAN just make css changes for much of the cart and there are lots of css tags already in the default theme. I'd actually like to see authors start pushing the limits of what can be done as CSS only and challenging themselves to making CSS only themes. There are many CSS only themes out there, though most are quite simple and do nothing more than change some colors. CSS is more power than that.

But as others have said, it might make it too easy to rip off commercial themes. And nobody rips off WP themes... no never ::)
That would have my vote if only the html output (templates) was better and the class hierarchy made actual sense, and (despite of an earlier promise) it still uses inline styles. I know the possibilities and limits of css, and I find it frustating that so much more would be possible, with some minor adjustments. The html of OC is developed not for theme flexibility, but rather to support the default theme, at some points almost in an amateurish way. This is also a problem for lots of extensions, where the html output is of course based on the OC output.
Actually, the template system could use a lot of improvement...
Besides all the "CSS hacks", the far from semantic coding, the excessive use of javascript in some points and the annoying inline styling, the whole system makes our lives a lot hard...

See, maybe I need the breadcrumbs under the content part, so what do I have to do? Change it in all the single pages in my template... Man, it's a lot of work just for that.
One of the greatest thing in the template system is the overrides, but it also brings some drawbacks the way it works now. To me (I don't know about the others template makers) a template system like the one in Joomla would make a lot more sense. I know they are very different systems with very different aims. But the template structure in Joomla is great, more logical and make it harder to break things up.
You basically need a xml and a index.php. You can create your own modules positions as you need, put anything in any place and change the whole html without even touch any core file... If you need to override one module or component, you just create that override (opencart does that, I know). And if you need the same module, or component with two or more overrides, you can do it too (opencart doesn't do that out of the box). This way is pretty easy to build complex structures, and do it pretty fast!

The way the template system works in oc makes a lot of things really hard and forces template makers to do some mess to make a great theme.
I think that we shouldn't even need vQmod or anything "off-opencart" if we had a solid structure for the template system and for the module system... I'm not against vQmod, and I really appreciate all the hard work Qphoria has done, but it gets harder and harder to find anything that doesn't uses vQmod, and at this point you gotta ask yourself: "Why is there a module system in OC? Why should I use it? Why should I build anything using this

http://www.intersect.com.br


User avatar
New member

Posts

Joined
Sat May 19, 2012 6:59 am

Post by Qphoria » Tue Mar 12, 2013 3:31 am

intersect wrote: and at this point you gotta ask yourself: "Why is there a module system in OC? Why should I use it? Why should I build anything using this
There is an "Extension" plugin system in OpenCart... and Extensions are typically not vQmods.
Extensions cover 5 main plugins:
- Modules (sideboxes)
- Payments
- Shipping
- Order Totals
- Feeds

Those are all stand-alone files that are completely dynamic in the cart and hold their own sustainable functionality pulled in by a true-to-point plugin system. It works great but is limited only to "extending" those few types of elements.

Wordpress mod system uses hooks ... hooks are great as they offer more dynamic triggered abilities on state changes but are still limited to where the actual hooks area placed... You can do a lot more with hooks and you can add more and more hooks to different places.. but you still can't place hooks on every single line of code... and you can't change a single line of code in wordpress with hooks ... So mods are limited and controlled by existing functionality. So themes do not break wordpress mods because they are kept in a sandbox of limited controls. This is no different in OpenCart.... opencart extensions are not theme dependent.

The fact is, the extreme granular modding abilities that vQmod allows is a double-edged sword. vQmod is the ONLY modification system in the entire world on any platform in any language that allows character-by-character file modding. And because it allows such a granular level of changing, this causes more problems. The whole "with great power comes great responsibility" talk... Other platforms don't have this problem because other platforms don't have this level power.

So perhaps I am at fault... If I didn't make vQmod, and left modding at a less detailed level, we wouldn't be having this conversation and opencart modding would be much more limited and require hardcoding.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by rph » Tue Mar 12, 2013 5:27 am

Na, the only thing you and Jay are at fault for is creating a tool that makes OpenCart modding dramatically better. Can you imagine if we were still stuck with file replacements and tedious find-replace instructions? The Extension Store and all the free mods available would be a shadow of what they are now.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by JNeuhoff » Tue Mar 12, 2013 6:07 am

Qphoria wrote: Wordpress mod system uses hooks ... hooks are great as they offer more dynamic triggered abilities on state changes but are still limited to where the actual hooks area placed... You can do a lot more with hooks and you can add more and more hooks to different places.. but you still can't place hooks on every single line of code... and you can't change a single line of code in wordpress with hooks ... So mods are limited and controlled by existing functionality. So themes do not break wordpress mods because they are kept in a sandbox of limited
Agreed, hooks have limited capabilities, according to where they are triggered.

We have created the dynamic chain of class extensions design pattern in the Override Engine, which allows almost all controller or model classes to be extended and then any of their public or protected methods to be overridden. It's an easy way to add new features, though it doesn't have the fine granularity of VQmod. VQmod is still supported by the Override Engine, too.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by intersect » Tue Mar 12, 2013 6:55 am

Qphoria wrote:The fact is, the extreme granular modding abilities that vQmod allows is a double-edged sword. vQmod is the ONLY modification system in the entire world on any platform in any language that allows character-by-character file modding. And because it allows such a granular level of changing, this causes more problems. The whole "with great power comes great responsibility" talk... Other platforms don't have this problem because other platforms don't have this level power.

So perhaps I am at fault... If I didn't make vQmod, and left modding at a less detailed level, we wouldn't be having this conversation and opencart modding would be much more limited and require hardcoding.
To be honest, I think vQmod is really a awesome tool, don't get me wrong ;D. It is so powerful and yet so simple to use that is hard not to use it. I'm no developer and in 5 minutes I've done some mods :D
I don't think that the guilty on is who makes the tool, but who uses it.
It's like you said, that's one of the problems: too much power. I don't know what you developers think about this problem, but I think that it can be a big problem in the near future. Maybe that's why Daniel is making "oc's own vQmod", to avoid the mess it can become. We really need some standards, so the whole cart can grow without bigger problems.
There's a lot of area for improvement, and to me (repeating myself: I'm no developer, I'm a front-end coder/designer) the template system (make it easier to work with and more logical) and the extension system are the ones that need more attention...

I just hope to not be offending anyone, that's not what I mean.
Keep up the good work :D

http://www.intersect.com.br


User avatar
New member

Posts

Joined
Sat May 19, 2012 6:59 am

Post by JAY6390 » Tue Mar 12, 2013 9:06 am

FYI the mod system Daniel is adding is practically identical in function to VQMod. It will have little if any less power when it comes to the mods you can achieve

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Qphoria » Tue Mar 12, 2013 10:05 am

JAY6390 wrote:FYI the mod system Daniel is adding is practically identical in function to VQMod. It will have little if any less power when it comes to the mods you can achieve
I do recommend he remove the position="all" attribute type... as that was a bad idea to add.. its just too dangerous and dopes use it to replace entire files. We should really remove it from vQmod to avoid the abuse of that power.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by rph » Tue Mar 12, 2013 11:30 am

JAY6390 wrote:FYI the mod system Daniel is adding is practically identical in function to VQMod. It will have little if any less power when it comes to the mods you can achieve
With the added benefit of not being compatible with vqmod. :bang:
Qphoria wrote:I do recommend he remove the position="all" attribute type... as that was a bad idea to add.. its just too dangerous and dopes use it to replace entire files. We should really remove it from vQmod to avoid the abuse of that power.
I think if the user is careful to control load position through script naming it could theoretically be useful (I haven't seen one in the wild in ages and haven't ever used it myself though).

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by JAY6390 » Tue Mar 12, 2013 9:12 pm

To me, the implications of a replace all are just too much for those that code correctly. I agree we need to remove position="all" as of the next version (or at least mark it as deprecated as of version X)

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 26 guests