Magento得到所有的产品 [英] Magento get all products

查看:173
本文介绍了Magento得到所有的产品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得整个magento产品系列,没有任何过滤器或限制,但我没有得到所有的产品。



我已经尝试了各种方法,但他们都给我一个非常有限的产品选择。让我们假设商店包含5000个产品,但它只显示500.当我检查目录 - >产品是给我显示整个列表。

  Mage :: getModel('catalog / product') - > getCollection(); 
Mage :: getResourceModel('catalog / product_collection') - > addAttributeToSelect('*');
Mage :: getModel(catalog / product) - > getResourceCollection() - > load();

所有这些都返回相同的金额(500),而我期望它给我5000个产品。我不喜欢使用Zend或PHP,只是坚持Magento的方式来获得它们。



有谁知道如何真正得到所有的产品或可以指向我的正确的方向为什么这不工作?



返回的选择字符串是:

  SELECT 1 AS` status`,`e`.`entity_id`,`e`.`type_id`,`e`.`attribute_set_id` FROM`catalog_product_flat_4` AS`e` 
1.一些内部限制,比如500。
2.一些分页限制。每页的产品(以db抽象)
3.一些延迟限制。



也许有一些过度的问题,但我认为这是一些内部限制。


I am trying to get the entire magento product collection, without any filters or restrictions, but I fail to get all products.

I've tried various methods already, but they all give me a very limited selection of products. Let's say the store contains 5000 products, but it only shows 500. When I check the catalog -> products is does show me the entire list.

Mage::getModel('catalog/product')->getCollection();
Mage::getResourceModel('catalog/product_collection')->addAttributeToSelect('*');
Mage::getModel("catalog/product")->getResourceCollection()->load();

All of them return the same amount (500), while I expect it to give me 5000 products. I would prefer not to use Zend or PHP and just stick to the Magento way to get them.

Does anyone know how to really get ALL products or can point me in the right direction why this isn't working?

The select-string that is returned is:

SELECT 1 AS `status`, `e`.`entity_id`, `e`.`type_id`, `e`.`attribute_set_id` FROM `catalog_product_flat_4` AS `e`

解决方案

Several possibilities here: 1. Some inner limitation, like 500 at all. 2. Some paging limitation. Products per page(in db abstract) 3. Some lazyload limitation.

Perhaps, there is some over problem, but I think this is some inner limit.

这篇关于Magento得到所有的产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆