Description
This module is built into the cart version 1.30 and later. It allows you to use a small set of web pages to show all your products no matter how many you have.
Installation
To turn on the module set the $USE_DYNAMIC variable in the shop.cfg file. Set it to '1' to turn on the module.
Usage
This module relies on several files and several HTML tag to work.
They are explained below:
Note: These 2 files are not required for the module to work.
- category_list.txt This is a text file located in your $shopping_root directory that lists the categories your products fall into. The format of this file is one category per line. Each line has a category number and a category name separated by a |.
Example:1|Hats 1|Pants
- product_detail.txt This is a text file located in your $shopping_root directory that has a detailed description of your products. The format of this file is the first line is the product number. Then you can unlimited lines of a product description. You terminate the description with a | on a line by itself. Then You start with a new product.
Example:1 This is a test product description. See how this can extend through multiple lines? | 2 This is a new product. |
- PUT_CATEGORIES_HERE This HTML tag will list all the categories in catgeory_list.txt file. Each category will be linked to category.html using the page argument. It will also pass the category number via the category argument to the category.html page.
- PUT_CATEGORY_NAME_HERE This HTML tag will be replaced with the name of the category that matches the category argument passed when that page was displayed by the cart.
- PUT_PRODUCTS_HERE This HTML tag will list all the products in product_list.txt file that match the category argument passed to the cart on that HTML page. Each product will be linked to product.html using the page argument. It will also pass the item number via the product argument to the product.html page. To specify an a category for each time this token appears add _item#_ to the token. Example: PUT_IMAGE_HERE_1_ This would bring up the image for category #1.
- PUT_PRODUCT_NAME_HERE This HTML tag will be replaced with the name of the item that matches the product argument passed when that page was displayed by the cart. To specify an a item number for each time this token appears add _item#_ to the token. Example: PUT_PRODUCT_NAME_HERE_1_ This would bring up the product name for item #1.
- PUT_DESCRIPTION_HERE This HTML tag will be replaced with the description that matches the product argument passed when that page was displayed by the cart. The description is pulled from the product_descripton.txt file.
- PUT_PRICE_HERE This HTML tag will will be replaced with the price that matches the product argument passed when that page was displayed by the cart. You can use this tag to update all prices on your cart web pages just by changing the product_list.txt file. To specify an a item number for each time this token appears add _item#_ to the token. Example: PUT_PRICE_HERE_1_ This would bring up the price for item #1.
- PUT_ITEM_NUM_HERE This HTML tag will be replaced with the number of the item that matches the product argument passed when that page was displayed by the cart.
- PUT_IMAGE_HERE This HTML tag will be replaced with the image that matches the product argument passed when that page was displayed by the cart. To specify an a item number for each time this token appears add _item#_ to the token. Example: PUT_IMAGE_HERE_1_ This would bring up the image for item #1.