How to limit coupons to certain products only

  • Posts: 106
  • Thank you received: 1
  • Hikashop Business
5 years 5 months ago #307726

-- HikaShop version -- : 4.1.0
-- Joomla version -- : 3.9.8
-- PHP version -- : 7.0.31
-- Browser(s) name and version -- : Firefox 61.0.2

Is there a limit to how many products can be added to the coupon? If there is, is there another way to isolate certain products perhaps using a zone?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 5 months ago #307730

Hi,

Yes and no.
There is no limit in the code. However, the field discount_product_id of the table hikashop_discount where that data is saved is a varchar(255) type. So it can't store more than 255 characters. We do that for performance optimization.
If you want to increase that though, it's easy. Just change the type of that column to "text" via your phpmyadmin. That will allow for around 65 000 characters, enough to store a few tens of thousands of products selected in that option.
However, I would recommend instead to create an unpublished category, assign that category to the coupon, and add that category as second category to all the products you want to be linked to the coupon.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum