1
如何獲得magento 1.9.3中的自定義選項值? 我的代碼如下,但不工作請幫助我下面的代碼如何在magento 1.9.3中獲得自定義選項值?
$helper = Mage::helper('catalog/product_configuration');
print_r($helper->getCustomOptions());
如何獲得magento 1.9.3中的自定義選項值? 我的代碼如下,但不工作請幫助我下面的代碼如何在magento 1.9.3中獲得自定義選項值?
$helper = Mage::helper('catalog/product_configuration');
print_r($helper->getCustomOptions());
使用我想幫助你
$helper = Mage::helper('catalog/product_configuration');
$items = Mage::getSingleton('checkout/session')->getQuote()->getAllItems();
$wt=0;
foreach($items as $item){
$categories_array = $item->getProduct()->getCategoryIds();
$_options = $helper->getCustomOptions($item);
foreach ($_options as $_option) {
$value = $this->htmlEscape($_option['value']);
$weigth=preg_replace("/[^0-9,.]/","", $value);
echo $wt+= $weigth;
}
}