dsmvovm27249 2015-09-08 15:54
浏览 81

如何在Observer.php中调用getItem()和getOptionList() - Magento

I have an observer (checkout_cart_product_add_after) and would like to get the selected custom options array.

I have found the two elements I require in:

app/design/frontend/MY-THEME/default/template/checkout/cart/item/default.phtml

Which are:

1. $_item = $this->getItem();
2. $_options = $this->getOptionList();

I just don't know how to get them in an observer i.e. what else I have to call.

Thanks in advance!!

  • 写回答

2条回答 默认 最新

  • donglu7998 2015-09-08 18:56
    关注

    please go to the following url

    http://inchoo.net/magento/updating-options-of-configurable-product-that-is-already-in-the-cart/

    thanks

    </div>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用