如何删除Magento中所有客户的所有购物车项目?
我想删除 Magento 中所有客户的所有购物车项目(添加到购物车的产品)。
我怎样才能做到这一点?
详细:-
假设我的商店共有 10 位注册客户。他们可能已将商品(产品)添加到购物车。我想要清除所有 10 个注册客户添加到购物车的所有商品。
I want to delete all shopping cart items (products added to cart) of all customers in Magento.
How can I do that?
In detail:-
Suppose, I have total 10 registered customers in my shop. They might have items (products) added to cart. I want to clear all items added to cart for all the 10 registered customers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的第一个猜测是,
购物车项目存储为“报价”的一部分。像这样循环遍历它们可能会很慢,在 SQL 中执行速度更快,但不太安全。
My first guess would be something like,
The cart items are stored as part of a 'quote'. Looping through them all like this might be slow, doing it in SQL is quicker but not as safe.
我知道,这与您的问题没有直接关系,但可能会有所帮助。
Inchoo 几天前发表了一篇文章,将“购物车清空”链接放在购物车页面上。
Magento 的购物车页面上没有“空购物车”
I know, it's not related directly your question but might be help.
Inchoo has published an article a few days ago which is putting "Cart Empty" link on cart page.
There’s no “EMPTY CART” on Magento’s cart page