Commit f9175a0ceec5e1f59153e83d28a6f634297f8500

Authored by Adrian
1 parent c30d152e

Creamos la función getProductByEan.

FuncionesImaxMultiEAN.php
... ... @@ -21,4 +21,16 @@ class FuncionesImaxMultiEAN {
21 21 $sql = 'DELETE FROM ' . _DB_PREFIX_ . $this->modulo->prefijo . "multiean WHERE id_product = '$productId' AND id_product_attribute = '$combinationId' AND ean13 = '$ean'";
22 22 return Db::getInstance()->execute($sql);
23 23 }
  24 +
  25 + public function getProductByEan($ean) {
  26 + if (!$ean) {
  27 + return false;
  28 + }
  29 + $ean = pSQL($ean);
  30 + $sql = 'SELECT * FROM `' . _DB_PREFIX_ . $this->modulo->prefijo . "multiean` WHERE `ean13` = '$ean'";
  31 + $resultado = Db::getInstance()->getRow($sql);
  32 +
  33 + return $resultado;
  34 + }
  35 +
24 36 }
... ...
config.xml
... ... @@ -2,7 +2,7 @@
2 2 <module>
3 3 <name>imaxmultiean</name>
4 4 <displayName><![CDATA[Gestor de EANs Múltiples]]></displayName>
5   - <version><![CDATA[1.2]]></version>
  5 + <version><![CDATA[1.3]]></version>
6 6 <description><![CDATA[Permite añadir y gestionar múltiples códigos EAN para cada producto y combinación.]]></description>
7 7 <author><![CDATA[Informax]]></author>
8 8 <tab><![CDATA[administration]]></tab>
... ...
imaxmultiean.php
... ... @@ -22,7 +22,7 @@ class ImaxMultiEAN extends Module {
22 22 $this->name = 'imaxmultiean';
23 23 $this->tab = 'administration';
24 24 $this->path = _PS_MODULE_DIR_ . $this->name . '/';
25   - $this->version = '1.2';
  25 + $this->version = '1.3';
26 26 $this->author = 'Informax';
27 27 $this->need_instance = 0;
28 28 $this->idManual = '';
... ...