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. 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. How do i access this table data directly and perform the join operation the magento way? 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
精彩评论