简体   繁体   English

Joomla Sessions和VirtueMart购物车-如何保存购物车信息

[英]Joomla Sessions and VirtueMart Cart - how to save cart information

I'm trying to extend the lifetime of the shopping cart for guest users up to a couple of days. 我正在尝试将访客用户的购物车的寿命延长几天。 So that if a user comes back his shopping cart it filled again with the products he has prev. 这样一来,如果用户返回购物车,它就会再次装满他先前的产品。 selected. 已选择。

What I figured so far is: 到目前为止,我想到的是:

The VirtueMart Cart stores it's cart-information in the field "data" in the table "_session". VirtueMart购物车将其购物车信息存储在表“ _session”中的“数据”字段中。 When I extend the session-lifetime in joomla general settings, I can achieve that these entries are stored for let's say 5 days. 当我在joomla常规设置中延长会话寿命时,我可以实现将这些条目存储了5天。

Now I believe that I only have to alter the VM-Objects to: 现在,我相信我只需要将VM对象更改为:

  1. Check if cookie is already on user's mashine 检查Cookie是否已在用户的mashine上
  2. read the session_id out of the cookie and find the session info in table "_session" then read information into shopping cart. 从cookie中读取session_id,然后在表“ _session”中找到会话信息,然后将信息读取到购物车中。

If no cookie present proceed as usual. 如果没有cookie,请照常进行。

Now I don't know if this is something I have to change on joomla's session handling or something in the VM component. 现在,我不知道这是我在joomla的会话处理中是否必须更改还是在VM组件中需要更改。

Has anybody tried something like this before? 有人尝试过这样的东西吗? Other solution ideas? 其他解决方案的想法?

I found a solution for the cart saving problem. 我找到了解决购物车节省问题的方法。 With this plugin you could handle saved carts (alter / delete them from backend). 使用此插件,您可以处理已保存的购物车(更改/从后端删除)。 www.awebsupport.com , and the backend version: http://awebsupport.com/virtuemart-cart-watching-system www.awebsupport.com和后端版本: http ://awebsupport.com/virtuemart-cart-watching-system

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM