Jump to content

Generate automatically a link to search for the text


Recommended Posts

I have in product description a list of compatible modules like this:

<ul>  <li><strong>HP DesignJet 10 Printer series</strong>
    <ul>
      <li>HP DesignJet 10PS Printer - C7790A</li>
      <li>HP DesignJet 10PS Printer - C7790AR</li>
    </ul>
  </li>
  <li><strong>HP DesignJet 20 Printer series</strong>
    <ul>
      <li>HP DesignJet 20PS Printer - C7790B</li>
      <li>HP DesignJet 20PS Printer - C7790BR</li>
    </ul>
  </li>
</ul>

it is possible to generate automatically a link to search for the text inside each line.

Link to comment
Share on other sites

Thanks, but I have done with a small  javascript in product page.

 

$('#filtro_mod li li').each(function(){
    var html = $(this).html();
$(this).html('<a href="http://hpecas.com/{$lang_iso}/pesquisa?controller=search&orderby=position&orderway=desc&search_query=' + html.split('-')[0] + '">' + html + '</a>');
});

 

See the example:

http://hpecas.com/en/service-manuals-hp-hp-repair-guides-hp-parts-references-for-hp-printers/hp-color-laserjet-cm1015-mfp-series-hp-service-manual-cb394-90930_1353.html

Link to comment
Share on other sites

×
×
  • Create New...