Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2005
    Posts
    120
    Plugin Contributions
    0

    Default New Product Type -- The Easy Way

    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.

  2. #2
    Join Date
    Aug 2007
    Location
    Tavares, FL USA
    Posts
    5
    Plugin Contributions
    0

    Default Re: New Product Type -- The Easy Way

    I noticed no replies to this post. Is the information accurate? Are there any changes for version 1.3.8?

  3. #3
    Join Date
    May 2007
    Posts
    42
    Plugin Contributions
    0

    Default Re: New Product Type -- The Easy Way

    I would also be interested in anyones comments if they have tried it. I will try it myself as soon as i get a chance.

  4. #4
    Join Date
    Jun 2008
    Location
    Winnipeg Manitoba
    Posts
    4
    Plugin Contributions
    0

    Default Re: New Product Type -- The Easy Way

    It should work. I just created a new product type in a very similar fashion. The only difference was the entry into the PRODUCT_TYPES database table. I used the example in the Zen Cart Wiki article.
    http://www.zen-cart.com/wiki/index.php/Product_Types
    I had to change the blank value for "allow_add_to_cart" to '0' though.
    Now that I have created it, the real fun begins.

 

 

Similar Threads

  1. Easy way to move product attribute selection above the "Add to cart" button?
    By shrimp-gumbo-mmmhhh in forum General Questions
    Replies: 3
    Last Post: 9 Jun 2010, 07:57 PM
  2. Easy way to add images to a new product listing
    By VintageCarol in forum General Questions
    Replies: 1
    Last Post: 21 Apr 2008, 05:56 AM
  3. What's the easiest way to add custom fields to the New Product page?
    By christopherw in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 18 Sep 2007, 06:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR