[英]show custom options in admin
我似乎無法在下面的magento代碼中顯示自定義選項字段-你們中的任何一個好人都可以幫助我嗎?
public function getProductName($product)
{
$value = '<b>'.$product->getname().'</b>';
if ($product->getproduct_type() == 'configurable')
{
//add sub products
$collection = mage::getModel('sales/order_item')
->getCollection()
->addFieldToFilter('parent_item_id', $product->getitem_id());
foreach ($collection as $subProduct)
{
$value .= '<br><i>'.$subProduct->getname().'</i>';
//add product configurable attributes values
$attributesDescription = mage::helper('ProductReturn/Configurable')->getDescription($subProduct->getproduct_id(), $product->getrp_product_id());
if ($attributesDescription != '')
$value .= '<br>'.$attributesDescription;
}
}
return $value;
}
$ product-> getproduct_type()中有問題沒有錯,應該嘗試一下$product->getTypeId()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.