Changing The Default Product Type In Zen-Cart

Many times when developing websites we use Zencategory_product_listing.php using the name you
Cart eCommerce system with either a customused for your Zen Cart admin directory in place of
product type or one of the pre-defined product[admin] (you DID rename your Zen Cart admin
types in the generic installation (Music, Document,directory, right!?). At around line 843, the function
Free Shipping, etc) and the site is built entirely aroundzen_draw_pull_down_menu is called with two
that particular product type (i.e. we only sell music', $product_restrict_types_array);
types on the music site, with no or very littleUsing phpMyAdmin or some other way of accessing
document types). Having a way to change whichthe zen database, browse the
type is selected by default in the admin area of Zen[zen_prefix]product_types and get the value for the
Cart when entering a new product would be handytype_id of the product type that you want to set as
since it is easy to overlook the dropdown and usethe default. For this example, we want the 'Product -
the default 'Product - General' type.Music' to be default which has the type_id=2.
The changes to the files are for Zen Cart versionNow in the category_products_listing.php file, add a
1.3.8a and may be different for your systemcomma and the type_id value like so:
depending on what version you are running. For this zen_draw_pull_down_menu('product_type',
change we will be editing the core Zen Cart files and$product_restrict_types_array,2);
since there are no overrides for the admin area asAnd your done! Now you can add 'Product - Music'
discussed in this article, be sure to make backups andtypes without the step of selecting the type. Also, if
to remake the changes if you upgrade or overwriteyou wanted to add products of other types as well,
the core files for whatever reason.just change the selection in the drop down.
In the the file: [admin]/includes/modules