My goal is to duplicate product_general so that I can add a few extra fields. There is another much more recent thread about creating fields, which I tried and works well, but it alters core files which I don't like.
I found the following exchange in an old thread:
That pretty sums up my situation as well. Ajeh then replied:I need to duplicate the general product type many times. Is there an easy way to do this? I looked at the book example in the download sections and WOW!, it was a lot to handle.
I don't want all of the new fields this example demonstrates. I just want the generic, general template.
Any help would be much appreciated!
Thanks!
The key line being this one:I would use Beyond Compare ...
On the left is the full version
On the right an empty directory
Then find all the peices and parts to product_general or product_info
As you copy from left to right it makes the subdirectories for you.
Now you have a full complete set for the Admin and the Catalog for a clean Product General.
Now, find the chunk of code for the product types in the mysql_zencart.sql that makes up a product type for the product_type_layout and product_types table
This will be the insert set. Note the pattern of the names.
Next copy that clean set to another directory ...
Now run through and rename all peices and parts to the new product type name
Once you can use a set and just change the names ... you can make gangs of them.
Note: the admin uses an override system ... there are the default files for the product types, then directories with overrides for the differences. You may or may not need to make many of these as they can use the defaults unless you need customization somewhere.
##############################___
Linda McGrath
Ajeh also wrote:Then find all the peices and parts to product_general or product_info
This begs the question, how does one identify "all the pieces and parts to product_general..."? Searching the entire cart directory for product_general doesn't reveal much at all.A 100% true Product Type would have all of the settings that you see in Product General ... this allows the settings to be 100% unique per product type so you can configure all the little nuances of a Product Type separately from another Product Typs ... :)
While I would much prefer to duplicate product_general, in the mean time I'm trying to follow advice in the first few posts of another old thread "Adding new Product_types", which identifies files used in the music product type. I'm documenting the entire process as I go so that:I'm thinking of a much simpler contrib than the book product types. One that contains all the necessary files in their appropriate directories, explicit instructions on naming and editing those files to create a new product type, and to add a single new field and database table/field. From this, most of us lesser types can surmise how to expand on that to add additional fields as needed.
- I can easily locate errors and make corrections.
- I can post the exact refined procedure (pdf?) so that others can easily follow it. In the interest of simplicity, I would only add a single field.
So...what was my question again?Oh yeah, how to identify all the parts of product_general?


, it was a lot to handle.
Oh yeah, how to identify all the parts of product_general?

