ステータスが実行されるように製品名のフィルタリングを実行したい(製品[Samsung、alien]これらの値はデータベースからランダムに表示されます。コードがどこに記述され、どのロジックでレンダリングされているかわかりません)。段階的に答えを提供してください。
前もって感謝します。
ソリューションを受け取りました。データベースフィールド名を使用してインデックスデータを追加しました(location:/var/www/magento/app/code/local/One/First/Block/Adminhtml/First/Grid.php)
----------->$this->addColumn('select_first',array( 'header' => Mage::helper('first')->__('Product Name'), 'width' => '150px', 'index' => 'proid', 'type' => 'options', 'options' => Mage::getSingleton('first/arrayf')->getProArray(), ));
$collection = Mage::getModel('catalog/product')->getCollection()
->addAttributeToSelect('sku')
->addAttributeToSelect('name')
->addAttributeToSelect('attribute_set_id')
->addAttributeToSelect('type_id')
->joinField('qty',
'cataloginventory/stock_item',
'qty',
'product_id=entity_id',
'{{table}}.stock_id=1',
'left')
->joinAttribute('status', 'catalog_product/status',
'entity_id', null, 'inner', $store->getId());
これで、$ collectionにすべての製品とそれぞれのステータスが表示されたので、次の方法でフィルターを実行できます。
$collection->addAttributeToFilter('status', array(
'like' => array('status'),
));