Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Understanding Templates

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-11-2003, 07:26 AM
 
jgkiefer jgkiefer is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 85
 

Default Understanding Templates

Okay, I have rolled my sleeves up and opened the hood. I am ready to customize the look of my x-store. Since I have noticed many posts on this subject, I will keep this project of mine consolidated to one thread for easer reference. I am familiar with the Smarty template system and glad x-cart uses it, however I have a few questions before I start.

Template file structure.
It appears that the main store template is under the directory customer, and these templates are only displayed in the store (not the admin which is a separate directory). The templates that are shared site wide are in the root directory and specific templates are located in their respective function directory, i.e. modules. So far so good? To make things easy all I want to modify is what the customer sees. Not only will this make designing easer, but it will also be easier for upgrades. After all I really donБ─≥t care what admin looks like, just as long as all the functions work correctly .
So the 1,2,3 method of modifying the display would be to edit the header.tpl, footer.tpl, customer/home.tpl and any modules/*.tplБ─≥s. Since the system uses Smarty, the templates may be edited in a WYSIWYG editor such as FrontPage, Dreamweaver, etc. Everything okay so far?

Linking questions.
I want tabbed navigation above the search bar. What is the correct link syntax for top level categories? I donБ─≥t want to copy and paste the link from the browser because it has a session string, and I am unsure how x-cart utilizes https. Which leads me to my next linking question. Because of https, when linking to files or images outside the template directory should a relative or absolute url be used? If https is not used to call these files will there not be problems if the user is in a secure area?

I am sure I will have more questions as I progress. Thank you for having this forum for support.
Reply With Quote
  #2  
Old 04-11-2003, 09:42 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

okay, glad you like smarty ...its cool

template order: rectangle_top.tpl/home.tpl/head.tpl/home_main.tpl/categories.tpl/subcategories.tpl/products.tpl/product.tpl/help.tpl/rectangle_bottom.tpl is a good start

links: should be: home.php?cat=103

images: use a relative url and make sure those files are in the secure area aswell otherwise you will get the security warning.

With your existing experience of smarty you will find it relatively easy to pick up the way that the templates slot together - if in doubt switch on the debug templates in the general settings of the admin centre and all will become clear.
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 04-12-2003, 08:55 AM
 
jgkiefer jgkiefer is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 85
 

Default

What is the difference between single/home.tpl and customer/home.tpl and fulfilment/home.tpl?
Reply With Quote
  #4  
Old 04-12-2003, 09:33 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

single/home.tpl is what is used for the admin centre
customer/home.tpl is used for the customer front end
fulfilment/home.tpl is used for the admin centre where signed in as fulfilment staff.

hth
__________________
ex x-cart guru
Reply With Quote
  #5  
Old 04-12-2003, 02:55 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Be sure and nose around on:

http://smarty.php.net
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:27 AM.

   

 
X-Cart forums © 2001-2020