Magento-以编程方式添加的产品不会显示 [英] Magento - Programmatically added products don't show up

查看:79
本文介绍了Magento-以编程方式添加的产品不会显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用定制的导入配置文件导入产品.在这里,我在产品上设置了一些值,然后将其保存,如下所示:

I am trying to import products using a custom made import profile. Here I set some values on the product and then save it, like this:

$product = Mage::getModel('catalog/product');
$data = array();
// Inbetween I fill $data with some values
$product->addData($data);
$product->save();

但是,产品可以显示在管理员中,但可以显示在前端(我确实将它们添加到类别中).

However, the products do show up in the admin, but do not show up on the frontend (I did add them to categories).

奇怪的是,一旦我在管理员中打开它们并再次保存它们(不进行任何修改),它们确实会出现在前端.我是在忘记某些东西,还是该操作以某种方式设定的一些价值?

The odd thing is, they do appear on the frontend once I open them in the admin and save them again (without modifying anything). Am I forgetting something, or some value that is somehow set by that action?

我试图重建后端中的所有索引并清除缓存,但这与

I tried to rebuild all indices in the backend and to clear the cache, but this does not work, contrary to Magento API: Rebuild Indexes after adding new products.

推荐答案

某些此处.

Some guesses, since this comes up from time to time. See also here.

这篇关于Magento-以编程方式添加的产品不会显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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