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

#   Vendor Add Product Page - Product Quantity Field Behaiour

##

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

Less More

- Posts: 575
- Thank you received: 11
-
-

9 years 7 months ago [\#267370](#267370) by [ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")  *[Vendor Add Product Page - Product Quantity Field Behaiour](/forum/19-hikamarket/889804-vendor-add-product-page-product-quantity-field-behaiour#267370 "-- HikaShop version -- : 3.0.1 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6 -- PHP version -- : 5.6  Dear  We found out some problem arise when the multivendor market become alive  Vendor tends to skip this quantity field so the scenario of overselling occur (default of this field is &quot;unlimited&quot;)  We would like to change it to empty but &quot;required&quot; field so that vendor will always fill in a value, is that possible?")* was created by *[ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")*

-- HikaShop version -- : 3.0.1
-- HikaMarket version -- : 1.7.2
-- Joomla version -- : 3.6
-- PHP version -- : 5.6

Dear

We found out some problem arise when the multivendor market become alive

Vendor tends to skip this quantity field so the scenario of overselling occur (default of this field is "unlimited")

We would like to change it to empty but "required" field so that vendor will always fill in a value, is that possible?

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 7 months ago [\#267407](#267407) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Vendor Add Product Page - Product Quantity Field Behaiour](/forum/19-hikamarket/889804-vendor-add-product-page-product-quantity-field-behaiour#267407 "-- HikaShop version -- : 3.0.1 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6 -- PHP version -- : 5.6  Dear  We found out some problem arise when the multivendor market become alive  Vendor tends to skip this quantity field so the scenario of overselling occur (default of this field is &quot;unlimited&quot;)  We would like to change it to empty but &quot;required&quot; field so that vendor will always fill in a value, is that possible?")*

Hello,

To make that field required it would require a custom plugin in order to block the saving of the product.
A easier solution would be to use a "product template" and configure that template with a quantity set to "1".
So by default the quantity won't be unlimited but will be "1".

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 575
- Thank you received: 11
-
-

9 years 7 months ago -  9 years 7 months ago [\#267445](#267445) by [ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")  Replied by *[ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")* on topic *[Vendor Add Product Page - Product Quantity Field Behaiour](/forum/19-hikamarket/889804-vendor-add-product-page-product-quantity-field-behaiour#267445 "-- HikaShop version -- : 3.0.1 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6 -- PHP version -- : 5.6  Dear  We found out some problem arise when the multivendor market become alive  Vendor tends to skip this quantity field so the scenario of overselling occur (default of this field is &quot;unlimited&quot;)  We would like to change it to empty but &quot;required&quot; field so that vendor will always fill in a value, is that possible?")*

Which API should we use for that ?

Last edit: 9 years 7 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: removing useless quote

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 7 months ago [\#267461](#267461) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Vendor Add Product Page - Product Quantity Field Behaiour](/forum/19-hikamarket/889804-vendor-add-product-page-product-quantity-field-behaiour#267461 "-- HikaShop version -- : 3.0.1 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6 -- PHP version -- : 5.6  Dear  We found out some problem arise when the multivendor market become alive  Vendor tends to skip this quantity field so the scenario of overselling occur (default of this field is &quot;unlimited&quot;)  We would like to change it to empty but &quot;required&quot; field so that vendor will always fill in a value, is that possible?")*

Hello,

You would have to use the HikaShop Product triggers.
Best would be to use both onBeforeProductCreate and onBeforeProductUpdate
[ www.hikashop.com/support/documentation/6...ntation.html#product](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#product)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 575
- Thank you received: 11
-
-

9 years 7 months ago -  9 years 7 months ago [\#267545](#267545) by [ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")  Replied by *[ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")* on topic *[Vendor Add Product Page - Product Quantity Field Behaiour](/forum/19-hikamarket/889804-vendor-add-product-page-product-quantity-field-behaiour#267545 "-- HikaShop version -- : 3.0.1 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6 -- PHP version -- : 5.6  Dear  We found out some problem arise when the multivendor market become alive  Vendor tends to skip this quantity field so the scenario of overselling occur (default of this field is &quot;unlimited&quot;)  We would like to change it to empty but &quot;required&quot; field so that vendor will always fill in a value, is that possible?")*

Thanks for it,

may we ask for a sample code which return false and enqueue a error message?

Last edit: 9 years 7 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: removing useless quote

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 7 months ago [\#267569](#267569) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Vendor Add Product Page - Product Quantity Field Behaiour](/forum/19-hikamarket/889804-vendor-add-product-page-product-quantity-field-behaiour#267569 "-- HikaShop version -- : 3.0.1 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6 -- PHP version -- : 5.6  Dear  We found out some problem arise when the multivendor market become alive  Vendor tends to skip this quantity field so the scenario of overselling occur (default of this field is &quot;unlimited&quot;)  We would like to change it to empty but &quot;required&quot; field so that vendor will always fill in a value, is that possible?")*

Hello,

1 - Please stop "quoting" entire messages of the forum just to perform a simple "reply".
I have edited several of your messages and each time I pu the same reason ; I though that you would understand that if I edit your message to remove the useless quotes it would mean that you should use "quote" in these cases.
You have today almost 300 messages in the forum ; you have experience and knowledge of how we are working.

2 - No, I won't.
And there is a very simplement reason for that ; I already gave that kind of code in the forum.
With a little search in our forum (via our forum search or your favorite search engine), you would have find very easily that forum thread :
[ www.hikashop.com/forum/19-hikamarket/884...or-adds-product.html](https://www.hikashop.com/forum/19-hikamarket/884398-required-fields-when-vendor-adds-product.html)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE5LWhpa2FtYXJrZXQvODg5ODA0LXZlbmRvci1hZGQtcHJvZHVjdC1wYWdlLXByb2R1Y3QtcXVhbnRpdHktZmllbGQtYmVoYWlvdXI/dG1wbD1tYXJrZG93bg==) 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?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

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

Time to create page: 0.050 seconds

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