如何從catalog_product_bundle_selection表中獲取集合? 我想已經從Magento的catalog_product_bundle_selection中獲取模型
- getModel(目錄/ product_bundle_selection)
- getModel(包/選擇)
如何從catalog_product_bundle_selection表中獲取集合? 我想已經從Magento的catalog_product_bundle_selection中獲取模型
我想這對我的命令行,它爲我做的工作:
$collection = Mage::getModel('bundle/selection')->getCollection();
foreach($collection as $row){
echo print_r($row->getData(), true);
}
不知道你是否在追求別的東西。
正確的方法是調用
Mage::getModel('bundle/selection')->getCollection();
正如你所位於app/code/core/Mage/Bundle/etc/config.xml
表catalog_product_bundle_selection
是在標籤<selection>
和內部<bundle_resource>
XML標記的文件中看到。您也可以在開放app/code/core/Mage/Bundle/Model/Selection.php
時檢查此項:在_construct()
方法中,稱爲$this->_init('bundle/selection');
,它將此實體表與此分組符號相關聯
謝謝。我已經準確了。日誌記錄(法師::日誌)目的地被改變,所以我沒有看到任何日誌輸出。對不起,打擾了 – wurmi