Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

osCommerce should use a templating system


uramagget

Recommended Posts

Hi Brandon..

 

With v3.0 supporting namespaces, a separate namespace level will be introduced for custom changes with the ability to override core classes. The core template class can therefore be overridden and enhanced to work with a specific template engine that is then used to load and parse the template files.

 

To make this easier, the core template class will allow variables to be injected into the template files, leaving parsing of custom control logic (eg, {foreach ..}) to the new template class and template engine it is working with.

 

Kind regards,

:heart:, osCommerce

Link to comment
Share on other sites

  • Replies 130
  • Created
  • Last Reply

this is irritating. every few months theres some self-important person(s) coming here claiming to be the king of the world and shouting how dare you lot ignore me and demanding you lot must use my greatest work ever. when making the claim these people would refer to their "innovative features" - a few things thats rather wishful and subjective such as "cleaner code" (how about dirtier?), "fast" (when there is next to zero live example, especially online stores such as oscommerce that deal with tens of thousands of products which btw is very different from an information site, to back it up). this is like cold call sale people once getting in your house wont leave until you sign a contract to buy some useless stuff they are selling.

if your work is really that great then you do not need behave like a cold call saleman, people will find you (word of mouth etc), of which oscommerce is a good example: despite all the criticism, its still going strong ans is the first choice for many online store developers/implementors.

either said it bluntly or politely (i am the former - you asking for it), its crystal clear few people on this forum is interested in your s u i t or, someone sent me an email using this s * i t. so go away now and try something else to see if you have any better luck. forum moderators should now lock this thread or delete it before it wasting too much server hard drive space. full stop.

 

Word of mouth is hard with a type of project that has so many alternatives. People aren't going to just randomly touch it. Aside from that, I'm not going to respond to any of your criticism because your post was completely incoherent and disingenuous.

 

Hi Brandon..

 

With v3.0 supporting namespaces, a separate namespace level will be introduced for custom changes with the ability to override core classes. The core template class can therefore be overridden and enhanced to work with a specific template engine that is then used to load and parse the template files.

 

To make this easier, the core template class will allow variables to be injected into the template files, leaving parsing of custom control logic (eg, {foreach ..}) to the new template class and template engine it is working with.

 

Kind regards,

 

As far as loading the templates, I'm pretty sure that could be abstracted from the engine. There's really only two options...you either query for it, or you read the contents of a file. I don't any framework does this better than any other framework (Not that this is a feature built into SUIT for various reasons).

 

The key issue is the parsing part. Now, given, the only thing that needs to be done before a template is parsed is generate variables from various places to be used as conditions, loops, or just regular variables. For a system like SUIT, yes, I think it'd be plausible to say that someone could write a SUIT wrapper by doing:

 

<?php
$vars->variable = 'Test';
$vars->condition = true;
$vars->loop = array(array('test' => 'test'));
$templatewrapper->template($template, $vars); // This would give the wrapper the variables, and the wrapper would manipulate them however it wants, parse the template, and print it.
?>

I think in general, template systems need no further input than this (Except perhaps some config). I've definitely seen examples with Smarty when they have vastly convoluted code to handle this, but that being said, this COULD work. I think you'd have to research into a couple of systems to be sure, though. Certainly, regular old PHP templates could work using this system. I'm not sure if this is what you were referring to in your post. I don't know much about namespaces or classes as I come from a Python background which means I tend to use more modules and less classes than PHP.

 

By all means, I think this is a very innovative and neutral idea regarding to templating, and I'm very glad to see the manager of OSC has given his view on it. That being said, I figure if you want to support all systems, you have to plan it very well, considering you never know when you might run into a weird system. I certainly am interested in seeing what you can come up with.

 

Brandon

Link to comment
Share on other sites

  • 2 weeks later...

No, it IS worth forgetting and has been forgotten.

 

I'm making it easier for you to back up your baseless claim now, and you're backing away. It's funny; you all moaned about forking since page 1, but when an example is actually presented, you make a 180 and make impertinent remarks like the ones above.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...