neller Posted August 27, 2013 Share Posted August 27, 2013 Hi all, I need to be able to expand the BO search facility to search and return the product tags. I have added the tags column to the search result table, but how do I go about joining the database tables and in which function? This is what I'm snooping around currently, AdminSearchController.php protected function initProductList() { $this->show_toolbar = false; $this->fields_list['products'] = array( 'id_product' => array('title' => $this->l('ID'), 'width' => 25), 'manufacturer_name' => array('title' => $this->l('Manufacturer'), 'align' => 'center', 'width' => 200), 'reference' => array('title' => $this->l('Reference'), 'align' => 'center', 'width' => 150), 'tags' => array('title' => $this->l('Tags'), 'align' => 'center', 'width' => 150), 'name' => array('title' => $this->l('Name'), 'width' => 'auto'), 'price_tax_excl' => array('title' => $this->l('Price (tax excl.)'), 'align' => 'right', 'type' => 'price', 'width' => 60), 'price_tax_incl' => array('title' => $this->l('Price (tax incl.)'), 'align' => 'right', 'type' => 'price', 'width' => 60), 'active' => array('title' => $this->l('Active'), 'width' => 70, 'active' => 'status', 'align' => 'center', 'type' => 'bool') ); } Which creates the space for the tags. Then I need to add in something like SELECT DISTINCT p.`name`, FROM `'._DB_PREFIX_.'tags` p LEFT JOIN `'._DB_PREFIX_.' something else here to match the product to the tag and return it Can anyone point me in the direction of what I need to do here and where to put it? Regards, Neller Link to comment Share on other sites More sharing options...
mowax Posted June 11, 2014 Share Posted June 11, 2014 hi neller, i'm trying to do a similar thing, I want to add the supplier reference into the table. did you find out where to put the SELECT DISTINCT p.`name`,FROM `'._DB_PREFIX_.'tags` pLEFT JOIN `'._DB_PREFIX_.' something else here to match the product to the tag and return it and did you get it to work? i'm rooting around trying to find where these fields are defined, no luck yet. thanks for any help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now