How to limit sold product quantity during 1 day for 1 user?

  • Posts: 61
  • Thank you received: 0
8 years 3 weeks ago #254185

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.6

Hello,
I want to sell up to 5 pcs of Each product daily. Not more, to avoid wholesalers during our sales.
We will have 2000+ product, so adding filters manually for each product in Hikashop -> Products -> Limit is not a good idea. Nor we can't limit category. Selling multiple products up to 5 pcs is good for us.
As I understood, the limit in product listing is for always, but we need to reset it next day after purchase.
How can I manage that?

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
8 years 3 weeks ago #254195

Hi,

A global "per day per user per product" option doesn't exist.
You can have a restriction per order per product with the "Quantity per order" setting of the products, and you can have a "per day per per user per product" for one product with limits. But indeed, that means creating thousands of limits.
So either you use the CSV export/import function of your PHPMyAdmin on the hikashop_limit table in order to rapidely generate all the limits in excel by duplicating the entries, or you need to write a small plugin implementing the "onBeforeOrderCreate" trigger in order to add your check with some PHP.

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum