【发布时间】:2015-02-17 02:46:16
【问题描述】:
我正在尝试将一个产品 ($odlProduct) 的相关产品复制到另一个产品 ($newProduct)。我这样做是因为我试图从可配置的产品中创建一个简单的产品。
我用过这段代码:
$newProduct->setRelatedProductIds($oldProduct->getRelatedProductIds());
我可以确认相关产品已经添加:
Zend_Debug::dump($newProduct->getRelatedProductIds(), "new product...");
我已确定该产品已使用 $newProduct->save();
但是,当我在 PHP 中查询相关产品时,产品页面中没有显示任何内容。
我错过了什么?
【问题讨论】: