![]() |
Simple Template System?
I have used OsCommerce in the past and loved how the Simple Template System could be installed and allow easy configurations for complex designs. Basically, you generate the template file, and when you want to include something such as the member login, you put a tag in the template for member login.
After reviewing the code for X-Cart, it seems to require quite a bit of heavy modifications to modify the default template. Anyone have suggestions? |
It is just a different system is all, and takes some getting used to.
|
I have done quite a bit of skins for PHP software, it seems like this is about the most complicated template editing I have done. Heck, I have been able to rewrite an entire script that now validates xhtml/css with no probs at all.
Dunno, hope it catches on soon, I am starting to miss OsC a bit :roll: |
Smarty could be nice and simply or complicated - x-cart however uses advanced smarty tags that many advanced coders have to think hard about - definitely not simple. Once you get the hang of it though, it's extremely powerful.
|
How long does it usually take to grasp? I can usually read PHP files, but these smarty tags are a bit confusing. I was wondering for the longest time what ne and eq meant, finally figured it out though lol :lol:
|
Hi,
If you are good at logical and know the procedure hos this should be done then learning becomes easy... For instance, if you know how the basic procedure would work for adding numbers, then it does't matter what development tool you use. The basic procedure should remain same for all languages. Simply, for adding 2 values, you need just 2 numbers. This is the basic procedure for this and using addtion operator you are going to add. But, the addition operator may vary from language to language. that' it. First, try to be strong in basic things and try to apply in a problem and you will easily learn the programming language automatically. I use to learn in this way and succeeds. |
Learn the basic statements, and learn how to use a {section}, and you should be ok. You can always use the manual at http://smarty.php.net for reference.
|
I am a newb but when i first started, i would find an area that seemed to be what i wanted to edit and i would type TEST, save it and view it on the web :) pretty lame eh but it worked. The more i messed with it the easier it has become to modify the templates, as for CSS .. thats not too difficult
|
Well I think the hardest part is that X-Cart doesn't come with a guide to their syntax. For example, product.sku is incorrect, and it is productid instead, however in the language file, it is sku, instead of productid- which I bet throws some people off.
I can correctly assume that a list of variables are not included anywhere? Let's say I want to display the memeber login, there isn't a page I can go to, and search for the member login display code, or to display a sub category list, etc. |
Code is actually product.productcode for SKU, product.productid is for the product id in the database.
You can use phpmyadmin and view the database tables to get codes. If you want to edit the login/logout boxes, they are skin1/auth.tpl and skin1/authbox.tpl There is also a webmaster mode in the admin, that will give you a list of templates that are loaded with each page so you can know where to edit what. |
Webmaster mode is great for people who cannot use a search button. When I want to change text, usually I just open up Ultra Edit and do a Find All. Where in webmaster mode does it list the template files that are loaded? I don't see that..
Quote:
|
Turn the debug console on and turn off pop-up blockers and you will get a nice little window with a list of templates :)
|
Mad love for the debug console. Seriously. Some of the template names didn't seem intuitive to me at first - couldn't tell *why* thing were where they were, and which template was calling which. The debug console answered all of those questions and helped me take a step towards totally owning the template system.
|
And here I thougth it was ME that helped you with the templates ;)
|
Heh - I haven't sent you all my questions! :P And there have been many.
Okay, much love for Padraic's mad skillz as well. *g* |
\:D/
|
All times are GMT -8. The time now is 08:26 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.