我想通過magento中的產品名稱獲取產品收集訂單?任何想法??如何通過magento中的產品名稱獲取所有產品收集訂單?
8
A
回答
9
看到獲取按產品名稱升序排序的所有產品: -
$collection = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSort('name', 'ASC');
找產品名降序排序的所有產品: -
$collection = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSort('name', 'DESC');
獲得的產品數量有限(例如:10個產品)按產品名稱升序: -
$collection = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSort('name', 'ASC')
->setPageSize(10);
3
這應有助於:
$collection = Mage::getModel('catalog/category')->load($categoryId)
->getProductCollection()
->addAttributeToSort('name', 'ASC');
相關問題
- 1. Magento - 獲取所有產品的產品集合
- 2. woocommerce產品如何通過產品標籤獲得訂單
- 3. 過濾器Magento產品收集的產品有審查
- 4. Magento - 獲取分組產品的所有關聯產品
- 5. 如何通過WooCommerce中的產品ID訂購相關產品?
- 6. 如何讓所有的產品名稱
- 7. Magento訂單網格:通過訂單檢索數量和產品
- 8. Magento:獲取按屬性過濾的產品集合的訂單項集合
- 9. 如何通過產品ID wordpress獲取woocommerce訂單?
- 10. Magento - 如何通過產品獲得收入
- 11. 在Magento中獲取特定訂單中的產品數量
- 12. 通過WooCommerce中的產品ID獲取產品標籤
- 13. Magento - 獲取當前產品
- 14. 我如何獲得所有Magento產品品牌
- 15. 按產品名稱獲取woocommerce產品ID
- 16. Magento產品定製訂購
- 17. 在odoo中獲取產品名稱
- 18. 過濾器Magento產品集合的產品與圖像
- 19. Magento:查找包含產品的訂單
- 20. Magento:構建庫存中所有可配置產品的定製產品集合
- 21. 如何使用Magento中沒有websiteID的產品進行產品收藏?
- 22. 在magento中保存產品前後獲取產品數量
- 23. Magento:在分組產品中獲取產品網址
- 24. 在magento中獲取產品或產品編號
- 25. 在magento中獲取產品ID和產品類型?
- 26. Magento集團按產品集合中的'名稱'
- 27. PHP Woocomerce獲得產品品牌名稱
- 28. 通過產品ID創建與Magento產品的直接鏈接
- 29. 如何通過prestahop訂單中的語言過濾產品
- 30. Magento - 導入所有產品/進口產品庫存的區別?
真棒................. – smart 2011-03-10 05:55:17