New Zenner
- Join Date:
- Feb 2007
- Location:
- Vienna
- Posts:
- 38
- Plugin Contributions:
- 0
How-To: Add new Properties to your Products
hi folks,
this is a little howto add new properties to general products
(like guarantee time, color, oem-number, compatible models, whatsoever)1. think
decide which new properties you want to add to your products
(in this example we take guarantee-time (in months) and color)
.
2. db manipulation
open the table "products" in your zencart-database and insert new rows at the end of the table called "products_guarantee" and "products_color"
*ALTER TABLE zencart_products ADD products_guarantee INT NOT NULL , ADD products_color VARCHAR( 32 ) NOT NULL;
.
*
3. edit 'collect_info.php' (in /admin/includes/modules/product/)1. at the very beginning there is the variable $parameters set. add your row-names to the end:
'products_guarantee' => '0', 'products_color' => '' );
.
2. just below there is the db-query set [$product = $db->Execute("...]
add your rows with a 'p.' in front (before the "from ..." part)
*select ......., p.products_guarantee, p.products_color from ....
.
3. now you can add the input fields in the product-mask (lets say somewhere around line 450 or so):
ps: now i'm feeling really fucked up : P
:blink::blink::blink:
written by chris at linuxuser.at