我正在设置Magento会话,但无法成功。
我有将会话数据保存到的控制器LB_Session
。
Mage::getSingleton('customer/session')->setLB_Session(serialize($_SESSION['LB_Session']));
我将其纳入控制器。
但是,当我尝试将其阻止时,它将无法正常工作。
我在将产品添加到购物车页面时调用阻止,如下所示
<catalog_product_view>
<reference name="product.info.addtocart">
<block type="lb/lbblock" name="lbregistration_button_lbblock" template="lb/lbregistration_button.phtml" />
<reference name="content" >
<block type="lb/lbblock" name="lbregistration_popup_lbblock" template="lb/lbregistration_popup.phtml" />
</reference>
</reference>
</catalog_product_view>
提前致谢
我不认为setLB_Session()
是一个有效的制定者名称,除非你定义的这个方法customer/session
自己的模型。应该是类似的东西setLbSession()
,然后您可以使用来在应用程序中的其他位置检索它getLbSession()
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句