Vendor Add Product Page - Product Quantity Field Behaiour

  • Posts: 535
  • Thank you received: 11
  • Hikamarket Multivendor Hikashop Business
6 years 11 months ago #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 "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.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
6 years 11 months ago #267407

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 535
  • Thank you received: 11
  • Hikamarket Multivendor Hikashop Business
6 years 11 months ago #267445

Which API should we use for that ?

Last edit: 6 years 11 months ago by Jerome. Reason: removing useless quote

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
6 years 11 months ago #267461

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 535
  • Thank you received: 11
  • Hikamarket Multivendor Hikashop Business
6 years 11 months ago #267545

Thanks for it,

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

Last edit: 6 years 11 months ago by Jerome. Reason: removing useless quote

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
6 years 11 months ago #267569

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

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