马根托。如何重置结帐报价保留 ID?
由于在结帐过程中与外部系统集成,我需要重置和重置在某些情况下,为当前报价提供新的 reservedId
。我尝试了几种方法,但没有成功,
有人知道如何实现吗?
或者,至少,如果这是不可能的,我如何重置整个 Chekout 会话而不强迫客户注销? 我尝试过 unsetAll()
, clear()
& Mage_Checkout_Model_Session
处的 resetCheckout()
方法,但它们似乎没有解决问题
Due to an integration with an external system during the checkout I need to reset & provide a new reservedId
for the current quote in some situations. I’ve tried several methods, with no success
Does anyone know how to achieve that?
Or, at least, if this is not possible, how can I reset the whole Chekout session without forcing the customer to logout?
I’ve tried with unsetAll()
, clear()
& resetCheckout()
methods at Mage_Checkout_Model_Session
, but they don’t seem to do the trick
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如 Zyava 所建议的那样,只需执行
setReservedOrderId(null)
就可以了......我尝试过以前是这样,但问题是(我认为)我是在 Javascript 控制器流程中这样做的
现在我只是在那里放置一个标志作为新的会话变量&只是用 然后中断该过程
,当返回结账时,如果设置了标志,则...
有技巧吗? Magento 为报价创建一个新的servedOrderId
As Zyava has suggested, just doing
setReservedOrderId(null)
did it...I had tried that previously, but problem was (I think) I was doing that inside the Javascript controller flow
Now I am just placing there a flag as a new session variable & just breaking the process with
Then, when coming back to Checkout, if the flag is set, making...
Did the trick & Magento creates a new reservedOrderId for the quote
正如 Raul 所说,将
Mage::getSingleton('checkout/session')->getQuote()->setReservedOrderId(null);
放置在结账页面顶部会重置reserved_order_id
。但是,为了保持空值,您必须保存报价。所以,代码将是
Mage::getSingleton('checkout/session')->getQuote()->setReservedOrderId(null)-save();
它在 Magento CE 1.7 上对我有用。Like Raul said, placing
Mage::getSingleton('checkout/session')->getQuote()->setReservedOrderId(null);
at the top of the checkout page resets thereserved_order_id
. But, in order to remain null you have to save the quote.So, the code would be
Mage::getSingleton('checkout/session')->getQuote()->setReservedOrderId(null)-save();
It worked for me on Magento CE 1.7.