0
我想通過xml在magento中導入可配置產品。我導入了簡單的產品。爲了創建可配置的產品,我遵循了這裏給出的過程http://www.magentocommerce.com/boards/viewthread/46844/。 它的工作原理。如果我刪除如何以編程方式創建可配置產品
$data=array('5791'=>array('0'=>array('attribute_id'=>'491','label'=>'vhs','value_index'=>'5','is_percent'=>0,'pricing_value'=>'')),'5792'=>array('0'=> array('attribute_id'=>'491','label'=>'dvd','value_index'=>'6','is_percent'=>0,'pricing_value'=>'')));
$product->setConfigurableProductsData($data);
仍然有效。對我有好處。但我的問題是這樣的代碼:
$data = array('0'=>array('id'=>NULL,'label'=>'Media Format','position'=> NULL,'values'=>array('0'=>array('value_index'=>852,'label'=>'vhs','is_percent'=>0,
'pricing_value'=>'0','attribute_id'=>'182'),'1'=>array('value_index'=>853,'label'=>'dvd',
'is_percent'=>0,'pricing_value'=>'0','attribute_id'=>'182')
),'attribute_id'=>182,'attribute_code'=>'media_format','frontend_label'=>'Media Format',
'html_id'=>'config_super_product__attribute_0'));
我不能只使用$product->getTypeInstance()->setUsedProductAttributeIds(array(491));
設置超屬性Id = 491配置的產品?爲什麼在這裏需要屬性的細節? 任何人都可以幫助我找到以編程方式創建可配置產品的最簡單方法。
瀏覽此鏈接。該過程與此處http://www.magentocommerce.com/boards/viewthread/46844/中給出的相同。 – smita 2013-05-08 04:40:50
導入的可配置產品。產品從管理面板可見,但在前端看不到。一旦我從管理面板編輯並保存可配置產品,它就會出現在前端。請建議... – smita 2013-05-10 11:00:59
在您想要顯示可配置產品查看頁面或產品列表頁面的頁面的前端? – 2013-05-10 17:26:54