Jump to content


This topic is now archived and is closed to further replies.


Someone can help me please?

Recommended Posts


I'm sorry, I don't have much experience in php, please I need some help.

I'm trying to place a drop menu in the admin/categories.php for a new field. It will be used for relating each product with an industry category.


What I have done: I have duplicated the field used for product's weight (all instances the weight is mentioned in the file admin/categories.php) and created a new field in the products' table. Actually I have it as a text field and it works perfectly. When adding a new product, I enter for example "School" and its placed in the database, when I call the product for edit, it's there, and if modified, it is done in the table also..


What I need: I want to create an array for all industries using a drop menu. When adding a product choose from the list one of then, when editing the product, it will display the current selection and if changed, it will change the record in the database. I'll like to use the array directly in the file, without database entry.


I guess probably using a function to return the tep_draw_pull_down_menu will be my option, but my problem is I don't know how to create this.


Someone please give an idea about this.





This is the actual input field I'm using


<td class="main"><font color='red'><?php echo TEXT_PRODUCTS_INDUSTRY; ?></td>
		<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_input_field('products_industry', $pInfo->products_industry); ?></td>

This is the array I would like to create and use as a options in the drop menu:
$industry = array ("School", "Travel", "Automotive", "Services", "Military", Health Care", "Medical", etc....);

Share this post

Link to post
Share on other sites