简体   繁体   English

我如何直接将特定产品添加到Wordpress中的持久购物车

[英]How can i directly add particular product to persistent cart in wordpress

I am adding product from my mobile device and due to this everytime new session is generated in wp_sessions. 我正在从移动设备中添加产品,因此每次在wp_sessions中生成新会话时,都会这样做。 and cart data is not added to the persistent cart in usermeta table. 并且购物车数据未添加到usermeta表中的持久购物车中。

Can you let me know how we can directly add product to current user persistent cart in usermeta? 您能告诉我如何将产品直接添加到usermeta中的当前用户持久购物车吗?

WordPress discourage usage of SESSION concepts. WordPress不鼓励使用SESSION概念。

I Would advice you to check WoCommerce plugin architecture and internal working code, it uses wp_usermeta table to store persistence shopping cart. 我建议您检查WoCommerce插件体系结构和内部工作代码,它使用wp_usermeta表存储持久性购物车。

暂无
暂无

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

相关问题 如何在不刷新产品列表的情况下将产品添加到购物车? - how can i add products to the cart wihtout refreshing the product list? Magento | 我如何在自定义模块中的购物车中添加产品? - Magento | How i can add a product in shopping cart in a custom module? 如何将每个产品作为新商品添加到购物车 - How can I add every product as a new item into cart 我如何才能将Magento添加到购物车ajax推送正确的网址并将产品添加到购物车? - How can I get Magento add to cart ajax push the right url and add the product to cart? 如何在购物车中添加两个产品?点击添加到购物车按钮? - How can i add two product in cart onlclick add to cart buton? 从Wordpress外部将产品添加到woocommerce中的购物车 - add product to cart in woocommerce from outside Wordpress 如果我单击已在购物车中的产品的“添加到购物车”按钮,如何重定向到购物车页面 - How do I redirect to the cart page if I click on the 'Add to cart' button for a product that's already in cart Paypal,添加到购物车-我可以同时销售产品和订阅吗? - Paypal, Add to Cart - Can I sell a product AND a subscription at the same time? Virtuemart 2-我怎样才能通过venuemart_product_id将商品添加到购物车会话中? - Virtuemart 2 - How i can add item into cart session with virtuemart_product_id? 将产品成功添加到购物车后,如何添加ajax通知 - how can I add ajax notice when the product was successfully added to cart
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM