How to enable frontend editing of custom field

  • Posts: 62
  • Thank you received: 1
8 years 11 months ago #224355

-- HikaShop version -- : 2.6.0
-- HikaMarket version -- : 1.6.7
-- Joomla version -- : 3.4.6
-- PHP version -- : 5.5
-- Browser(s) name and version -- : Chrome 47
-- Error-message(debug-mod must be tuned on) -- : none

Hello,

I have read several threads here where it is clear that a Vendor of HikaMarket Multi-vendor should not be able to edit orders it receives.

However I really need an option where the vendor can complement the product lines of an order with some input in a custom field and have the vendor edit that custom field from the front-end.

I know the main vendor (me) can edit much on the front-end, but I hope it's possible to have the vendors of HikaMarket Multi-vendor to at least be able to edit any custom field I add to the product line of an order.

Is that possible with perhaps some modifications in views or files? If I could perhaps get some pointers where to start or modify that would be awesome.

Kind regards,
Teeuwis Hillebrand

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 11 months ago #224377

Hi,

For the moment, HikaMarket just allow the vendor to change the "order status" of the order ; and nothing more.
Allowing to modify "item custom field" means to allow the edition of the products.
Such kind of modification could allow the vendor to change data which will affect the order full price.
In the same time, if a vendor modify his "sub sale", it should also affect the "main order" (that the customer see).
Modifying "order" custom field could be also problematic because it is an information shared between all orders (the main order and the vendor sub sales). So it could be possible to have some conflict if a vendor edit an information which will affect the orders of the other vendors.

We want to improve HikaMarket and let the vendor do more things that it is currently possible ; but we have to think of the different effects of these modifications.
I agree that the item custom field won't affect the order in most cases.

For the moment it will be difficult to give you details on how implement that feature for the vendors.
Specially because the new order edition for the vendor does not have any edition interface.
But we have a development in progress to provide the new order edition design for the main vendor ; and with these improvements, the order edition for the vendor could have elements (interface) to edit the products and some other stuff.

I hope that my explanations are clear enough.

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: 62
  • Thank you received: 1
8 years 11 months ago #224401

Hi Jerome,

Thank you for the extensive explanation.

Here is the practical case I am trying to tackle. My cliënt (for which I am building the website) is a group of farmers selling their product through the central organisation. The central organisation is the main vendor and each farmer is a vendor in Hikamarket Multi-vendor with each their own products (milk, cheese, meat, vegetables, etc.)

Now the cheese makers usually don't know the exact amount of Kilograms their product wil weigh beforehand and it differs per whole cheese. So when the vendor receives the order it would like to complement that order with a custom field to give an exact amount of Kilograms the customer would receive.

As I see it now I would have to create my own "hikamarket-page" and custom PHP where I do a selection on each order_product row from the cheese category and allow the vendor to alter a custom field linked to it if that vendor is producing that particular product.
Or is there perhaps a way to "tweak/hack/alter" hikashop or hikamarket a bit to make my efforts a bit easier?

Looking forward to hear from you.

Cheers,
Teeuwis Hillebrand

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 11 months ago #224412

Hi,

Thanks to plugins and view override, you can already do a lot of stuff.
With a view override, you can change the way that the vendor order is display and add a button to edit an order product (in a popup, it's better).

Instead of using the default "order" controller of HikaMarket ; you can create your own custom controller thanks to a custom plugin.
The plugin "mangopay" use that system to create new interfaces in the front-end to let the vendors manage their mangopay account.
So ; thanks to that custom plugin, you can only display the edition of the the item custom field (and also have the code to handle the content and modify the products in the database).

It is not easy in the way that it requires some code to handle the data, perform checks and update the content in the database.
But it will assure you that your feature will stay available.
If you modify some HikaMarket core files ; you won't be able to update (or you can update but you will loose your modifications). That's why the view override and the controller plugin are flexible.
It is also possible to perform a class override but I can't suggest you that for the order edition because I know that the class will evolve in the next major release.

I see that the vendor order edition is becoming a requested feature.
I can't give you any schedule for the moment (because I'm still busy with the development of HikaShop 3), but I think it will be one of the next major feature for HikaMarket.

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