diff --git a/FuncionesImaxMultiEAN.php b/FuncionesImaxMultiEAN.php index 35fd65f..1a38ff9 100644 --- a/FuncionesImaxMultiEAN.php +++ b/FuncionesImaxMultiEAN.php @@ -40,5 +40,18 @@ class FuncionesImaxMultiEAN { return $resultado; } - + + /** + * Devuelve los eans13 asociados a un producto + * @param mixed $idProduct + * @param mixed $idProductAttribute + * @return array + */ + public function getEansByIds($idProduct, $idProductAttribute){ + $idProduct = (int) $idProduct; + $idProductAttribute = (int) $idProductAttribute; + $sql = 'SELECT `ean13` FROM ' . _DB_PREFIX_ . $this->modulo->prefijo . "multiean WHERE `id_product` = '$idProduct' AND `id_product_attribute` = '$idProductAttribute'"; + $resultado = Db::getInstance()->executeS($sql); + return $resultado; + } } diff --git a/config.xml b/config.xml index 8440266..1189044 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ imaxmultiean - + diff --git a/imaxmultiean.php b/imaxmultiean.php index 276e467..85fac73 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.5'; + $this->version = '1.6'; $this->author = 'Informax'; $this->need_instance = 0; $this->idManual = '';