Right now you're creating bulk add menu items for every product type. I see two problems with them:
- You should use something a little more descriptive than the product type name as the menu item title. For example, the product UI module uses "Create
". - You should only create menu items for product types where it's actually possible to bulk add products. I'm going to post another issue on creating an API function to determine the validity of a product type for bulk creation, but the gist of it is checking for fields on a product that have multiple options and accept a single value.
Comments
Comment #1
rszrama commentedFor the menu item title, you could use something like "Bulk add
".
Comment #2
Anonymous (not verified) commentedI had to update my modules (since I was using the ones from the start of June) to see the way you are doing it now. It actually took quite a while to update because I was getting some errors from the new code, so I eventually had to reinstall my dev server and drupal 7 (nightmare!). Anyways, I have added a function in the hook_menu foreach loop that now checks if the product_type is a valid candidate before creating the menu entry for it. Also, the name has been changed to 'Bulk add @name'
-Leighton