The index template is used to display the homepage.
This template contains the following references:
Term | Data Type | Typical Output | Description |
---|---|---|---|
features | array | (See main_features (array) & features (array)) | |
main_features | array | (See main_features (array) & features (array)) |
main_features (array) & features (array)
The main_features & features references allows you to display featured products. This reference is a recursive array containing the following references within each sub array contained within.
In terms of their function, "main_features" fetches user set featured products and "features" shows randomly selected products. Its sometimes useful to access the main_features array first and use features as a fallback incase not enough or any main_features are set.
The products reference uses a snippet to display each product.
Term | Data Type | Typical Output | Description |
---|---|---|---|
id | int | 4 | The product id |
link | varchar | http://www.yourstore/product/product_name_1.html | Link to the product |
link_button | html | <button… | HTML button with link to the product |
short_description | varchar | Short description of product | Short description |
buy_button | html | <button id=”… | HTML buy button w/out quantity |
buy_button_image | html | <a href=“buy”><img src=”… | HTML image button |
price_ex_tax | varchar | £5.00 | The price excluding tax formatted to the local currency |
price_inc_tax | varchar | £5.90 | The price including tax formatted to the local currency |
price_was | varchar | £5.90 | The original price formatted to the local currency |
price_saved | varchar | £5.90 | The amount saved inc tax formatted to the local currency |
price_saved_percent | varchar | £5.90 | The percentage saved over the original price |
price_rrp | varchar | £5.90 | The original RRP price formatted to the local currency |
price_rrp_saved | varchar | £5.90 | The amount saved inc tax formatted to the local currency |
price_rrp_saved_percent | varchar | £5.90 | The percentage saved over the original price |
is_special | boolean | True / false | Determines if the product is on special offer |
savings_text | html | Youve saved x amount.. | HTML savings text |
tax_rate | varchar | 20 | Tax rate in percent |
name | varchar | Product Name | Title of the product |
name_short | varchar | Product Na.. | An abbreviated title of the product |
stock | varchar | 56 | The current stock level for this product |
code | varchar | 201224 | The product code |
man_code | varchar | DFG-45323 | The manufacturers code |
upc_code | varchar | 6346345 | The UPC code |
brand.name | varchar | Value Range | The brand / manufacturers name |
brand.id | varchar | 5 | The brand id |
is_free_delivery | varchar | True / false | Determines if this product is eligible for free delivery |
review_stars | html | <img src=”.. | The html image showing review stars |
review_average | int | 4 | The average rating out of 5 |
review_count | int | 6 | The total number of reviews |
login_for_price | boolean | True / false | User has to log in to view price if true |
qty_prices | html | 100+ $5.00, 200+ $4.85.. | HTML quantity prices |
image_one.active | boolean | True / false | Determines if image exists |
image_one.mini | varchar | http://www.yourstore/images/product_images/mini/product_image.jpg | Mini Image URL & Path |
image_one.small | varchar | http://www.yourstore/images/product_images/small/product_image.jpg | Small Image URL & Path |
image_one.thumb | varchar | http://www.yourstore/images/product_images/thumb/product_image.jpg | Thumb Image URL & Path |
image_one.main | varchar | http://www.yourstore/images/product_images/main/product_image.jpg | Main Image URL & Path |
image_one.large | varchar | http://www.yourstore/images/product_images/large/product_image.jpg | Large Image URL & Path |
image_two.active | boolean | True / false | Determines if image exists |
image_two.mini | varchar | http://www.yourstore/images/product_images/mini/product_image2.jpg | Second Image URL & Path |
image_two.small | varchar | http://www.yourstore/images/product_images/small/product_image2.jpg | Second Image URL & Path |
image_two.thumb | varchar | http://www.yourstore/images/product_images/thumb/product_image2.jpg | Thumb Image URL & Path |
image_two.main | varchar | http://www.yourstore/images/product_images/main/product_image2.jpg | Second Image URL & Path |
image_two.large | varchar | http://www.yourstore/images/product_images/large/product_image2.jpg | Second Image URL & Path |
image_three.active | boolean | True / false | Determines if image exists |
image_three.mini | varchar | http://www.yourstore/images/product_images/mini/product_image3.jpg | Third Image URL & Path |
image_three.small | varchar | http://www.yourstore/images/product_images/small/product_image3.jpg | Third Image URL & Path |
image_three.thumb | varchar | http://www.yourstore/images/product_images/thumb/product_image3.jpg | Third Image URL & Path |
image_three.main | varchar | http://www.yourstore/images/product_images/main/product_image3.jpg | Third Image URL & Path |
image_three.large | varchar | http://www.yourstore/images/product_images/large/product_image3.jpg | Third Image URL & Path |
image_four.active | boolean | True / false | Determines if image exists |
image_four.mini | varchar | http://www.yourstore/images/product_images/mini/product_image4.jpg | Fourth Image URL & Path |
image_four.small | varchar | http://www.yourstore/images/product_images/small/product_image4.jpg | Fourth Image URL & Path |
image_four.thumb | varchar | http://www.yourstore/images/product_images/thumb/product_image4.jpg | Fourth Image URL & Path |
image_four.main | varchar | http://www.yourstore/images/product_images/main/product_image4.jpg | Fourth Image URL & Path |
image_four.large | varchar | http://www.yourstore/images/product_images/large/product_image4.jpg | Fourth Image URL & Path |
Usage
<div class="leftPanel"> <div id="top"><ul> {% for feature in features %} {% include "snippets/features.snippet.html" %} {% endfor %} </ul></div> <div class="featureContainer"> {% for product in features %} {% include "snippets/products.snippet.html" %} {% endfor %} </div> </div>
Comments
0 comments
Please sign in to leave a comment.