| Many times when developing websites we use Zen | | | | category_product_listing.php using the name you |
| Cart eCommerce system with either a custom | | | | used 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 around | | | | zen_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 little | | | | Using phpMyAdmin or some other way of accessing |
| document types). Having a way to change which | | | | the 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 handy | | | | type_id of the product type that you want to set as |
| since it is easy to overlook the dropdown and use | | | | the 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 version | | | | Now in the category_products_listing.php file, add a |
| 1.3.8a and may be different for your system | | | | comma 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 as | | | | And your done! Now you can add 'Product - Music' |
| discussed in this article, be sure to make backups and | | | | types without the step of selecting the type. Also, if |
| to remake the changes if you upgrade or overwrite | | | | you 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 | | | | |