Opencart在搜索页面中显示模型代码 [英] Opencart display Model Code in Search Page
问题描述
有人可以帮忙吗?/建议吗?
can anyone help?/Advise?
我需要在Opencart的search.tpl页面中显示[echo]模型,产品代码,有人可以帮忙吗?
I need to display [echo] the model, product code in the search.tpl page in Opencart, can anybody help?
有人做过吗?
谢谢
推荐答案
请遵循以下4个步骤.
/catalog/controller/product/search.php
/catalog/controller/product/search.php
查找:
'name' => $result['name'],
添加时间:
'model' => $result['model'],
/catalog/view/theme/default/template/product/search.tpl
/catalog/view/theme/default/template/product/search.tpl
查找:
<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
添加时间:
<b><?php echo $product['model']; ?></b>
/catalog/view/theme/default/template/product/search.tpl
/catalog/view/theme/default/template/product/search.tpl
查找:
html += '<div class="name">' + $(element).find('.name').html() + '</div>';
添加时间:
html += '<b>' + $(element).find('b').html() + '</b>';
/catalog/view/theme/default/template/product/search.tpl
/catalog/view/theme/default/template/product/search.tpl
查找:
html += ' <div class="name">' + $(element).find('.name').html() + '</div>';
添加时间:
html += ' <b>' + $(element).find('b').html() + '</b>';
&然后在您的搜索页面中对其进行检查.
& then check it in your search page.
这篇关于Opencart在搜索页面中显示模型代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!