Magento How To Display Product Custom Option On list.phtml
来源:互联网 发布:qq飞车ae86原装数据 编辑:程序博客网 时间:2024/05/19 13:14
Some time we need to display custom option of product on category list page
to achive this task we only need to paste the code given below in your list.phtml file
$productSku= $_product->getSku();$product= Mage::getModel('catalog/product');$productId= $product->getIdBySku($productSku); $product= Mage::getModel("catalog/product")->load($productId); $attVal= $product->getOptions(); $optStr= ""; // loop through the optionsforeach($attValas $optionKey => $optionVal) { //$optStr .= "<br/>"; //$optStr .= $optionVal->getTitle().": "; $optStr.= "<select style='display:block; clear:both;' name='options[".$optionVal->getId()."]'>"; foreach($optionVal->getValues()as$valuesKey => $valuesVal) {$optStr.= "<option value='".$valuesVal->getId()."'>".$valuesVal->getTitle()."</option>";} $optStr.= "</select>"; } echo($optStr);
- Magento How To Display Product Custom Option On list.phtml
- How to display custom select option on product list page?
- 获得magento simple product的custom option信息
- How to change upsell product display number on product view page?
- How to create custom price in Magento?
- magento how to clear product img
- magento获得产品的custom option信息 Getting all custom options of a product
- How to: Create a Custom List Definition
- SSRS: How to Display Checkbox on Report
- How to: Create a Custom Action Specific to a List
- magento How to get all associated children product of a configurable product
- magento custom product api (1)--- infomobile
- magento custom product api (2) --- getskubyurl
- magento custom product api (3) --- getupdatedproducts
- magento custom product api(4) --- getallproducts
- Magento admin order item update custom option
- magento 更新 custom option 的data数据
- How to get controlToValidate ID base on Custom Validator
- 中国式价值投资 四大成长股票池
- SQL视频总结
- LeetCode:Symmetric Tree
- 价值投资的误区
- hdu1033(水题)
- Magento How To Display Product Custom Option On list.phtml
- visual studio 2012 创建向导时,处理模板文件时出错的解决方法
- 关于findViewById函数
- hdu1031
- Poj 2299 Ultra-QuickSort(归并排序求逆序数)
- 矩阵经典操作(4)
- 搬家啦,CSDN我来了,博客园再见啦
- 【整数操作】02.递归公式的非递归做法
- 老码农教你学英语