When we used autocomplete in opencart admin then it shows a drop down list of product names (just Like a featured products modules). I want to show model number instead of product name. if anyone know how i can do it ?
Thanks in advance.
I think you need to show instead on product name show model name or some other thing. go to admin-->controller-->module-->featured modules(any other)
goto to code
if ($product_info) {
$this->data['products'][] = array(
'product_id' => $product_info['product_id'],
'name' => $product_info['product_name']
);
}
replace it into your needs
if ($product_info) {
$this->data['products'][] = array(
'product_id' => $product_info['product_id'],
'name' => $product_info['model']
);
}
now you just need to refresh it. Product name will replace into model name in admin panel.
'name' => strip_tags(html_entity_decode(
$result['model'] . ' - ' . $result['name'],
ENT_QUOTES,
'UTF-8'
)),
gives model and name.