Skip to main content

Vendor Add Product Page - Product Quantity Field Behaiour

More
9 years 5 months ago #267370 by ler@singmuiheng.com
-- 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 or Create an account to join the conversation.

More
9 years 5 months ago #267407 by Jerome
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 & HikaSerial developer / HikaShop core dev team.

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

More
9 years 5 months ago - 9 years 5 months ago #267445 by ler@singmuiheng.com
Which API should we use for that ?
Last edit: 9 years 5 months ago by Jerome. Reason: removing useless quote

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

More
9 years 5 months ago #267461 by Jerome
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

Regards,

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

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

More
9 years 5 months ago - 9 years 5 months ago #267545 by ler@singmuiheng.com
Thanks for it,

may we ask for a sample code which return false and enqueue a error message?
Last edit: 9 years 5 months ago by Jerome. Reason: removing useless quote

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

More
9 years 5 months ago #267569 by Jerome
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

Regards,

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

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

Moderators: Obsidev
Time to create page: 0.172 seconds
Powered by Kunena Forum