简体   繁体   English

在magento中将每个客户的产品数量限制为1

[英]Limit product quantity to 1 per customer in magento

I need to limit the quantity of a product purchased by a customer to 1 per day. 我需要限制客户每天购买的产品数量为1。 We are going to have something like deal and day and targeting consumers. 我们将有类似的交易日和目标客户。 We do not want some one to buy high quantities. 我们不希望有人大量购买。 Could some one guide me as to what the general approach should be to do this? 有人可以指导我这样做的一般方法吗? Thanks. 谢谢。

I noticed that there is a table sales_flat_order_item which contains products_id for an order, a join of this table with sales_flat_order should give me product_id for the orders placed by the customer. 我注意到有一个表sales_flat_order_item包含一个订单的products_id ,该表与sales_flat_order应该为我提供由客户下订单的product_id。 How do i access this table data directly and perform the join operation the magento way? 如何直接访问此表数据并以magento方式执行联接操作? Do i need to create a new module? 我需要创建一个新模块吗? or modify a existing module? 或修改现有模块?

You could just create a coupon/coupons for this. 您可以为此创建一个优惠券。 Leave the product at the original price and hand out a coupon to the targeted customers. 保留产品原价,然后将优惠券发放给目标客户。 Make sure that you set it to "only applies to 1 item" and can only be used once. 确保将其设置为“仅适用于一项”,并且只能使用一次。

Regards, Kenny 问候,肯尼

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

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