diff --git a/FuncionesImaxMultiEAN.php b/FuncionesImaxMultiEAN.php index 38aa97d..b0d92c7 100644 --- a/FuncionesImaxMultiEAN.php +++ b/FuncionesImaxMultiEAN.php @@ -21,4 +21,16 @@ class FuncionesImaxMultiEAN { $sql = 'DELETE FROM ' . _DB_PREFIX_ . $this->modulo->prefijo . "multiean WHERE id_product = '$productId' AND id_product_attribute = '$combinationId' AND ean13 = '$ean'"; return Db::getInstance()->execute($sql); } + + public function getProductByEan($ean) { + if (!$ean) { + return false; + } + $ean = pSQL($ean); + $sql = 'SELECT * FROM `' . _DB_PREFIX_ . $this->modulo->prefijo . "multiean` WHERE `ean13` = '$ean'"; + $resultado = Db::getInstance()->getRow($sql); + + return $resultado; + } + } diff --git a/config.xml b/config.xml index a551b41..5253431 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ imaxmultiean - + diff --git a/imaxmultiean.php b/imaxmultiean.php index 0c58194..cda2954 100644 --- a/imaxmultiean.php +++ b/imaxmultiean.php @@ -22,7 +22,7 @@ class ImaxMultiEAN extends Module { $this->name = 'imaxmultiean'; $this->tab = 'administration'; $this->path = _PS_MODULE_DIR_ . $this->name . '/'; - $this->version = '1.2'; + $this->version = '1.3'; $this->author = 'Informax'; $this->need_instance = 0; $this->idManual = '';