Item Custom Field - Vendor Selection

  • Posts: 28
  • Thank you received: 0
  • Hikamarket Multivendor Hikashop Business
1 week 12 hours ago #308502

-- HikaShop version -- : 4.1.0
-- HikaMarket version -- : 3.0.2
-- Joomla version -- : 3.9.10
-- Error-message(debug-mod must be tuned on) -- : Call to a member function setQuery() on null
/administrator/components/com_hikamarket/types/vendor_selection.php:38

I recently downloaded a fresh version of the most recent hikamarket and when I go to add an item custom field and choose "vendor selector" in the administration, I get this error message when accessing it. Any help to get this up and going is appreciated. I'd like to get this feature up and running on my site soon.

Call to a member function setQuery() on null	
/home1/fivptzer/public_html/shop/administrator/components/com_hikamarket/types/vendor_selection.php:38
Call stack
#	Function	Location
1	()	JROOT/administrator/components/com_hikamarket/types/vendor_selection.php:38
2	hikamarketVendor_selectionType->getVendorList()	JROOT/administrator/components/com_hikamarket/types/vendor_selection.php:49
3	hikamarketVendor_selectionType->displayDropdown()	JROOT/plugins/hikashop/market_vendorselectfield/market_vendorselectfield_class.php:137
4	hikashopMarket_vendorselectfield->display()	JROOT/administrator/components/com_hikashop/classes/field.php:1688
5	hikashopFieldClass->display()	JROOT/administrator/components/com_hikashop/views/field/tmpl/form.php:241
6	include()	JROOT/libraries/src/MVC/View/HtmlView.php:697
7	Joomla\CMS\MVC\View\HtmlView->loadTemplate()	JROOT/administrator/components/com_hikashop/helpers/helper.php:2225
8	hikashopView->loadTemplate()	JROOT/libraries/src/MVC/View/HtmlView.php:230
9	Joomla\CMS\MVC\View\HtmlView->display()	JROOT/administrator/components/com_hikashop/helpers/helper.php:2208
10	hikashopView->display()	JROOT/administrator/components/com_hikashop/views/field/view.html.php:22
11	FieldViewField->display()	JROOT/libraries/src/MVC/Controller/BaseController.php:672
12	Joomla\CMS\MVC\Controller\BaseController->display()	JROOT/administrator/components/com_hikashop/helpers/helper.php:1946
13	hikashopController->display()	JROOT/administrator/components/com_hikashop/helpers/helper.php:1692
14	hikashopController->edit()	JROOT/libraries/src/MVC/Controller/BaseController.php:710
15	Joomla\CMS\MVC\Controller\BaseController->execute()	JROOT/administrator/components/com_hikashop/helpers/helper.php:1924
16	hikashopController->execute()	JROOT/administrator/components/com_hikashop/hikashop.php:72
17	require_once()	JROOT/libraries/src/Component/ComponentHelper.php:402
18	Joomla\CMS\Component\ComponentHelper::executeComponent()	JROOT/libraries/src/Component/ComponentHelper.php:377
19	Joomla\CMS\Component\ComponentHelper::renderComponent()	JROOT/libraries/src/Application/AdministratorApplication.php:101
20	Joomla\CMS\Application\AdministratorApplication->dispatch()	JROOT/libraries/src/Application/AdministratorApplication.php:159
21	Joomla\CMS\Application\AdministratorApplication->doExecute()	JROOT/libraries/src/Application/CMSApplication.php:196
22	Joomla\CMS\Application\CMSApplication->execute()	JROOT/administrator/index.php:51

Last edit: 1 week 2 hours ago by Jerome. Reason: [code] tag is nice

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

  • Posts: 23549
  • Thank you received: 3654
  • MODERATOR
1 week 2 hours ago #308530

Hello,

Would it be possible to know the context of your issue ?
Where do you have that "vendor selector" ? Can you provide us a screenshot ?

Regarding the issue, the vendor selection type is deprecated and should use a namebox instead.
But in order to fix the fatal error, you can edit the mentioned file and on line 38, you could add just before the initialization of the database object :

$db = JFactory::getDBO();

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: 28
  • Thank you received: 0
  • Hikamarket Multivendor Hikashop Business
3 days 14 hours ago #308653

What my end goal is to be able to have customers select which vendor they want to get credit for the sale. I work with various emergency service groups and I'm setting up a system on my website where they get a percentage of each sale. Each emergency service group is considered the "vendor" in this case. Since the vendors will only receive a portion of the emergency-related products to purchase, I'm setting it up so that customers can select it on the products that I'm allowing to give a portion of the sale to the vendor, not their whole order. So I went to Custom Fields and created a "Vendor selection" field type for the "Item". It seems as though once I selected "Namebox" in the "Vendor selection type", I don't get the error message now. I created a test product to make sure it works. It displays just as I want it to, however, once the order is placed and I change the status to reflect that it is a completed order, the selected vendor does not actually get a percentage of that item.

I have set everything up just as it says to here: www.hikashop.com/support/documentation/1...tml#config_main_main

I'm still trying to figure out why it's not working as it should. Based on what I described above and the documentation I was following, is that still the correct way to do it or am I missing something new that is not in that documentation that I need to do in order to make it work?

Attachments:

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

  • Posts: 23549
  • Thank you received: 3654
  • MODERATOR
2 days 17 hours ago #308731

Hello,

So, you did configure HikaMarket to use the "vendor selector" ?
In that setting, you did choose the item custom field you created ?
CF : www.hikashop.com/support/documentation/1...onfig_market_general

When that setting is enable, HikaMarket will look at the custom field value (can be an order or an item custom field) to assign dynamically the vendor.
Please note that the product should be "vendor free" ; without any vendor assignation in the backend. The system won't override an existing vendor assignation.
You also need to not enable the "vendor location" in the same time than the "vendor selector", it could generate unwanted side effects depending your other settings.
www.hikashop.com/support/documentation/1...tml#tuto_market_conf

You don't need to confirm the order to see the vendor assignations. In the HikaShop backend, when displaying an order you will have a dedicated section for HikaMarket which list the vendor related to the order and provide basis details.

Thanks to the link you gave, I was able to see that the item custom field is working (the value is right stored in the cart).
But we don't have access to your backend so we are not able to see your settings or the content of your test orders.
It would be useful to have such kind of access ; you can send us via the "contact form" with a link to that forum thread so the support team will know what to do with it.

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