[Skip to main content](#vessel-content)

#   Save Manufacturer as a text in custom field

##

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

13 years 5 months ago -  13 years 5 months ago [\#102538](#102538) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *[Save Manufacturer as a text in custom field](/forum/2-general-talk-about-hikashop/81435-save-manufacturer-as-a-text-in-custom-field#102538 "Configuring a filter scheme I found this bad limitation:  In a text box I can enter text and assign several fields to be matched. This works fine.  But when I write the brand of a product it is not found because the product&#95;manufacturer&#95;id field is storing an id number and not the text name of the brand.  So I should create an extra field where the text of the category gets stored, but how?  I already have the code to show a manufacturer by its name in products listing, is something like this:  but how and where I should finish this code to make it save the $brandName in a cutom&#95;brand&#95;field each time a product gets Submited/saved?  please understand I am not a PHP coder so don't get any knowledge for granted, I really don't know where to start from, I need very precise indication.  Thanks!")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

Configuring a filter scheme I found this bad limitation:

In a text box I can enter text and assign several fields to be matched. This works fine.

But when I write the brand of a product it is not found because the product_manufacturer_id field is storing an id number and not the text name of the brand.

So I should create an extra field where the text of the category gets stored, but how?

I already have the code to show a manufacturer by its name in products listing, is something like this: Code:

$db = JFactory::getDBO(); $db-&gt;setQuery('SELECT category_name FROM '.hikashop_table('category').' WHERE category_id='.(int)$this-&gt;row-&gt;product_manufacturer_id); $brandName = $db-&gt;loadResult();

but how and where I should finish this code to make it save the $brandName in a cutom_brand_field each time a product gets Submited/saved?

please understand I am not a PHP coder so don't get any knowledge for granted, I really don't know where to start from, I need very precise indication.

Thanks!

Last edit: 13 years 5 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgxNDM1LXNhdmUtbWFudWZhY3R1cmVyLWFzLWEtdGV4dC1pbi1jdXN0b20tZmllbGQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 5 months ago [\#102557](#102557) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Save Manufacturer as a text in custom field](/forum/2-general-talk-about-hikashop/81435-save-manufacturer-as-a-text-in-custom-field#102557 "Configuring a filter scheme I found this bad limitation:  In a text box I can enter text and assign several fields to be matched. This works fine.  But when I write the brand of a product it is not found because the product&#95;manufacturer&#95;id field is storing an id number and not the text name of the brand.  So I should create an extra field where the text of the category gets stored, but how?  I already have the code to show a manufacturer by its name in products listing, is something like this:  but how and where I should finish this code to make it save the $brandName in a cutom&#95;brand&#95;field each time a product gets Submited/saved?  please understand I am not a PHP coder so don't get any knowledge for granted, I really don't know where to start from, I need very precise indication.  Thanks!")*

Hi,

You have the triggers in the Product API
[ www.hikashop.com/en/support/documentatio...ntation.html#product](http://www.hikashop.com/en/support/documentation/62-hikashop-developer-documentation.html#product)

Like : onAfterProductCreate and onAfterProductUpdate

You will have to create a little plugin in the hikashop category.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgxNDM1LXNhdmUtbWFudWZhY3R1cmVyLWFzLWEtdGV4dC1pbi1jdXN0b20tZmllbGQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

13 years 5 months ago [\#102563](#102563) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Save Manufacturer as a text in custom field](/forum/2-general-talk-about-hikashop/81435-save-manufacturer-as-a-text-in-custom-field#102563 "Configuring a filter scheme I found this bad limitation:  In a text box I can enter text and assign several fields to be matched. This works fine.  But when I write the brand of a product it is not found because the product&#95;manufacturer&#95;id field is storing an id number and not the text name of the brand.  So I should create an extra field where the text of the category gets stored, but how?  I already have the code to show a manufacturer by its name in products listing, is something like this:  but how and where I should finish this code to make it save the $brandName in a cutom&#95;brand&#95;field each time a product gets Submited/saved?  please understand I am not a PHP coder so don't get any knowledge for granted, I really don't know where to start from, I need very precise indication.  Thanks!")*

I don't dare to send you a "Thank you" click until I try this, I never made a plugin but hope is as simple as it looks in the instructions... so we'll stay in contact for this.

thank you for the advice!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgxNDM1LXNhdmUtbWFudWZhY3R1cmVyLWFzLWEtdGV4dC1pbi1jdXN0b20tZmllbGQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 5 months ago [\#102573](#102573) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Save Manufacturer as a text in custom field](/forum/2-general-talk-about-hikashop/81435-save-manufacturer-as-a-text-in-custom-field#102573 "Configuring a filter scheme I found this bad limitation:  In a text box I can enter text and assign several fields to be matched. This works fine.  But when I write the brand of a product it is not found because the product&#95;manufacturer&#95;id field is storing an id number and not the text name of the brand.  So I should create an extra field where the text of the category gets stored, but how?  I already have the code to show a manufacturer by its name in products listing, is something like this:  but how and where I should finish this code to make it save the $brandName in a cutom&#95;brand&#95;field each time a product gets Submited/saved?  please understand I am not a PHP coder so don't get any knowledge for granted, I really don't know where to start from, I need very precise indication.  Thanks!")*

Hi,

You can find some tutorial in the joomla website.
You can use a little plugin like "hikashop history". You will have the structure of the XML file and you can remove the no-useful function in the php file.
By renaming the files, changing the names in the XML and creating a zip (with the files), you will have a little plugin.

It is not really complicated but some development skills are required.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgxNDM1LXNhdmUtbWFudWZhY3R1cmVyLWFzLWEtdGV4dC1pbi1jdXN0b20tZmllbGQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

13 years 5 months ago [\#102574](#102574) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Save Manufacturer as a text in custom field](/forum/2-general-talk-about-hikashop/81435-save-manufacturer-as-a-text-in-custom-field#102574 "Configuring a filter scheme I found this bad limitation:  In a text box I can enter text and assign several fields to be matched. This works fine.  But when I write the brand of a product it is not found because the product&#95;manufacturer&#95;id field is storing an id number and not the text name of the brand.  So I should create an extra field where the text of the category gets stored, but how?  I already have the code to show a manufacturer by its name in products listing, is something like this:  but how and where I should finish this code to make it save the $brandName in a cutom&#95;brand&#95;field each time a product gets Submited/saved?  please understand I am not a PHP coder so don't get any knowledge for granted, I really don't know where to start from, I need very precise indication.  Thanks!")*

Thanks for your support, I will try sometime during this week. knowing your support team is so close it makes me more dareful to try it!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgxNDM1LXNhdmUtbWFudWZhY3R1cmVyLWFzLWEtdGV4dC1pbi1jdXN0b20tZmllbGQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.104 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
