Reputation: 1603
When creating an order within the admin section, you get the 'Please Select Products to Add' how can I change the code to only show Configurable products within the grid instead of all the products?
Upvotes: 0
Views: 630
Reputation: 23205
To limit the admin order creation process to configurables only, you need to add a product type filter to the collection which the Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid class is using.
$collection->addFieldToFilter('type_id','configurable');
This can be accomplished in different ways, whether via a block rewrite using Magento's nifty configuration-based classname rewriting or by using an observer (the latter being the preferred way).
Post a comment if you need help with the observer or rewrite config.
Upvotes: 2