Magento升级1.7> 1.9数据库问题 [英] Magento Upgrade 1.7 > 1.9 DB Issue

查看:94
本文介绍了Magento升级1.7> 1.9数据库问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Magento 1.7升级到1.9,升级后购物车不再起作用.它未连接到form_key!为什么我认为这是数据库问题:

I upgraded Magento 1.7 to 1.9 and after upgrade the add-to-cart doesn't work anymore. It is not connected to the form_key! Why i think it is a database issue:

我将clean magento 1.9与干净的数据库一起使用,并创建了一种产品,添加到购物车效果很好.我将此magento与我升级的数据库相连,但购物车无法正常工作.

I used clean magento 1.9 with clean database and created one product, add-to-cart works fine. I connected this magento with the database i upgraded and add-to-cart didn't work.

因此带有旧"数据库的干净的Magento在添加到购物车上不起作用. 有谁知道如何解决这个问题?我真的不想使用一个干净的数据库并将数据移至该数据库,因为它是大约50万种产品,并且有很多客户和订单.

So clean Magento with "old" database doesn't work on add-to-cart. Has anyone an idea how to solve this? I don't really want to use a clean database and move data to this, because it is ~500k products and a lot of customers and orders.

更新:

我迷上了controller_action_postdispatch,其中完整的动作名称为checkout_cart_add,并检查了引号中的内容.报价中有一项.我还迷上了controller_action_predispatch_checkout_cart_index并检查了报价,并且报价为空.因此,问题之间会发生.两者之间的事件只是model_saves或一些resource_event.

I hooked into controller_action_postdispatch where the full action name is checkout_cart_add and checked what is in quote. There is one item in quote. I also hooked into controller_action_predispatch_checkout_cart_index and checked the quote, and the quote is empty. So somewhere inbetween the issue occures. The events inbetween are only model_saves or some resource_ events.

更新1:

我在此购物车上记录了所有已执行的SQL查询,并检查了报价是否确实保存在数据库中.该条目在sales_flat_quote中是正确的.所以我的下一个想法是,某种程度上缺少会话和报价的连接,因为我发现在cart_index上没有设置quote对象.我仍然认为它已连接到数据库,因为如果我切换到一些最初安装的" 1.9 db,它就可以正常工作.

I logged all the executed SQL queries on this add-to-cart and checked if the quote is actually saved in database. The entry is correct in the sales_flat_quote. So my next idea is that somehow the connection of session and quote is missing, because i figured out that on cart_index the quote object is not set. I still think it is connected to DB because if i switch to some "originally installed" 1.9 db it works fine.

推荐答案

经过大量调试,我发现了……前端cookie丢失的原因. 前端cookie丢失的原因是,在 Magento后端->系统->配置-> Web->会话管理中,在storeview上下文中设置了cookie域.而且由于配置的url与实际的url不匹配,所以永远不会设置前端cookie,因此该会话不存在,当然引号始终是空的.

After a lot of debugging i found the reason why ... frontend cookie was missing. And the reason why frontend cookie was missing was, in Magento backend -> Sytem -> Configuration -> Web -> Session Management there was a cookie domain set in storeview context. And because the configured url didn't match the actual url the frontend cookie was never set, so the session was not existing and of course the quote was empty all the time.

感谢您花时间与我一起找到解决方案!

Thanks for spending time to find the solution with me!

这篇关于Magento升级1.7> 1.9数据库问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆