[Skip to main content](#vessel-content)

#   Can not add more than 60 products to discount

##

- **[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")**
- [![mojweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5128-mojweb "View mojweb's Profile") Topic Author
- [ Offline](/forum/user/5128-mojweb)

Less More

- Posts: 432
- Thank you received: 22
-

2 years 8 months ago [\#359179](#359179) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  *[Can not add more than 60 products to discount](/forum/46-discount-coupon/907771-can-not-add-more-than-60-products-to-discount#359179 "-- HikaShop version -- : 5.0.3 -- Joomla version -- : 4.4.2 -- PHP version -- : 8.2.15  When adding products to discount (advanced restrictions), I can only add 60 products. Is there a limit? How to increase it?")* was created by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")*

-- HikaShop version -- : 5.0.3
-- Joomla version -- : 4.4.2
-- PHP version -- : 8.2.15

When adding products to discount (advanced restrictions), I can only add 60 products.
Is there a limit? How to increase it?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDc3NzEtY2FuLW5vdC1hZGQtbW9yZS10aGFuLTYwLXByb2R1Y3RzLXRvLWRpc2NvdW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

2 years 8 months ago [\#359181](#359181) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can not add more than 60 products to discount](/forum/46-discount-coupon/907771-can-not-add-more-than-60-products-to-discount#359181 "-- HikaShop version -- : 5.0.3 -- Joomla version -- : 4.4.2 -- PHP version -- : 8.2.15  When adding products to discount (advanced restrictions), I can only add 60 products. Is there a limit? How to increase it?")*

Hi,

There is indeed a limit based on the length of the discount_product_id column in the hikashop_discount table in your database.
You could change the type of that column. It's set by default to 255 characters. You could change it to "text" to allow for up to 65000 characters.
We decided not to change that because normally, if you have so much products to select in a discount, it makes more sense to create an unpublished category and select that category in the discount, and then add it to the products on which you want the discount to apply as a second category. Also, keeping the varchar type instead of text helps with the speed of the MySQL queries.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDc3NzEtY2FuLW5vdC1hZGQtbW9yZS10aGFuLTYwLXByb2R1Y3RzLXRvLWRpc2NvdW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")**
- [![mojweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5128-mojweb "View mojweb's Profile") Topic Author
- [ Offline](/forum/user/5128-mojweb)

Less More

- Posts: 432
- Thank you received: 22
-

2 years 8 months ago [\#359202](#359202) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Can not add more than 60 products to discount](/forum/46-discount-coupon/907771-can-not-add-more-than-60-products-to-discount#359202 "-- HikaShop version -- : 5.0.3 -- Joomla version -- : 4.4.2 -- PHP version -- : 8.2.15  When adding products to discount (advanced restrictions), I can only add 60 products. Is there a limit? How to increase it?")*

Thank you.
As I understand VARCHAR is A VARIABLE length string (can contain letters, numbers, and special characters). The size parameter specifies the maximum column length in characters - can be from 0 to 65535.
Can I just increase VARCHAR(size) to VARCHAR(500)?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDc3NzEtY2FuLW5vdC1hZGQtbW9yZS10aGFuLTYwLXByb2R1Y3RzLXRvLWRpc2NvdW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

2 years 8 months ago [\#359209](#359209) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can not add more than 60 products to discount](/forum/46-discount-coupon/907771-can-not-add-more-than-60-products-to-discount#359209 "-- HikaShop version -- : 5.0.3 -- Joomla version -- : 4.4.2 -- PHP version -- : 8.2.15  When adding products to discount (advanced restrictions), I can only add 60 products. Is there a limit? How to increase it?")*

Hi,

Indeed, the maximum value of VARCHAR has been increased at some point with MySQL 5:
[ stackoverflow.com/questions/13506832/wha...sql-varchar-max-size](https://stackoverflow.com/questions/13506832/what-is-the-mysql-varchar-max-size)
Before, the maximum was 256 and in order to support old versions of MySQL, we stuck we 255.
So yes, you can increase the VARCHAR size to 500

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDc3NzEtY2FuLW5vdC1hZGQtbW9yZS10aGFuLTYwLXByb2R1Y3RzLXRvLWRpc2NvdW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")**
- [![mojweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5128-mojweb "View mojweb's Profile") Topic Author
- [ Offline](/forum/user/5128-mojweb)

Less More

- Posts: 432
- Thank you received: 22
-

2 years 8 months ago [\#359229](#359229) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Can not add more than 60 products to discount](/forum/46-discount-coupon/907771-can-not-add-more-than-60-products-to-discount#359229 "-- HikaShop version -- : 5.0.3 -- Joomla version -- : 4.4.2 -- PHP version -- : 8.2.15  When adding products to discount (advanced restrictions), I can only add 60 products. Is there a limit? How to increase it?")*

Great. Working.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi85MDc3NzEtY2FuLW5vdC1hZGQtbW9yZS10aGFuLTYwLXByb2R1Y3RzLXRvLWRpc2NvdW50P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.066 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
