Jump to content

Implementare in presta


Recommended Posts

  • 2 weeks later...

creezi in tema ta un fisier tpl care va contine formularul dorit sau rezultate interogarii dupa caz

creezi fisierele searchComponenta.php, controllers/SearchComponentaController.php cu contintul similar ca si search.php respectiv controllers/SearchController.php

aceste fisiere le adaptezi pentru cazul tau

controllers/SearchComponentaController.php va contine o functia IF in felul urmator:

if ($cod_produs = urldecode(Tools::getValue('cod_produs')) AND $cod_fabricant = urldecode(Tools::getValue('cod_fabricant')))
		$nbProducts = (int)(Search::searchCod((int)(self::$cookie->id_lang), $tag, true));
		$result = Search::searchCod((int)(self::$cookie->id_lang), $tag, false, $this->p, $this->n, $this->orderBy, $this->orderWay);
		Module::hookExec('search', array('expr' => $tag, 'total' => sizeof($result)));
		'search_tag' => $tag,
		'products' => $result, 
		'search_products' => $result,
		'nbProducts' => $nbProducts,
		'homeSize' => Image::getSize('home')));



unde va trebui sa adaugi functia searchCod in classes/Search.php

functia searchCod asta va trebui sa interogheze in functia de cod_produs si cod_producator daca a fost selectat.

ultimul lucru este sa adaugi un link in meniu la searchComponenta.php

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...