我想通过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