Results 1 to 6 of 6
  1. #1

    Default Clone Product Type

    I really need a ' Definitive/Idiots Guide to Cloning a Product Type'.
    I've found and read everything here on the forums, and the wiki etc. and even raised threads before but had little useful response. The wiki was the most promising but that seems to have vital bits missing, or vague references of what needs to be done.
    All I want to achieve is different layouts for different categories - ie. some categories, show the stock level, others don't show it etc.
    All my products are currently 'General' - Type 1.
    I'm happy and confident copying and editing files, and to edit/manipulate the database. I just need to know exactly which files and tables.
    tia
    Pa

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Clone Product Type

    Did you have a look at the Book Type Product that is in the Downloads section? It has all the files and instructions you should need.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3

    Default Re: Clone Product Type

    Quote Originally Posted by Kim View Post
    Did you have a look at the Book Type Product that is in the Downloads section? It has all the files and instructions you should need.
    Yes - instructions and files relevent to the book product type, none that seem relevent to want I want to do !!!

    Tomorrow, I'll post exactly what I've done (I'm at home now), and what errors I'm getting.
    Pa

  4. #4

    Default Re: Clone Product Type

    OK - Here's what I've done in order to clone the 'Products - General' based on the document at http://www.zen-cart.com/wiki/index.php/Product_Types

    1. Added a row to the product_types table -
    (NULL, 'Product1', 'product1', '1', 'Y', , '0001-01-01 00:00:00', '0001-01-01 00:00:00'). This has the type_id = 6.

    2. In the product_type_layout table, I duplicated all the 'product_type_id = 1' rows (Products - General), changed all their product_type_id fields to 6, then changed all the instances of 'PRODUCT' in their configuration_key fields to 'PRODUCT1'.

    3. Copied the following files and folders (with contents) changing product to product1 in the file and folder names -
    /admin/product.php
    /includes/modules/pages/product_info/*.*
    /includes/languages/english/product_info.php
    /includes/languages/english/['my_template']/product_info.php
    /admin/includes/modules/product/*.*
    /includes/templates/template_default/templates/tpl_product_info_display.php
    /includes/templates/['my_template']/templates/tpl_product_info_display.php
    /admin/includes/languages/english/product.php

    The new product_type appears in ACP->Catalok->Product Types OK, but when I 'Edit Layout->Edit, the following error appears, and there are no tick-boxes on the right in order to change the values.

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/quarncou/public_html/qeshoptest/qeshopmanager/product_types.php(248) : eval()'d code on line 1

    Help/advise urgently required - this has been driving me nuts for days, if not weeks!!

    Thanks
    Pa

  5. #5

    Default Re: Clone Product Type

    OK - Got this working now.
    There was nothing wrong with the 'product1' files created etc. It was the way I added the extra rows to the product_type_layout table !!!
    Whenever I have lots of edits to a db table to do, I export it as a delimited file (using | as the delimiter), bring it into excel, edit, save, then empty the table and import the delimited file back. This normally works fine, but in this instance, something must have been entered in the cells to cause the error, even though I couldn't see anything wrong.
    Eventially, I exported the table as a SQL file, edited that to add the extra rows, then imported it back, and all was well.
    Cheers
    Pa

  6. #6

    Default Re: Clone Product Type

    Just noticed an issue with this cloned Product Type.

    When down to a product page for a product of the 'original' type, looking at the source, its <title> tag is as follows -

    <title>UC-101 PCI 1 PORT RS232 + 1 PORT RS232 [UC101] - &pound;76.50 : Quarndon Electronics</title>

    which is good.

    When down to a product page for a product of the 'cloned' type, looking at the source, its <title> tag is as follows -

    <title>Quarndon Electronics</title>

    which is not so good as it doesn't include the product name and price.

    Any clues where to look to fix this?

    tia
    Pa

 

 

Similar Threads

  1. Auction Product Type: Can't add a product of the type.
    By sw0rdz in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 5 Sep 2009, 02:11 AM
  2. Product Type cloned from General Type
    By mhfein in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 8 Jan 2009, 04:37 PM
  3. How to clone the product type "product - general" ?
    By seifer987 in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 12 Dec 2008, 08:30 PM
  4. Clone (or copy) a product type
    By dtolpin in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 19 May 2008, 08:08 PM
  5. Clone Product Type document general
    By enchantedlingerie in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 8 Apr 2007, 01:28 AM

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