- How can I create a new template?
- How do I change the cart's background image?
- How do I change the default template?
- What files and directories are used in a template?
- What is BTS?
- What should go into a template SQL file?
- Why use BTS?
- How can I create a new template?
Creating a template is not as difficult as it sounds. Simply follow these steps : Create a new directory inside the catalog/templates directory. Choose the name carefully, it is the name of your template. For example you chose : MyWonderfulTemplate - the directory would be catalog/templates/MyWonderfulTemplate Select an existing template from which to start your modifications. Copy the contents of that template into your new template directory. Rename the templates SQL file to match the name of the directory.
Case does matter. You should now have catalog/templates/MyWonderfulTemplate/MyWonderfulTemplate.sql Edit the SQL file. The minimum change required is changing the name of the template screen shot to match the template name (i.e. change Original.gif to MyWonderfulTemplate.gif. You may want to alter any color changes or infobox parameters here to begin with. Install Your New Template in the admin. Go to Admin / Design Control / Template Admin and click insert. Follow the prompts your new template should now be available.
[Back To Top]
- How do I change the cart's background image?
The original question was :
I am trying to put a background image to the left of a E-vector template which I have aligned "right". I have searched the forum and the net in general and seen a few suggestions but have had no luck. Please advise.
Response :
With your favorite text editor, open the file: Catalog\templates\{YOURTEMPLATE}\stylesheet.css.
Look for
body { ... ... ... }
Insert the code:
background: url(../{YOURTEMPLATE}/images/{your_background_image.gif}); background-repeat : repeat;
Note: {YOURTEMPLATE}: This is the name of the folder to your current template. {your_background_image.gif}: This is the name of the background image you wish to use.
SiteBin.com Courtesy of Sobo.
[Back To Top]
- How do I change the default template?
Good Question.
The default template is indicated in the Store Configuration, but controlled from Admin / Design Control / Template Admin .
The Edit screen for each template has a checkbox which can be used to make it the default template. This screen is reached by clicking the button on the control panel visible to your right when the desired template is selected. (The selected template should be highlighted on the screen).
[Back To Top]
- What files and directories are used in a template?
This is a list of files that are in a template directory and what they are used for.
/template/content/
This is where the pages go for all templates. All templates pull there pages from here. You should not need to edit any files in this directory for your customized template. FILES PLACED IN THIS DIRECTORY ARE SUBJECT TO BEING OVERWRITTEN WITHOUT NOTICE DURING A PATCH PROCEDURE.
Note: Some pages use files in the includes/module directory.
/templates/mytemplate/boxes.tpl.php
This file contains code for the php class that generates boxes. It is used to produce the look and feel of your boxes. It places the images around the borders of the boxes, side and center
/templates/mytemplate/extra_html_output.tpl.php
Unless you are doing an advanced template you will not need to edit this file. This file contains extra php functions for displaying images and buttons.
/templates/mytemplate/footer.php
This is the footer for your template. If you do not want to use it just include the information in the mainpage.tpl.php
/templates/mytemplate/header.php
This is the header for you template if you do not want to use it just include the information in the mainpage.tpl.php
/templates/mytemplate/mainpage.tpl.php
This is the bread and butter of your template. It sets up how your template will work and be displayed.
/templates/mytemplate/mytemplate.sql
This file contains the code so that if you want to reload your template you can. It should contain all of the initial settings for your template including the information about side boxes. The name of the screencapture graphic should match the name of the SQL file, and this should match the name of the template directory.
/templates/mytemplate/mytemplate.css
Each template has it own style sheet. The style sheet has the information about what fonts to use, their size and color, backgrounds for html table, rows and cells and other CSS controlled features.
/templates/mytemplate/mainpage_modules/
This is an optional directory
If your template requires the mainpage modules adapted so they work with your template then they will go in here. Otherwise CRE Loaded will use the Mainpages in the : includes/modules/mainpage_modules directory
By default most templates use the mainpage_modules directory for the whole store.If you need special main pages they are placed here. When you create this directory in a template then this directory will become the default for your template but only for the template where this direcotry resides.
/templates/mytemplate/boxes/
All of your side boxes will go here whether they are left or right boxes.
/templates/mytemplate/images/ Any image that is unique to your template goes here. This includes things such as logos, and the screen capture of what the template look like for the admin.
/templates/mytemplate/images/buttons/
This is the place where all of your buttons for the template go.
/templates/mytemplate/images/infobox/
Here is where the images that go around your side and center boxes should be found.
[Back To Top]
- What is BTS?
BTS is the Basic Template System. It offers the ability to change the appearance of the store 'on the fly' - and can allow the customer to choose how the store will present to them, if the store administrator so chooses.
[Back To Top]
- What should go into a template SQL file?
The following example may help answer this question :
If you already know the color that you are going to use for the tops of your infoboxes then you can enter it here. In the code near the end you will see “UPDATE template SET” change template_image= "Mytemplate.gif" change the mytemplate.gif to match your template name. Case is important here, so watch capitalization.
NOTE: The example below is spaced so you can see it better, the actual code can not have any spaces or extra characters in it.
Sample of mytemplate.sql
INSERT INTO infobox_configuration VALUES('#tID#', '', 'categories.php', 'BOX_HEADING_CATEGORIES', 'no', 'left', '1', now(), now(), 'Categories', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'categories1.php', 'BOX_HEADING_CATEGORIES1', 'yes', 'left', '2', now(), now(), 'Categories', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'categories2.php', 'BOX_HEADING_CATEGORIES2', 'no', 'left', '3', now(), now(), 'Categories', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'categories3.php', 'BOX_HEADING_CATEGORIES3', 'no', 'left', '4', now(), now(), 'Categories', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'theme_select.php', 'BOX_HEADING_TEMPLATE_SELECT', 'yes', 'left', '5', now(), now(), 'Select Template', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'reviews.php', 'BOX_HEADING_REVIEWS', 'yes', 'left', '6', now(), now(), 'Reviews', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'specials.php', 'BOX_HEADING_SPECIALS', 'yes', 'left', '7', now(), now(), 'Specials', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'faqdesk_latest.php', 'BOX_HEADING_FAQDESK_LATEST', 'yes', 'left', '8', now(), now(), 'FaqDesk Latest', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'faqdesk.php', 'BOX_HEADING_FAQDESK_CATEGORIES', 'yes', 'left', '9', now(), now(), 'FaqDesk', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'newsdesk_latest.php', 'BOX_HEADING_NEWSDESK_LATEST', 'yes', 'left', '10', now(), now(), 'NewsDesk Latest', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'newsdesk.php', 'BOX_HEADING_NEWSDESK_CATEGORIES', 'yes', 'left', '11', now(), now(), 'NewsDesk', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'search.php', 'BOX_HEADING_SEARCH', 'yes', 'left', '12', now(), now(), 'Quick Find', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'manufacturers.php', 'BOX_HEADING_MANUFACTURERS', 'yes', 'left', '13', now(), now(), 'Manufactures', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'manufacturer_info.php', 'BOX_HEADING_MANUFACTURER_INFO', 'yes', 'left', '14', now(), now(), 'Manufactures Info', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'product_notifications.php', 'BOX_HEADING_NOTIFICATIONS', 'yes', 'left', '15', now(), now(), 'Notifications', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'tell_a_friend.php', 'BOX_HEADING_TELL_A_FRIEND', 'yes', 'left', '16', now(), now(), 'Tell A Friend', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'whats_new.php', 'BOX_HEADING_WHATS_NEW', 'yes', 'left', '17', now(), now(), 'Latest products', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'shop_by_price.php', 'BOX_HEADING_SHOP_BY_PRICE', 'yes', 'left', '18', now(), now(), 'Shop by Price', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'featured.php', 'BOX_HEADING_FEATURED', 'yes', 'left', '19', now(), now(), 'Featured', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'affiliate.php', 'BOX_HEADING_AFFILIATE', 'yes', 'left', '20', now(), now(), 'Affiliate Info', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'links.php', 'BOX_HEADING_LINKS', 'yes', 'left', '21', now(), now(), 'Links', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'whos_online.php', 'BOX_HEADING_WHOS_ONLINE', 'yes', 'left', '22', now(), now(), 'Who\'\s Online', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'shopping_cart.php', 'BOX_HEADING_SHOPPING_CART', 'yes', 'right', '1', now(), now(), 'Shopping Cart', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'customer_gv.php', 'BOX_HEADING_GIFT_VOUCHER', 'yes', 'right', '2', now(), now(), 'Gift Voucher', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'loginbox.php', 'BOX_HEADING_LOGIN', 'yes', 'right', '3', now(), now(), 'Your Account', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'best_sellers.php', 'BOX_HEADING_BESTSELLERS', 'yes', 'right', 4, now(), now(), 'Best Sellers', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'order_history.php', 'BOX_HEADING_CUSTOMER_ORDERS', 'yes', 'right', '5', now(), now(), 'Order History', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'languages.php', 'BOX_HEADING_LANGUAGES', 'yes', 'right', '6', now(), now(), 'Languages', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'currencies.php', 'BOX_HEADING_CURRENCIES', 'yes', 'right', '7', now(), now(), 'Currencies', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'information_table.php', 'BOX_HEADING_INFORMATION_TABLE', 'yes', 'right', '8', '2004-04-17 10:06:01', now(), 'Information', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'information.php', 'BOX_HEADING_INFORMATION', 'yes', 'right', 9, now(), now(), 'Information', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'downloads.php', 'BOX_HEADING_DOWNLOADS', 'yes', 'right', '10', now(), now(), 'You Have a Download', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'donate.php', 'BOX_HEADING_DONATE', 'yes', 'right', '11', now(), now(), 'Donate', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'card1.php', 'BOX_HEADING_CARD1', 'yes', 'right', '12', now(), now(), 'Cards We Except', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'search1.php', 'BOX_HEADING_SEARCH1', 'yes', 'right', '13', now(), now(), 'Advance Search', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'wishlist.php', 'BOX_HEADING_WISHLIST', 'yes', 'right', '14', now(), now(), 'Wishlist', 'infobox', '#0000FF');
INSERT INTO infobox_configuration VALUES('#tID#', '', 'boxad.php', 'BOX_AD_BANNER_HEADING', 'yes', 'right', '15', now(), now(), 'Advertise', 'infobox', '#0000FF');
UPDATE template SET date_added= now(), last_modified= now(), template_image= "Mytemplate.gif", template_cellpadding_main ="2", template_cellpadding_sub= "10", template_cellpadding_left= "3", template_cellpadding_right= "3", site_width= "776", include_column_left= "yes", include_column_right= "yes", box_width_left= "150", box_width_right= "150", main_table_border= "yes", active= "1", languages_in_header= "no", cart_in_header= "no", show_header_link_buttons="yes", module_one= "mainpage.php", module_two= "featured.php", module_three= "newsdesk.php", module_four= "", module_five= "", module_six= "", customer_greeting= "yes", side_box_left_width="8", side_box_right_width="12" WHERE template_id="#tID#"
[Back To Top]
- Why use BTS?
BTS allows the development of PHP code for the store that can be indenpendent of the HTML coding. It allows some parameters that would otherwise require users to edit files to be changed from the menu. It creates a friendlier store for the end user, as well as the accomplished web designer.
[Back To Top]
|
|