Vendor stock control by simple form

  • Posts: 1
  • Thank you received: 0
9 years 7 months ago #171107

-- HikaShop version -- : 2.3.2
-- HikaMarket version -- : 1.4.3
-- Joomla version -- : 3.3.3

Hello,
I'm setting up a multi vendor site and have a question about stock control by vendors. Because Vendors in the online shop also have a normal shop it's a challange to keep the stock data up to date. Now vendors should login, search for the product en decrease the stock with one sold item manual. Same thing if the recieve now stock in the store but then increase the stock levels online.

I also have a licence of RSformpro that have the possibility of some costum scripting. So the question isif it's possible to do it by a form after a vendor log in like:
____
Productcode [FIELD] (vendor fills in or scans the code)
Vendor id [ID] (get vendor id or name from Hikamarkt database after login)
Stock level change with [Amount, standard value by Rsform -1]

Submit
____
Then system checks if vender has such a product:

if not: returns "no product find in online store"
if found: decrease level with amount requested in form and return text "Stock changing succesful"

Hope I can get any help on that.
Thanks

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

  • Posts: 26017
  • Thank you received: 4004
  • MODERATOR
9 years 7 months ago #171108

Hi,

I'm not an expert of RSForm but HikaMarket have some tools which could help you.

To check if the current user is logged as a vendor (function returns "true" or "false")

hikamarket::loginVendor()
To get the current vendor id
hikamarket::loadVendor(false);

To check if the current user have the right to edit products (function returns "true" or "false")
hikamarket::acl('product_edit')
To check if a product is associated with a current logged vendor (function returns "true" or "false")
hikamarket::isVendorProduct($product_id)

Hope it will help you.

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.057 seconds
Powered by Kunena Forum