Magento setting custome option sku for paypal and shopping cart
来源:互联网 发布:九宫飞星排盘软件下载 编辑:程序博客网 时间:2024/06/06 14:13
public function getOptionSku($product = null, $sku='') { $skuDelimiter = '-'; if(empty($sku)){ //$sku = $this->getProduct($product)->getData('sku'); //注释掉 } if ($optionIds = $this->getProduct($product)->getCustomOption('option_ids')) { foreach (explode(',', $optionIds->getValue()) as $optionId) { if ($option = $this->getProduct($product)->getOptionById($optionId)) { $confItemOption = $this->getProduct($product)->getCustomOption('option_'.$optionId); $group = $option->groupFactory($option->getType()) ->setOption($option)->setListener(new Varien_Object()); if ($optionSku = $group->getOptionSku($confItemOption->getValue(), $skuDelimiter)) { $sku = $optionSku; // $sku .= $skuDelimiter . $optionSku; } if ($group->getListener()->getHasError()) { $this->getProduct($product) ->setHasError(true) ->setMessage( $group->getListener()->getMessage() ); } } } } return $sku; }
app/code/core/Mage/Catalog/Model/Product/Type Abstract.php
- Magento setting custome option sku for paypal and shopping cart
- Setting Up PayPal for your Magento Store
- [Magento] Setting PayPal Express checkout
- 发现了magento 中"Shopping Cart Price Rules"一个bug
- magento Shopping Cart Price Rule 购物车促销规则
- Setting the SPOOL option may allow recovery of LINE and COLUMN for error
- magento -- 推荐插件 --Ajax更新购物车数量 --Ajax Shopping Cart Quantity Update
- Magento中在产品页中显示Custom Option中定义的SKU
- asp shopping cart
- PHP Shopping Cart Tutorial
- Shopping Cart Source Code
- Shopping Cart page
- SideBar shopping cart file
- Petstore之Shopping Cart Module
- shopping cart made by JSP
- 购物车shopping-cart问题
- Magento配置Paypal
- magento设置paypal付款
- 使用TextBox的SelectionStart时需要注意的地方
- jquery第十期:表单的操作
- paip.c++ qt creator svn 设置以及使用总结.
- iOS7 Transition Guide (开发变化)
- final关键字
- Magento setting custome option sku for paypal and shopping cart
- Android 游戏开发之主角的移动与地图的平滑滚动
- 设计模式学习笔记-观察者模式
- 设计模式(适配器模式,外观模式)
- 1046. Plane Spotting
- 灰色系统模型GM(1,1)的R语言实现
- js获取随机颜色
- 每日学习: 流量分析的四项指标
- 信号与系统