Simple way to add a new product type that is basically the same as the basic product type but just needed a few more information fields for your product. In this model you dont need to create new database tables. just add fields to existing products_description table. (i found this easier to do since i dont know MySQL.
Your are creating a new product_type called product_bodycare
1.
figure out field names:
products_ingredients, products_skintype, for example.
add these to the database products_description table. copy how the field product_description is done.
2. copy generic product file or product_music file to create these files:
./admin/product_bodycare.php
./admin/includes/languages/english/product_bodycare.php
./admin/includes/modules/product_bodycare
./admin/includes/functions/extra_functions/product_bodycare_functions.php
./includes/languages/english/product_bodycare_info.php
./includes/modules/pages/product_bodycare_info
./includes/templates/MYTEMPLATE/templates/tpl_product_bodycare_info_display.php (this page should be modified to show the new product info)
<! -- you may not need these
./admin/includes/languages/english/extra_definitions/product_bodycare.php
./admin/includes/boxes/extra_boxes/product_bodycare_extras_dhtml.php
./includes/languages/english/extra_definitions/product_bodycare.php
-->
3. open all the files and search 'products_description'. add/copy into these files the new references to the new fields. ie if you see a variable declaration for $product_description. copy and create one for $products_ingredients, etc..
upload all changed files.
in the database enter this string int the SQL dialog.
INSERT INTO zen_product_types VALUES (7, 'Product - Bodycare', 'product_bodycare', '1', 'Y', '', now(), now());
change the zen_ prefix to zc_ or remove depending on your datatable prefixes. be careful of the default value of 7 according to the moku book product type. it worked fine for me.
(this inserts a new product type into the database. you can now select this product type when making a new product.)
i hope this is helpful. I wrote this up as notes to myself for the next time i need to do it. my thanks to pigdestroyer and moku for the thread about adding product types and the book type download.
Bookmarks