can a coupon be limited for only 1 time per unique product?

  • Posts: 316
  • Thank you received: 23
2 days 8 hours ago #369915

-- HikaShop version -- : 6.2.0
-- Joomla version -- : 5.4.1
-- PHP version -- : 8.4.15

I found this extension : https://www.hikashop.com/marketplace/product/292-coupon-conditions.html and was trying to figure out if the following could be done with it:

Customers can buy products as many as they like but only on the first unique product they get the discount.
For example product 1, if they buy 10 only 1 product gets the discount.
The same for more products.

For 1 product we can do this manually but with a lot of products this is not something you want to do manually.

Other tips / solutions are more than welcome :)

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

  • Posts: 84881
  • Thank you received: 13827
  • MODERATOR
2 days 4 hours ago #369918

Hi,

To restrict the number of uses for a coupon, only the "quota" and "quota per user" settings can be used.


Being able to restrict the number of users of a coupon based on the purchased quantity of individual products means tracking that information. This is not done at the moment. There is no table in the database which links the users, the products and the coupons / discounts to know how many time a coupon / discount was used by a user and for which products.
Supposing that this table existed ( it could be done in a custom plugin), it would then be possible to develop a custom plugin to restrict the use of a coupon based on past purchases and what is already in the cart.

The coupon conditions plugin won't help with that extra table, and even if that extra table was properly filled, it is not meant to be able to tap into other tables than the standard ones in HikaShop ( cart, product, user, address, etc). So this is a dead end.

A simpler solution would be to create one discount per product with a quota per user of 1 and a fixed flat value corresponding to the price of the product.
That way, you can have different products discounted in the same cart, and only the value of one product is discounted for each product.
However, that indeed means having to setup one discount per produc. And if you want the customer to enter a code to get the discount, it means also using the multicoupon plugin, and having to manage one code per product, which is not practical.


Here, I think a custom plugin is the proper way to go.

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

Time to create page: 0.052 seconds
Powered by Kunena Forum