$Id: STS_Mini_HowTo.txt,v 1.2 2004/11/28 23:13:11 downhom Exp $ Our online stores use templates for the design. File Locations: =============== includes/sts_template.html - Master template for the store. All pages use this template unless a specific one was designed includes/sts_templates/ - If you need a specific template for a page, the file goes in this directory. For example, to make a template for the product_info.php page the template is named product_info.php.html and placed in this directory. stylesheet.css - The CSS style sheet for the site ----------------------------------------------------------------------------- USING PRODUCT_INFO CONTENT TEMPLATES: ----------------------------------------------------------------------------- Starting with version 2.00 you can now use PRODUCT_INFO TEMPLATES to customize the $CONTENT section of your product information pages by creating: /catalog/includes/sts_templates/product_info.php.html and using the product_info template variables (listed below) to layout your product_info pages. A very ugly but functional sample of a product_info.php.html file is provided in the STS distribution. This file is called: product_info.php.html-SAMPLE To use this file on your site, you would copy it into your /catalog/includes/sts_templates/ directory and rename it to be product_info.php.html SUPPORTED TEMPLATE TAGS: ----------------------------------------------------------------------------- Here are the tags that are supported so far (more sure to come in later versions): $headcontent: Put this string in your section so that it can insert the dynamic head content and javascript on pages that require it. This will probably require putting the $headcontent in the section in the source code. It's a pain to do it this way, but it was the only way I could get it working. Sorry! : You can use this commented format of $headcontent to keep the word "$headcontent" from displaying in your web authoring software. NOTE: Do not put ... tags in your header. It will be added as part of the $headcontent variable, along with the Description and Keywords meta tags if you have the WebMakers.com's Header Tag Controller contribution installed. $cataloglogo: The OSC logo and link $urlcataloglogo: The URL used by the $catalog logo. $myaccountlogo: The MyAccount graphic and link $urlmyaccountlogo: The URL used by the My Account function $cartlogo: The Cart graphic and link $urlcartlogo: The URL used by the Cart function $checkoutlogo: The Checkout graphic and link $urlcheckoutlogo: The URL used by the Checkout function $breadcrumbs: The "Top > Catalog > whatever..." breadcrumbs text and links $myaccount: The text version of "My Account" and link. Changes to "Logoff" if logged on. $urlmyaccount: The URL used by the MyAccount function. $logoff: The Logoff text and link $urllogoff: The URL for the LogOff function $myaccountlogoff: shows "My Account | Logoff" if logged in or "My Account" if not logged in $cartcontents: The text version of the "Cart Contents" function. $urlcartcontents: The URL used by the MyAccount function. $checkout: The text version of the "Check Out" function. $urlcheckout: The URL used by the "Check Out" function. $categorybox: The Category box $manufacturerbox: The Manufacturer box $whatsnewbox: The What's New box $searchbox: The Search box $informationbox: The Information box $cartbox: The Shopping Cart box $maninfobox: The Manufacturer Info box (blank if not used on a page) $orderhistorybox: The Order History box (blank if not used on a page, ie: use not logged in) $bestsellersbox: The Best Sellers box $specialfriendbox: Either the Specials box or the Tell A Friend box (depending on page viewed) $reviewsbox: The Reviews box $languagebox: The Languages box $currenciesbox: The Currencies box $xsellbox: The Cross Sell box $alsopurchasebox: The Also Purchased box $upcomingbox: Upcoming Products box $featuredbox: Featured Products box $content: The main content of the page (the middle of the page) $date: The current date $numrequests: The "XXX requests Since DATE" text $counter: The page view counter $footer: The footer output from footer.php $banner: The banner output from footer.php $sid: The string for the Session ID in the format "SessionIdVarName=WhateverTheSessionIdIs" $urlcat_Category_Name: The URL to link to the category name. Spaces in the category name must be replaced with underscores. For example, for a link the category "Video Cards" you would user the template variable $urlcat_Video_cards The variable names are case insensitive, so you can use upper and lower case however you like. $urlcat_x_y_z: The URL to link to the category by cPath string. You can use this to link to a category by the numeric values of the categories as shown by the "cPath" variable in the URL. The benefit of this is that it will still work if you change the names of the categories, which would break the $urlcat_Category_Name format. $cat_Category_Name: Same as $urlcat_Category_Name $cat_x_y_z: Same as $urlcat_x_y_z $catmenu: A drop-down list of available categories (defined in sts_user_code.php) ----------------------------------------------------------------------------- SUPPORTED PRODUCT_INFO TEMPLATE TAGS: ----------------------------------------------------------------------------- These are the tags you can use when creating Product_Info templates. These tags can be used in place of the $content variable in your /catalog/includes/sts_templates/product_info.php.html file. $startform: Required as the first item in the content area. This starts the HTML form needed for adding things to your cart. $endform: This should be the last item in the content area. This closes the HTML form needed for adding things to your cart. $productname: The product name $productmodel: The product's model number or blank $productdesc: The product description $imagesmall: The product image scaled down to the thumbnail size specified in your /admin/ tools $imagelarge: The product image with no resizing (actual size of image) $optionheader: The "Available Options:" text above the options, will change with the language. Blank if no options (product attributes) $optionames: A list of Option (Product Attribute) names, separated by line breaks ("
"). Blank if no options. $optionchoices: A list of Option (Product Attributes) choices as drop-down boxes, separated by line breaks ("
"). Blank if no options. NOTE: As shown in the /catalog/includes/product_info.php.html-SAMPLE file, it is recommended that you use an HTML table to layout the options (Product Attributes). In the first column have $optionnames and in the second column have $optionchoices. This will automatically keep the correct names next to the correct choices. $moreinfolabel: The language-sensitive value of TEXT_MORE_INFORMATION (for linking to a more detailed page) $moreinfourl: The URL of the page where more information can be found $productdatelabel: Will contain either the Date Added or the Date Available messages, language specific. $productdate: The date it will be available or the date it was added. $reviews: The number of reviews for the item $reviewsbutton: The image for the reviews button $reviewsurl: The URL for the product's reviews NOTE: The "Products Also Purchased" feature does not work in the Product_Info templates (yet) ----------------------------------------------------------------------------- DEBUGGING: ----------------------------------------------------------------------------- In the /catalog/includes/sts_display_output.php file you can see the following settings (near the top of the file): $display_template_output = 1; $display_normal_output = 0; $display_debugging_output = 0; Display_Template_Output (the default setting) will cause it to display the template versions of the pages. Display_Normal_Output will cause it to display the non-template version of the pages. Display_Debugging_Output will cause it to display debugging information showing all of the blocks of data that it is using and how it translates them into template variables as well as some other runtime details. You can use any or all of the settings in any combination. If you have both Normal and Template output, the Template output will be displayed first. ----------------------------------------------------------------------------- REMOTE DEBUGGING: ----------------------------------------------------------------------------- You can toggle the debugging options via URL options. You can use the following parameters in your URL to turn on/off options from your browser sts_template=1 Turns on the Template display sts_template=0 Turns off the Template display sts_normal=1 Turns on the Normal display sts_normal=0 Turns off the Normal display sts_debug=1 Turns on the Debugging display sts_debug=0 Turns off the Debugging display sts_version=1 Turns on Version Number display sts_version=0 Turns off Version Number display