can anyone help?/Advise?
I need to display [echo] the model, product code in the search.tpl page in Opencart, can anybody help?
Has any one done this before?
Thanks,
can anyone help?/Advise?
I need to display [echo] the model, product code in the search.tpl page in Opencart, can anybody help?
Has any one done this before?
Thanks,
Follow below 4 steps.
/catalog/controller/product/search.php
Find:
'name' => $result['name'],
Add After:
'model' => $result['model'],
/catalog/view/theme/default/template/product/search.tpl
Find:
<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
Add After:
<b><?php echo $product['model']; ?></b>
/catalog/view/theme/default/template/product/search.tpl
Find:
html += '<div class="name">' + $(element).find('.name').html() + '</div>';
Add After:
html += '<b>' + $(element).find('b').html() + '</b>';
/catalog/view/theme/default/template/product/search.tpl
Find:
html += ' <div class="name">' + $(element).find('.name').html() + '</div>';
Add After:
html += ' <b>' + $(element).find('b').html() + '</b>';
& then check it in your search page.