- Posts: 28
- Thank you received: 0
Custom fields for brands; Joomla User integration
7 years 9 months ago #303054
by Cedwyn
Custom fields for brands; Joomla User integration was created by Cedwyn
-- HikaShop version -- : 4.0.0
-- Joomla version -- : 3.9.2
-- PHP version -- : latest
Hello,
Two questions:
1) Is it possible or will it be possible in the future to have custom fields for brands like we have for products?
2) Is there a way to integrate joomla users into product creation, like a custom field with a dropdown that accesses joomla's user database?
Thanks!
-- Joomla version -- : 3.9.2
-- PHP version -- : latest
Hello,
Two questions:
1) Is it possible or will it be possible in the future to have custom fields for brands like we have for products?
2) Is there a way to integrate joomla users into product creation, like a custom field with a dropdown that accesses joomla's user database?
Thanks!
Please Log in or Create an account to join the conversation.
7 years 9 months ago #303063
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom fields for brands; Joomla User integration
Hello,
1 - Brands is using the category system, so does the custom field for categories.
2 - I'm sorry but I don't understand what you're talking about. Please clarify.
Regards,
1 - Brands is using the category system, so does the custom field for categories.
2 - I'm sorry but I don't understand what you're talking about. Please clarify.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
7 years 9 months ago #303079
by Cedwyn
Replied by Cedwyn on topic Custom fields for brands; Joomla User integration
Hello Jerome,
Thanks for the quick reply.
Re: #2:
I have a website using hikashop (business edition) for event registration. Most of the event details are custom fields and this works well, however there is a bit of a dilemma for the event teachers. The teachers are currently setup as joomla users with a 3rd party plugin that adds some extra fields to users (bio, photo, custom fields, etc). I would like to continue using joomla users for displaying teachers, so in the backend, I wish to allow event creators to use a dropdown to select the event teachers, which is populated from joomla users.
ie. Custom field "teacher" that has a multiple select dropdown. That dropdown has 1 default value ("no teacher"). When a product is being created in the backend, I wish to access joomla users, select all the teacher users and populate the dropdown custom field with their names.
I looked in the hikashop code for products form to see how you add custom fields to the product new/edit display. I could add code here to check for the custom field "teacher" and populate it with joomla users, but I was wondering if there is a better way to do this?
Thanks for the quick reply.
Re: #2:
I have a website using hikashop (business edition) for event registration. Most of the event details are custom fields and this works well, however there is a bit of a dilemma for the event teachers. The teachers are currently setup as joomla users with a 3rd party plugin that adds some extra fields to users (bio, photo, custom fields, etc). I would like to continue using joomla users for displaying teachers, so in the backend, I wish to allow event creators to use a dropdown to select the event teachers, which is populated from joomla users.
ie. Custom field "teacher" that has a multiple select dropdown. That dropdown has 1 default value ("no teacher"). When a product is being created in the backend, I wish to access joomla users, select all the teacher users and populate the dropdown custom field with their names.
I looked in the hikashop code for products form to see how you add custom fields to the product new/edit display. I could add code here to check for the custom field "teacher" and populate it with joomla users, but I was wondering if there is a better way to do this?
Please Log in or Create an account to join the conversation.
7 years 9 months ago #303100
by nicolas
Replied by nicolas on topic Custom fields for brands; Joomla User integration
Hi,
The best is to create your own type of custom field using the cusotm field API in a plugin of the group "hikashop":
www.hikashop.com/support/documentation/6...entation.html#fields
In your custom field code, you could extend from the single dropdown custom field type class and load dynamically the values from the database in the display function before calling the parent function.
That a lot easier and cleaner I think.
If you need an example of how to create a new custom field type, you can look at the plugins/hikashop/datepickerfield/ files. This plugin adds the "advanced date picker" type to the custom field system.
The best is to create your own type of custom field using the cusotm field API in a plugin of the group "hikashop":
www.hikashop.com/support/documentation/6...entation.html#fields
In your custom field code, you could extend from the single dropdown custom field type class and load dynamically the values from the database in the display function before calling the parent function.
That a lot easier and cleaner I think.
If you need an example of how to create a new custom field type, you can look at the plugins/hikashop/datepickerfield/ files. This plugin adds the "advanced date picker" type to the custom field system.
Please Log in or Create an account to join the conversation.
7 years 9 months ago #303498
by Cedwyn
Replied by Cedwyn on topic Custom fields for brands; Joomla User integration
That's a great idea, thanks!
Please Log in or Create an account to join the conversation.
Time to create page: 0.086 seconds