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:
$db = JFactory::getDBO();
$db->setQuery('SELECT category_name FROM '.hikashop_table('category').' WHERE category_id='.(int)$this->row->product_manufacturer_id);
$brandName = $db->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!