- Posts: 171
- Thank you received: 9
Remove main vendor form vendor dropdown field
- pepecortez
-
Topic Author
- Offline
It's fine that the "main" vendor can see all the orders in frontend. But what if I don't want to show main vendor as an option when making the order. How can I remove that option from the "vendor choose dropdown custom field"?
Thanks again,
PePe
Please Log in or Create an account to join the conversation.
It requires some modification in the core of HikaMarket.
I am investigating in order to improve the vendor selector and let him have some "filters".
But because this feature as to be compatible with both modes (dropdown and popup), the development is a little bit more complicated.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- pepecortez
-
Topic Author
- Offline
- Posts: 171
- Thank you received: 9
Jerome wrote: Hi,
It requires some modification in the core of HikaMarket.
I am investigating in order to improve the vendor selector and let him have some "filters".
But because this feature as to be compatible with both modes (dropdown and popup), the development is a little bit more complicated.
Regards,
Thanks Jerome.
We gonne use dropdown version, temporary try to solve it with CSS display:none; .
Please Log in or Create an account to join the conversation.
Temporally, you can put a little modification in order to change the way that the dropdown works.
You can edit the file "administrator/components/com_hikamarket/types/vendor_selection.php" and replace
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- pepecortez
-
Topic Author
- Offline
- Posts: 171
- Thank you received: 9
Tried it out, but main vendor still shown. As I understand the code, these lines check weather the vendor is an admin of the site.
You think more in my ideas, but this is also great for later. But for me, now I just need to not show that main vendor I can set up here:
/administrator/index.php?option=com_hikamarket&ctrl=config#vendor
Your code could be also OK, but in that part of the admin backend, there's no way to add admin to vendor, and I think that's what your code is waiting for.
Jerome wrote: Hi,
Temporally, you can put a little modification in order to change the way that the dropdown works.
You can edit the file "administrator/components/com_hikamarket/types/vendor_selection.php" and replaceByCode:public function displayDropdown($map, $value, $delete = false, $options = '', $id = '') { $vendorClass = hikamarket::get('class.vendor'); $vendors = $vendorClass->getList(); return JHTML::_('select.genericlist', $vendors, $map, $options, 'value', 'text', $value, $id); }It will help you to wait until the implementation of the feature.Code:public function displayDropdown($map, $value, $delete = false, $options = '', $id = '') { $vendorClass = hikamarket::get('class.vendor'); $vendors = $vendorClass->getList(); $app = JFactory::getApplication(); if(!$app->isAdmin()) unset($vendors[0]); return JHTML::_('select.genericlist', $vendors, $map, $options, 'value', 'text', $value, $id); }
Regards,
Please Log in or Create an account to join the conversation.
The configuration of the main vendor is a part of HikaMarket that you can't disable like that.
This main vendor should not be removed, it is the base of the front-end editing feature for you.
So, I have difficulties to understand what you want to do.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- pepecortez
-
Topic Author
- Offline
- Posts: 171
- Thank you received: 9
On our site the main vendor should function just as an "administrator". Main vendor should see everything, do everything on frontend.
BUT! Users can make the orders directly just to the sub-vendors. So in checkout process, on the "Choose vendor" dropdown custom field, we wanna show all our sub-vendors, but do not the main vendor. In this way the main vendor can controll all the subvendors' orders, but the user can not make on order directly to the main vendor.
Jerome wrote: Hi,
The configuration of the main vendor is a part of HikaMarket that you can't disable like that.
This main vendor should not be removed, it is the base of the front-end editing feature for you.
So, I have difficulties to understand what you want to do.
Regards,
Please Log in or Create an account to join the conversation.
Ok so it is what I understood and the patch should do his job.
It remove the "main vendor" from the list of vendors when in the call is made from the fron-end.
So, the main vendor should not be displayed in the dropdown (in the front-end) anymore.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- pepecortez
-
Topic Author
- Offline
- Posts: 171
- Thank you received: 9
Please Log in or Create an account to join the conversation.
Right, my fault.
The code is
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- pepecortez
-
Topic Author
- Offline
- Posts: 171
- Thank you received: 9
Please Log in or Create an account to join the conversation.