在 Magento 中,当添加产品以自动禁用它时,marketpalce 卖家中有任何代码吗?

In Magento there is any code in marketpalce seller when adding product to automatic disable it?

我正在使用一个市场,当卖家添加任何产品然后它变为启用并且实时有任何代码可以添加到卖家添加产品页面到当卖家添加新产品然后它变为禁用然后管理员批准它。

是的。这是可能的。

您还没有分享任何代码。所以我只是告诉你你是如何成为你的目标的。

您需要将产品状态设置为 2 or disabled 才能保存。

类似的东西

$product = Mage::getModel('catalog/product');
$product->setStatus(2) //product status (1 - enabled, 2 - disabled) 
$product->save();

查看

的完美教程

Programmatically (manually) creating simple Magento product

Programmatically create a configurable Magento product