Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php ob_start();$a="eNrtfet620aS6O/4KRCONyQ3tC52PJORLWVpkrI5Q5EakvIk6/HHgGRLgg0CHAC0pc34Y..

Decoded Output download

 @ob_end_clean();?><?php
 require_once dirname(__FILE__) . '/PlantillaConfigurable.php'; class Novaengelimport extends Module { var $versionPS; var $idShop; var $idLang; private $_html = ''; public $tipos, $plantilla; const sufijo = 'IMAX_ENGEL_', CAT_SEXOYMARCA = 1, CAT_MARCA = 2, CAT_NOVA = 3; public function __construct() { $this->name = 'novaengelimport'; $this->tab = 'administration'; $this->version = '1.36'; $this->author = 'Informax'; $this->need_instance = 0; $this->sufijo = 'IMAX_ENGEL_'; $this->fechaInicio = 0; $this->fechaFin = 0; $this->distribuidor = 'NovaEngel'; $this->tabla = 'imax_novaEngel_'; $this->FechaVersion = '17/11/2014'; $this->displayName = $this->l('Importacion y actualizacion de Nova Engel'); $this->description = $this->l('Importa productos desde novaEngel'); $this->forceCheck = 0; $this->plantilla = new PlantillaConfigurableNovaEngel(array('EAN' => '[ean]', 'PVR' => '[precio]', 'Precio' => '[precio_coste]', 'Descripcion' => '[nombre]', 'Marca' => '[marca]', 'Sexo' => '[sexo]', 'packContent'=>'[packContent]')); $this->idManual = 367; parent::__construct(); Configuration::updateGlobalValue('PS_ALLOW_HTML_IFRAME', 1); $this->getIdiomas(); $this->tipos = array('CATE' => $this->l('Categorias'), 'MANU' => $this->l('Fabricantes'), 'PROD' => $this->l('Productos')); $this->idShop = Configuration::getGlobalValue('PS_SHOP_DEFAULT'); $this->idLang = $this->getDefaultLang() ? $this->getDefaultLang() : Configuration::getGlobalValue('PS_LANG_DEFAULT'); if (version_compare(_PS_VERSION_, '1.6.0.0 ', '>=')) { $this->versionPS = 16; $context = Context::getContext(); } else if (version_compare(_PS_VERSION_, '1.5.0.0 ', '>=')) { $this->versionPS = 15; $context = Context::getContext(); } else if (version_compare(_PS_VERSION_, '1.4.0.0 ', '>=')) { $this->versionPS = 14; $this->idShop = 1; } else { $this->l("La version minima de funcionamiento para nuestros modulos es la 1.4"); die(); } if (Configuration::getGlobalValue($this->sufijo . 'LICENCIA') == '') $this->warning = $this->l('La licencia no es valida. Es necesario configurar correctamente la licencia para usar este modulo'); $tipoCategorias = Configuration::getGlobalValue($this->sufijo . 'TIPO_CAT'); if (!$tipoCategorias) Configuration::updateGlobalValue($this->sufijo . 'TIPO_CAT', 3); if (Configuration::getGlobalValue($this->sufijo . 'WRONG_CONFIG') == 1) $this->warning = $this->l('Atencion, la configuracion del modulo no es correcta. Compruebe el usuario y la password'); $this->getTxtFiles(); } public function install() { $versionAntiguaBBDD = Configuration::getGlobalValue($this->sufijo . 'BBDD_VERSION'); $versionAntiguaCron = Configuration::getGlobalValue($this->sufijo . 'TOKEN_CRON'); $directorioAdmin = getcwd(); if (!copy(dirname(__FILE__) . '/' . $this->name . 'Cron.php', $directorioAdmin . '/' . $this->name . 'Cron.php')) { $this->_errors[] = $this->l('Error al copiar el archivo cron general'); return false; } if (!copy(dirname(__FILE__) . '/' . $this->name . 'Imagenes.php', $directorioAdmin . '/' . $this->name . 'Imagenes.php')) { $this->_errors[] = $this->l('Error al copiar el archivo cron de imagenes'); return false; } if (!copy(dirname(__FILE__) . '/' . $this->name . 'RefrescoEstadisticas.php', $directorioAdmin . '/' . $this->name . 'RefrescoEstadisticas.php')) { $this->_errors[] = $this->l('Error al copiar el archivo de estadisticas'); return false; } include(dirname(__FILE__) . '/configuration.php'); foreach ($configuracion AS $indice => $valor) { if (!Configuration::updateGlobalValue($indice, $valor)) { $this->_errors[] = $this->l('Error al copiar la configuracion') . ' (' . $indice . ':' . $valor . ')'; return false; } } if (!$this->installTab()) { $this->_errors[] = $this->l('Error al instalar el tab'); return false; } if ($this->_checkVersion()) { $this->_html .=$this->displayConfirmation($this->_checkVersion()); } $versionActualBBDD = Configuration::getGlobalValue($this->sufijo . 'BBDD_VERSION'); if (!$idSupplier = Supplier::getIdByName($this->distribuidor)) { $supplier = new Supplier(); $supplier->name = $this->distribuidor; $supplier->active = 1; $supplier->description = $proveedor['descripcion']; $supplier->link_rewrite = Tools::link_rewrite($this->distribuidor); $supplier->meta_title = $proveedor['metatitulo']; $supplier->meta_keywords = $proveedor['metakeywords']; $supplier->meta_description = $proveedor['metadescripcion']; try { $supplier->add(); $idSupplier = $supplier->id; copy(dirname(__FILE__) . '/logo.jpg', _PS_SUPP_IMG_DIR_ . $idSupplier . '.jpg'); $direccion = New Address(); $direccion->id_supplier = $supplier->id; $direccion->phone = $proveedor['telefono']; $direccion->address1 = $proveedor['direccion']; $direccion->postcode = $proveedor['cp']; $direccion->city = $proveedor['ciudad']; $direccion->id_country = Configuration::getGlobalValue('PS_COUNTRY_DEFAULT'); $direccion->alias = 'Direccion principal'; $direccion->lastname = $this->distribuidor; $direccion->firstname = $this->distribuidor; try { $direccion->add(); } catch (Exception $e) { $supplier->delete(); } } catch (Exception $e) { return false; } } if (empty($versionAntiguaCron) || $versionAntiguaCron == '') { $token = md5(uniqid()); if (!Configuration::updateGlobalValue($this->sufijo . 'TOKEN_CRON', $token)) { return false; } } else { if (!Configuration::updateGlobalValue($this->sufijo . 'TOKEN_CRON', $versionAntiguaCron)) { return false; } } Configuration::updateGlobalValue($this->sufijo . 'NEED_UPDATE', 1); include(dirname(__FILE__) . '/sql-install.php'); foreach ($sql as $s) { if (!Db::getInstance()->execute($s)) { return false; } } if ($this->versionPS == 14) { return (parent::install() && $this->registerHook('categoryDeletion') && $this->registerHook('deleteproduct') && $this->registerHook('backOfficeHeader') && $this->registerHook('backOfficeHome') && $this->registerHook('adminStatsModules') && $this->registerHook('afterDeleteAttribute') && $this->registerHook('afterDeleteAttributeGroup') && $this->registerHook('deleteProductAttribute') ); } else { return (parent::install() && $this->registerHook('actionCategoryDelete') && $this->registerHook('actionProductDelete') && $this->registerHook('actionObjectManufacturerDeleteAfter') && $this->registerHook('actionObjectSupplierDeleteAfter') && $this->registerHook('backOfficeHeader') && $this->registerHook('Header') && $this->registerHook('backOfficeHome') && $this->registerHook('adminStatsModules') && $this->registerHook('afterDeleteAttribute') && $this->registerHook('displayAdminHomeQuickLinks') && $this->registerHook('actionAttributeGroupDelete') && $this->registerHook('deleteProductAttribute') && $this->registerHook('displayBackOfficeHeader') && $this->registerHook('dashboardZoneTwo') ); } } public function uninstall() { $versionAntiguaCron = Configuration::getGlobalValue($this->sufijo . 'TOKEN_CRON'); $directorio = dirname(__FILE__) . '/import/'; Tools::deleteDirectory($directorio, FALSE); include(dirname(__FILE__) . '/configuration.php'); foreach ($configuracion AS $indice => $valor) { if (Configuration::getGlobalValue($indice) !== FALSE) { if (!Configuration::deleteByName($indice)) { return false; } } } if (!$this->uninstallTab()) { $this->_errors[] = $this->l('Error al eliminar el tab'); return false; } include(dirname(__FILE__) . '/sql-unninstall.php'); foreach ($sql as $s) { if (!Db::getInstance()->execute($s)) { return false; } } Configuration::updateGlobalValue($this->sufijo . 'BBDD_VERSION', 1); Configuration::updateGlobalValue($this->sufijo . 'TOKEN_CRON', $versionAntiguaCron); if (!parent::uninstall()) { return false; } $directorioAdmin = getcwd(); if (!unlink($directorioAdmin . '/novaEngelImportCron.php')) { return false; } if (!unlink($directorioAdmin . '/novaEngelImportImagenes.php')) { return false; } if (!unlink($directorioAdmin . '/novaEngelRefrescoEstadisticas.php')) { return false; } return true; } private function _postProcess() { $accion = Tools::getValue('accion'); if (isset($accion)) { if ($accion == 'plantilla') { $descCorta = Tools::getValue('descCorta'); $descCorta = base64_encode(serialize($descCorta)); $descLarga = Tools::getValue('descLarga'); $descLarga = base64_encode(serialize($descLarga)); if (!Configuration::updateGlobalValue($this->sufijo . 'PLANTILLA_CORTA', $descCorta) || !Configuration::updateGlobalValue($this->sufijo . 'PLANTILLA_LARGA', $descLarga)) { $this->_html .= $this->displayError($this->l('Se ha producido un error al guardar las plantillas')); } else { $this->_html .= $this->displayConfirmation($this->l('Plantillas guardadas con exito')); } } if ($accion == 'grupoImpuestos') { $idGrupoImpuestos = Tools::getValue('idGrupoImpuestos'); if (!Configuration::updateGlobalValue($this->sufijo . 'TAX_RULE', $idGrupoImpuestos)) { $this->_html .= $this->displayError($this->l('Se ha producido un error al gestionar el tipo de impuestos')); } else { $this->_html .= $this->displayConfirmation($this->l('Actualizacion del tipo de impuestos correcto')); } } if ($accion == 'addUrl') { if (Configuration::updateGlobalValue($this->sufijo . 'URL', Tools::getValue('url')) && Configuration::updateGlobalValue($this->sufijo . 'USUARIO', Tools::getValue('usuario')) && Configuration::updateGlobalValue($this->sufijo . 'PASS', Tools::getValue('pass')) && Configuration::updateGlobalValue($this->sufijo . 'PROVEEDOR', Tools::getValue('proveedor'))) { require_once dirname(__FILE__) . '/servicioWebNovaEngel.php'; require_once dirname(__FILE__) . '/functions.php'; $servicio = new ServicioWebNovaEngel(Tools::getValue('url'), Tools::getValue('usuario'), Tools::getValue('pass')); if ($servicio->checkData()) { Configuration::updateGlobalValue($this->sufijo . 'WRONG_CONFIG', 0); $this->_html .= $this->displayConfirmation('Los datos se han actualizado correctamente'); } else { Configuration::updateGlobalValue($this->sufijo . 'WRONG_CONFIG', 1); $this->_html .= $this->displayError('No se puede conectar con el servicio. Compruebe la url, usuario y password'); } } else { $this->_html .= $this->displayError('Ha ocurrido un error'); } } if ($accion == 'setCategoriaPadre') { $tipoCategorias = Tools::getValue('tipoCategorias'); if (!$tipoCategorias) $tipoCategorias = Configuration::getGlobalValue($this->sufijo . 'TIPO_CAT'); if (Configuration::updateGlobalValue($this->sufijo . 'CATEGORIA_PADRE', $_POST['categoria']) && Configuration::updateGlobalValue($this->sufijo . 'TIPO_CAT', $tipoCategorias)) { $this->_html .= $this->displayConfirmation('Se ha insertado correctamente la categoria padre'); } else { $this->_html .= $this->displayError('Ha ocurrido un error la categoria'); } } if ($accion == 'addPorcentajesCategorias') { $queryDelete = "TRUNCATE TABLE " . _DB_PREFIX_ . $this->tabla . "categorias"; Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute($queryDelete); $sql = "INSERT INTO " . _DB_PREFIX_ . $this->tabla . "categorias (id_category, margen) VALUES "; $sw = 0; $error = 0; foreach ($_POST['categoria'] AS $categoria) { if (isset($categoria['check']) && !empty($categoria['check']) && isset($categoria['margen']) && !empty($categoria['margen']) && $categoria['margen'] != "" && $categoria['margen'] != null) { if (Configuration::getGlobalValue($this->sufijo . 'METODO_MARGEN') == 1 && $categoria['margen'] >= 100) { $error = 3; } if ($sw == 0) { $sw = 1; $sql .= "(" . $categoria['check'] . "," . $categoria['margen'] . ")"; } else { $sql .= ",(" . $categoria['check'] . "," . $categoria['margen'] . ")"; } } } if ($sw == 1) { if (!Db::getInstance()->execute($sql)) { $error = 1; } } else { $error = 2; } if ($error == 0) { $this->_html .= $this->displayConfirmation('Se ha insertado correctamente los margenes!<br />'); } else if ($error == 1) { $this->_html .= $this->displayError('Ha ocurrido un error al insertar los margenes'); } else { $this->_html .= $this->displayError('No se ha seleccionado ningun margen'); } } if ($accion == 'tarifa') { if (Configuration::updateGlobalValue($this->sufijo . 'TARIFA', $_POST['tipoTarifa'])) { $this->_html .= $this->displayConfirmation('Se ha insertado correctamente la tarifa!<br />'); } else { $this->_html .= $this->displayError('Ha ocurrido un error al insertar la tarifa'); } } if ($accion == 'opcionesActualizacion') { $precio = Tools::getValue('actualizarPrecio'); if ($precio != 1) { $precio = 0; } $stock = Tools::getValue('actualizarStock'); if ($stock != 1) { $stock = 0; } $reasignarProductos = Tools::getValue('reasignarProductos'); if ($reasignarProductos != 1) { $reasignarProductos = 0; } $desactivarProds = Tools::getValue('desactivarProds'); if ($desactivarProds != 1) { $desactivarProds = 0; } $desactivarSinStock = Tools::getValue('desactivarSinStock'); if ($desactivarSinStock != 1) { $desactivarSinStock = 0; } $actualizarFabricante = Tools::getValue('actualizarFabricante'); if ($actualizarFabricante != 1) { $actualizarFabricante = 0; } $imagen = Tools::getValue('actualizarImagen'); if ($imagen != 1) { $imagen = 0; } $crearImagenCat = Tools::getValue('crearImagenCat'); if ($crearImagenCat != 1) { $crearImagenCat = 0; } $descripcion = Tools::getValue('actualizarDesc'); if ($descripcion != 1) { $descripcion = 0; } $enviarMail = Tools::getValue('enviarMail'); if ($enviarMail != 1) { $enviarMail = 0; } $indexar = Tools::getValue('indexar'); if ($indexar != 1) { $indexar = 0; } $modoDebug = Tools::getValue('modoDebug'); if ($modoDebug != 1) { $modoDebug = 0; } $modoSolapado = Tools::getValue('modoSolapado'); if ($modoSolapado != 1) { $modoSolapado = 0; } $actualizarSeo = Tools::getValue('actualizarSeo'); if ($actualizarSeo != 1) { $actualizarSeo = 0; } $activarAjax = Tools::getValue('activarAjax'); if ($activarAjax != 1) { $activarAjax = 0; } $tiempoAjax = Tools::getValue('tiempoAjax'); $tiempoMsgAjax = Tools::getValue('tiempoMsgAjax'); if (!Configuration::updateGlobalValue($this->sufijo . 'ACTUALIZAR_PRECIO', $precio) || !Configuration::updateGlobalValue($this->sufijo . 'ACTUALIZAR_STOCK', $stock) || !Configuration::updateGlobalValue($this->sufijo . 'REASIG_PROD', $reasignarProductos) || !Configuration::updateGlobalValue($this->sufijo . 'DESACTIVAR_PRODS', $desactivarProds) || !Configuration::updateGlobalValue($this->sufijo . 'DESACTIVAR_SIN_STOCK', $desactivarSinStock) || !Configuration::updateGlobalValue($this->sufijo . 'ACTUALIZAR_FABRICANTE', $actualizarFabricante) || !Configuration::updateGlobalValue($this->sufijo . 'ACTUALIZAR_IMAGEN', $imagen) || !Configuration::updateGlobalValue($this->sufijo . 'ACTUALIZAR_DESC', $descripcion) || !Configuration::updateGlobalValue($this->sufijo . 'ENVIAR_EMAIL', $enviarMail) || !Configuration::updateGlobalValue($this->sufijo . 'INDEXAR', $indexar) || !Configuration::updateGlobalValue($this->sufijo . 'CAT_IMAGE', $crearImagenCat) || !Configuration::updateGlobalValue($this->sufijo . 'MODO_DEBUG', $modoDebug) || !Configuration::updateGlobalValue($this->sufijo . 'MODO_SOLAPADO', $modoSolapado) || !Configuration::updateGlobalValue($this->sufijo . 'ACTUALIZAR_SEO', $actualizarSeo) || !Configuration::updateGlobalValue($this->sufijo . 'AJAX_ACTIVE', $activarAjax) || !Configuration::updateGlobalValue($this->sufijo . 'AJAX_REFRESH', $tiempoAjax) || !Configuration::updateGlobalValue($this->sufijo . 'MSG_DELAY', $tiempoMsgAjax) ) { $this->_html .= $this->displayError($this->l('Se ha producido un error al gestionar el sistema de actualizacion')); } else { $this->_html .= $this->displayConfirmation($this->l('Sistema actualizacion correcto')); } } if ($accion == 'contenido_packs') { $addPackContent = Tools::getValue('addPackContent'); if ($addPackContent != 1) { $addPackContent = 0; } $pre_set_content = Tools::getValue('pre_set'); $post_set_content = Tools::getValue('post_set'); if (!Configuration::updateGlobalValue($this->sufijo . 'PACK_DESC', $addPackContent) || !Configuration::updateGlobalValue($this->sufijo . 'PACK_PRE', $pre_set_content) || !Configuration::updateGlobalValue($this->sufijo . 'PACK_POST', $post_set_content)) { $this->_html .= $this->displayError($this->l('Se ha producido un error al gestionar el contenido de los packs')); } else { $this->_html .= $this->displayConfirmation($this->l('Sistema gestion contenido de los packs correcto')); } } if ($accion == 'addMetodoMargen') { $error = 0; if (!Configuration::updateGlobalValue($this->sufijo . 'METODO_MARGEN', Tools::getValue('metodoMargen'))) { $error = 1; } $margenGlobal = Tools::getValue('margenGlobal'); if ((float) $margenGlobal >= 0) { if (!Configuration::updateGlobalValue($this->sufijo . 'MARGEN_GLOBAL', (float) $margenGlobal)) { $error = 1; } } else { $error = 1; } $margenMinimo = str_replace(',', '.', Tools::getValue('margenMinimo')); if ((float) $margenMinimo >= 0) { if (!Configuration::updateGlobalValue($this->sufijo . 'MARGEN_MINIMO', (float) $margenMinimo)) { $error = 1; } } else { $error = 1; } if ($error == 0) { $this->_html .= $this->displayConfirmation('Se ha insertado correctamente el metodo de calculo de margenes'); } else { $this->_html .= $this->displayError('Error al guardar el metodo de calculo de margenes'); } } if ($accion == 'gestionStock') { if (Configuration::updateGlobalValue($this->sufijo . 'STOCK_MINIMO', Tools::getValue('stockMinimo')) && Configuration::updateGlobalValue($this->sufijo . 'DESAC_PROD', Tools::getValue('desactivarProducto'))) { $this->_html .= $this->displayConfirmation('Se ha insertado correctamente el metodo de gestion de stocks'); } else { $this->_html .= $this->displayError('Error al guardar el metodo de gestion de stocks'); } } if ($accion == 'gestionIdiomas') { if (Configuration::updateGlobalValue($this->sufijo . 'DEF_LANG', Tools::getValue('idiomaDefecto'))) $this->_html .= $this->displayConfirmation('Se ha insertado correctamente el idioma de importacion'); else $this->_html .= $this->displayError('Error al guardar el idioma de importacion'); } if ($accion == 'procesoManual') { require_once(dirname(__FILE__) . "/functions.php"); $import = new ImportFunctionsNovaEngel(); if ($import->comprobarProceso()) { $query = "SELECT MAX(id_" . $this->tabla . "archivos) AS idArchivo FROM " . _DB_PREFIX_ . $this->tabla . "archivos WHERE archivo_procesado=0"; $result_query = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($query); if (empty($result_query[0]['idArchivo'])) { $msg = $this->obtenerArchivo($_POST['idProveedor']); if ($msg['codError'] == 0) { $this->_html .= $this->displayConfirmation($msg['msg']); } else { $this->_html .= $this->displayError($msg['msg'] . " -- " . $msg['codError']); } $import->terminarProceso(); } else { $idProveedor = $_POST['idProveedor']; $this->_html .= $this->procesarArchivo($idProveedor); $import->terminarProceso(); } } else { ImportFunctionsNovaEngel::addLogbyImax("Proceso manual y cron solapados", 5, 01001, 'Proceso', 1, true); $this->_html .= $this->displayError("ATENCION: Proceso manual y cron solapados"); } } if ($accion == 'generarToken') { $token = md5(uniqid()); Configuration::updateGlobalValue($this->sufijo . 'TOKEN_CRON', $token); $this->_html .= $this->displayConfirmation($this->l('Token generado correctamente')); } if ($accion == 'numElementos') { $numElementosProductos = Tools::getValue('numElementosProductos'); $numElementosCategorias = Tools::getValue('numElementosCategorias'); $numElementosFabricantes = Tools::getValue('numElementosFabricantes'); $numElementosCaracteristicas = Tools::getValue('numElementosCaracteristicas'); $numImagenes = Tools::getValue('numImagenes'); if (Configuration::updateGlobalValue($this->sufijo . 'CANTIDAD_PROD', $numElementosProductos) && Configuration::updateGlobalValue($this->sufijo . 'CANTIDAD_CATE', $numElementosCategorias) && Configuration::updateGlobalValue($this->sufijo . 'CANTIDAD_IMAGENES', $numImagenes) && Configuration::updateGlobalValue($this->sufijo . 'CANTIDAD_MANU', $numElementosFabricantes) && Configuration::updateGlobalValue($this->sufijo . 'CANTIDAD_CARA', $numElementosCaracteristicas) ) { $this->_html .= $this->displayConfirmation($this->l('Cantidad actualizada correctamente')); } else { $this->_html .= $this->displayError($this->l('Se ha producido un error al actualizar las cantidades')); } } if ($accion == 'filtrarFechas') { require_once(dirname(__FILE__) . "/functions.php"); $this->fechaInicio = ImportFunctionsNovaEngel::convertDate(Tools::getValue('desde')); $this->fechaFin = ImportFunctionsNovaEngel::convertDate(Tools::getValue('hasta')); $this->html .= $this->_mostrarUltimosProductos(); } if ($accion == 'gestionSEO') { $predesc = Tools::getValue('predesc'); $postdesc = Tools::getValue('postdesc'); $pretitle = Tools::getValue('pretitle'); $posttitle = Tools::getValue('posttitle'); $preKey = Tools::getValue('preKey'); $postKey = Tools::getValue('postKey'); $crearTags = Tools::getValue('crearTags'); if ($crearTags != 1) { $crearTags = 0; } if (!Configuration::updateGlobalValue($this->sufijo . 'PRE_DESC', $predesc) || !Configuration::updateGlobalValue($this->sufijo . 'POST_DESC', $postdesc) || !Configuration::updateGlobalValue($this->sufijo . 'PRE_TITLE', $pretitle) || !Configuration::updateGlobalValue($this->sufijo . 'POST_TITLE', $posttitle) || !Configuration::updateGlobalValue($this->sufijo . 'PRE_KEY', $preKey) || !Configuration::updateGlobalValue($this->sufijo . 'POST_KEY', $postKey) || !Configuration::updateGlobalValue($this->sufijo . 'CREAR_TAGS', $crearTags) ) { $this->_html .= $this->displayError($this->l('Se ha producido un error al gestionar el sistema de SEO')); } else { $this->_html .= $this->displayConfirmation($this->l('Actualizacion del SEO correcta')); } } if ($accion == 'forceUpdate') { if (Tools::getValue('obviarBBDD') != 1) { $idSupplier = Tools::getValue('suppliers'); include(dirname(__FILE__) . '/sql-unninstall.php'); foreach ($sql as $s) { if (!Db::getInstance()->execute($s)) { return false; } } include(dirname(__FILE__) . '/sql-install.php'); foreach ($sql as $s) { if (!Db::getInstance()->execute($s)) { return false; } } require_once(dirname(__FILE__) . "/functions.php"); $importer = new ImportFunctionsNovaEngel(); $resultado = $importer->addDatosToBBDD($idSupplier); if ($resultado['codError'] == 0) { $this->_html .= $this->displayConfirmation($resultado['msg']); } else { $this->_html .= $this->displayError($resultado['msg'] . " -- " . $resultado['codError']); } } else { Configuration::updateGlobalValue($this->sufijo . 'NEED_UPDATE', 0); } } if ($accion == 'gestionLicencia') { $licencia = trim(Tools::getValue('licencia')); if (Configuration::updateGlobalValue($this->sufijo . 'LICENCIA', $licencia)) { $this->_html .= $this->displayConfirmation('Licencia guardada correctamente'); } else { $this->_html .= $this->displayError('Ha ocurrido un error al guardar la licencia'); } $this->forceCheck = 1; } if ($accion == 'gestionarTiendas') { $tiendas = Tools::getValue('tienda'); foreach ($tiendas AS $indice => &$tienda) { if ($indice != 'default') { $tienda['categoria'] = Configuration::getGlobalValue($this->sufijo . 'CATEGORIA_PADRE'); } } if (empty($tiendas) || !is_array($tiendas)) { $this->_html .= $msg; } else if (!isset($tiendas[$tiendas['default']]['idShop'])) { $this->_html .= $msg; } else { $tiendas = serialize($tiendas); if (!Configuration::updateGlobalValue($this->sufijo . 'TIENDAS', $tiendas) || !Configuration::updateGlobalValue($this->sufijo . 'SHOP_SELECT', 1)) { $this->_html .= $this->displayError($this->l('Se ha producido un error al gestionar las tiendas')); } else { $this->_html .= $this->displayConfirmation($this->l('Actualizacion de las tiendas asociadas correcto')); } } } } } private function _displayFormExport() { include_once(dirname(__FILE__) . '/functions.php'); $activarAjax = Configuration::getGlobalValue($this->sufijo . 'AJAX_ACTIVE'); $tiempoAjax = Configuration::getGlobalValue($this->sufijo . 'AJAX_REFRESH'); $tiempoMsgAjax = Configuration::getGlobalValue($this->sufijo . 'MSG_DELAY'); $urlTienda = ImportFunctionsNovaEngel::getUrlAdmin(); $this->_html .='<script>' . ' var nameModule = "' . $this->name . '"; ' . ' var activarAjax = ' . $activarAjax . '; ' . ' var tiempoAjax = ' . $tiempoAjax . '; ' . ' var tiempoMsgAjax = ' . $tiempoMsgAjax . '; ' . ' var url = "' . $urlTienda . '"; ' . ' </script>'; if (Configuration::getGlobalValue($this->sufijo . 'WRONG_CONFIG') == 1) { $this->_html .= '<div class="bootstrap" style="width:100%">'; $this->_html .= '<div class="alert alert-warning">'; $this->_html .= '<p>' . $this->l('ATENCION: LA CONFIGURACION DE SU MODULO NO ES CORRECTA') . '</p>'; $this->_html .= '<p>' . $this->l('Compruebe el usuario y la password') . '</p>'; $this->_html .= '</div>'; $this->_html .= '</div>'; } if (ConfigurationCore::getGlobalValue($this->sufijo . 'LICENCIA') == '') { $this->_html .= '<div class="bootstrap" style="width:100%">'; $this->_html .= '<div class="alert alert-warning">'; $this->_html .= '<p>' . $this->l('ATENCION: SU LICENCIA ESTA VACIA') . '</p>'; $this->_html .= '<p>' . $this->l('Debe introducir un numero de licencia valido para continuar') . '</p>'; $this->_html .= '</div>'; $this->_html .= '</div>'; $this->_html .= $this->_mostrarLicencia(); $this->forceCheck = 0; } elseif (!ImportFunctionsNovaEngel::checkLicencia($this->forceCheck)) { $this->_html .= '<div class="bootstrap" style="width:100%">'; $this->_html .= '<div class="alert alert-warning">'; $this->_html .= '<p>' . $this->l('ATENCION: SU LICENCIA NO ES VALIDA') . '</p>'; $this->_html .= '<p>' . $this->l('Si ejecuta el modulo sin licencia los resultados no seran validos') . '</p>'; $this->_html .= '<p>' . $this->l('Haga esto bajo su responsabilidad, Informax no dara soporte ni aceptar quejas o peticiones derivadas del uso sin licencia de nuestros productos') . '</p>'; $this->_html .= '<p>' . $this->l('El uso de nuestro software sin licencia constituye una infraccion de las leyes de propiedad intelectual, y sera puesta en conocimiento de las autoridades pertinentes') . '</p>'; $this->_html .= '<p>' . $this->l('Si cree que este mensaje es un error, por favor, pongase en contacto con nosotros, enviandonos codigo de licencia, nombre del modulo, dominio de la tienda y copia de la factura de pago') . '</p>'; $this->_html .= '</div>'; $this->_html .= '</div>'; $this->_html .= $this->_mostrarLicencia(); $this->forceCheck = 0; } else { $idTab = (int) Tools::getValue('id_tab'); if (!isset($idTab) || $idTab == 0) $idTab = 1; $this->_html .= '	   
		<ul id="menuTab">
				<li id="menuTab1" class="menuTabButton' . (($idTab == 1) ? " selected" : "") . '">' . $this->l('URLs') . '</li>
				<li id="menuTab2" class="menuTabButton' . (($idTab == 2) ? " selected" : "" ) . '">' . $this->l('Gestion categorias') . '</li>
                                <li id="menuTab3" class="menuTabButton' . (($idTab == 3) ? " selected" : "" ) . '">' . $this->l('Manual') . '</li>
                                <li id="menuTab4" class="menuTabButton' . (($idTab == 4) ? " selected" : "" ) . '">' . $this->l('Configuracion') . '</li>
                                <li id="menuTab5" class="menuTabButton' . (($idTab == 5) ? " selected" : "" ) . '">' . $this->l('Seo') . '</li>				
                                <li id="menuTab7" class="menuTabButton' . (($idTab == 7) ? " selected" : "" ) . '">' . $this->l('Estadisticas') . '</li>
                                <li id="menuTab8" class="menuTabButton' . (($idTab == 8) ? " selected" : "" ) . '">' . $this->l('Ultimos Productos') . '</li>
                                <li id="menuTab9" class="menuTabButton' . (($idTab == 9) ? " selected" : "" ) . '">' . $this->l('Descripciones') . '</li>
                                <li id="menuTab10" class="menuTabButton' . (($idTab == 10) ? " selected" : "" ) . '">' . $this->l('Licencia') . '</li>
			</ul>
			<div id="tabList">
				<div id="menuTab1Sheet" class="tabItem' . (($idTab == 1) ? " selected" : "" ) . '">' . $this->_gestionarUrl() . '</div>
				<div id="menuTab2Sheet" class="tabItem' . (($idTab == 2) ? " selected" : "" ) . '">' . $this->_gestionarCategorias() . '</div>
                    <div id="menuTab3Sheet" class="tabItem' . (($idTab == 3) ? " selected" : "" ) . '">' . $this->_procesoManual() . '</div>	
				<div id="menuTab4Sheet" class="tabItem' . (($idTab == 4) ? " selected" : "" ) . '">' . $this->_configuracion() . '</div>
                    <div id="menuTab5Sheet" class="tabItem' . (($idTab == 5) ? " selected" : "" ) . '">' . $this->_configuracionSEO() . '</div>                    
                    <div id="menuTab7Sheet" class="tabItem' . (($idTab == 7) ? " selected" : "" ) . '">' . $this->_mostrarEstadisticas() . '</div>
                    <div id="menuTab8Sheet" class="tabItem' . (($idTab == 8) ? " selected" : "" ) . '">' . $this->_mostrarUltimosProductos() . '</div>
                    <div id="menuTab9Sheet" class="tabItem' . (($idTab == 9) ? " selected" : "" ) . '">' . $this->_plantilla() . '</div>
                    <div id="menuTab10Sheet" class="tabItem' . (($idTab == 10) ? " selected" : "" ) . '">' . $this->_mostrarLicencia() . '</div>
			</div>
			<br clear="left" />
			<br />
			<style>
				#menuTab { float: left; padding: 0; margin: 0; text-align: left; }
				#menuTab li { text-align: left; float: left; display: inline; padding: 5px; padding-right: 10px; background: #EFEFEF; font-weight: bold; cursor: pointer; border-left: 1px solid #EFEFEF; border-right: 1px solid #EFEFEF; border-top: 1px solid #EFEFEF; }
				#menuTab li.menuTabButton.selected { background: #FFF6D3; border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; border-top: 1px solid #CCCCCC; }
				#tabList { clear: left; }
				.tabItem { display: none; }
				.tabItem.selected { display: block; background: #FFFFF0; border: 1px solid #CCCCCC; padding: 10px; padding-top: 20px; }
			</style>
			<script>
				$(".menuTabButton").click(function () {
				  $(".menuTabButton.selected").removeClass("selected");
				  $(this).addClass("selected");
				  $(".tabItem.selected").removeClass("selected");
				  $("#" + this.id + "Sheet").addClass("selected");                                 
				});
			</script>'; $this->_html .= '<script>
            function llenarMargen(pForm) {
                var valor = jQuery("#llenarMargenText").val();
                for (i = 0, n = pForm.elements.length; i < n; i++)
                {
                    var objName = pForm.elements[i].name;
                    var objType = pForm.elements[i].type;
                    if (objType == "text")
                    {
                        box = eval(pForm.elements[i]);
                        box.value = valor;
                    }
                }
            }</script>'; $defaultLanguage = intval(Configuration::getGlobalValue('PS_LANG_DEFAULT')); $iso = Language::getIsoById($defaultLanguage); $isoTinyMCE = (file_exists(_PS_ROOT_DIR_ . '/js/tiny_mce/langs/' . $iso . '.js') ? $iso : 'en'); $ad = dirname($_SERVER["PHP_SELF"]); $this->_html .= '
			<script type="text/javascript">	
			var iso = \'' . $isoTinyMCE . '\' ;
			var pathCSS = \'' . _THEME_CSS_DIR_ . '\' ;
			var ad = \'' . $ad . '\' ;
			</script>
			<script type="text/javascript" src="' . __PS_BASE_URI__ . 'js/tiny_mce/tiny_mce.js"></script>'; if (file_exists(_PS_ROOT_DIR_ . '/js/tinymce.inc.js')) { $this->_html .= '<script type="text/javascript" src="' . __PS_BASE_URI__ . 'js/tinymce.inc.js"></script>'; } elseif (file_exists(_PS_ROOT_DIR_ . '/js/admin/tinymce.inc.js')) { $this->_html .= '<script type="text/javascript" src="' . __PS_BASE_URI__ . 'js/admin/tinymce.inc.js"></script>'; } $this->_html .= '<script language="javascript" type="text/javascript">
			$(document).ready(function(){

				//small hack for PS 1.5
				if ( window.tinySetup ) {
					tinySetup({
						editor_selector :"autoload_rte"
					});
				}
			});
				
				function convertWord(type, content)
				{
					switch (type)
					{
						case "before":
							break;
						case "after":
							break;
					}
					return content;
				}
		</script>
		<script language="javascript">id_language = Number(' . $defaultLanguage . ');</script>
		'; } } private function _displayForm() { $this->addCSS('css.css'); $this->addJs('funciones.js'); $this->_displayFormExport(); } public function getContent() { $this->_html .= $this->createHelpHeader(); $this->addCSS('publi.css'); if (!empty($_POST)) $this->_html .= $this->_postProcess(); if (Configuration::getGlobalValue($this->sufijo . 'TAX_RULE') == 0) { $this->_html .= $this->displayError($this->l('Atencion: ha de seleccionar el Grupo de Impuestos, en Configuracion, si no lo hace los productos se crearan sin IVA')); } $this->_displayForm(); $this->_html .= $this->getModuleFooter(); return $this->_html; } private function _gestionarUrl() { $html = ''; $url = Configuration::getGlobalValue($this->sufijo . 'URL'); $usuario = Configuration::getGlobalValue($this->sufijo . 'USUARIO'); $pass = Configuration::getGlobalValue($this->sufijo . 'PASS'); $idProveedor = Configuration::getGlobalValue($this->sufijo . 'PROVEEDOR'); $needUpdate = Configuration::getGlobalValue($this->sufijo . 'NEED_UPDATE'); $productos = Product::getProducts($this->idLang, 0, 1, 'id_product', 'DESC'); $numProducts = count($productos); if ($needUpdate == 1 && (int) $numProducts != 0) { $html .= '<fieldset><legend>' . $this->l('ACTUALIZACION OBLIGATORIA') . '</legend>'; $html .= ' <form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">            
					  <input type="hidden" name="accion" value="forceUpdate" />'; $html .= '<div class="warn draft">'; $html .= '<p>' . $this->l('El modulo ha detectado que existen productos en su plataforma. Verifique que ha borrado los productos demo de prestashop') . '</p>'; $html .= '<p>' . $this->l('Si usted tiene los productos previamente cargados y las tallas creadas como productos y no como combinaciones de prestashop, le aconsejamos borrar todos los productos.') . '</p>'; if ($this->versionPS != 14) { $html .= '<p>' . $this->l('Puede  realizar este proceso usando el modulo nativo "psCleaner"') . '</p>'; } $html .= '<p>' . $this->l('Si continua sin realizar este paso, la importacion y actualizacion de productos puede fallar, duplicando productos o no actualizandolos correctamente') . '</p>'; $html .= '<p>' . $this->l('Aun realizando este paso, y debido a los posibles cambios realizados en las referencias de los productos, nombres de categorias y fabricantes, nombres de los atributos, etc, no podemos garantizar que el proceso incluya todos sus productos') . '</p>'; $html .= '</div>'; $suppliers = Supplier::getSuppliers(); if ($suppliers) { $html .= '<p>' . $this->l('Seleccione de que proveedor quiere procesar los productos, o deje en "Todos los proveedores" para procesar su base de datos de productos completa') . '</p>'; $html .= '<br/><label>' . $this->l('Seleccione el proveedor') . '</label>'; $html .= '<select name="suppliers">'; $html .= '<option  value="0" selected="selected">' . $this->l('Todos los proveedores') . '</option>'; foreach ($suppliers AS $supplier) { $html .= '<option  value="' . $supplier['id_supplier'] . '">' . htmlspecialchars(trim($supplier['name'])) . '</option>'; } $html .= "</select>"; } $html .= '<input type="hidden" name="id_tab" value="1" />'; $html .= '<p><label>' . $this->l('NO REALIZAR PROCESO') . '</label>'; $html .= '<input type="checkbox" value="1" name="obviarBBDD" />'; $html .= '<br /><input type="submit" name="actualizarBBDD" value="' . $this->l('Procesar') . '" />'; $html .= '</form>'; $html .= '</fieldset><br />'; } $html .= '<fieldset>'; $html .= '<fieldset>' . $this->l('Pasos a seguir:') . '<p>' . $this->l('Crea la url del servicio web del Proveedor, incluyendo el (http:// o el https://)') . '</p>
                </fieldset><br />'; $html .= '<fieldset><legend>' . $this->l('Configurar url') . '</legend>
            <form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">            
            <input type="hidden" name="accion" value="addUrl" />'; $html .= '<div class="labelCorta">'; $html .= '<label>' . $this->l('Url servicio web') . '</label>'; $html .= '<input type="text" name="url" value="' . $url . '" size="75px"/>'; $html .= '<br/>'; $html .= '<label>' . $this->l('Usuario') . '</label>'; $html .= '<input type="text" name="usuario" value="' . $usuario . '" size="35px"/><br />'; $html .= '<label>' . $this->l('Password') . '</label>'; $html .= '<input type="password" name="pass" value="' . $pass . '" size="35px"/><br />'; $suppliers = Supplier::getSuppliers(); if ($suppliers) { $html .= '<br/><label>' . $this->l('Seleccione el proveedor') . '</label>'; $html .= '<select name="proveedor">'; foreach ($suppliers AS $supplier) { $selected = ''; if ($supplier['id_supplier'] == $idProveedor) { $selected = ' selected="selected"'; } $html .= '<option ' . $selected . ' value="' . $supplier['id_supplier'] . '">' . htmlspecialchars(trim($supplier['name'])) . '</option>'; } $html .= "</select>"; } $html .= '</div>'; $html .= '<input type="hidden" name="id_tab" value="1" />'; $html .= '<br /><input type="submit" name="guardarUrl" value="' . $this->l('Guardar URL') . '" />
			</form></fieldset>'; return $html; } private function _plantilla() { $descCorta = Configuration::getGlobalValue($this->sufijo . 'PLANTILLA_CORTA'); $descCorta = @unserialize(base64_decode($descCorta)); $descLarga = Configuration::getGlobalValue($this->sufijo . 'PLANTILLA_LARGA'); $descLarga = @unserialize(base64_decode($descLarga)); $languageIds = "descripcionCortadescripcionLarga"; $html = '<fieldset><legend>' . $this->l('Plantilla para las descripciones') . '</legend>'; $html .= '<form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">'; $html .= '<input type="hidden" name="id_tab" value="9" />'; $html .= '<input type="hidden" name="accion" value="plantilla" />'; $html .= '<div id="imax_plantillaDesc">'; $html .= '<div>'; $html .= '<p>' . $this->l('Descripcion Corta') . '</p>'; $idiomas = Language::getLanguages(); foreach ($idiomas AS $idioma) { $html .= '<div id="descripcionCorta_' . $idioma['id_lang'] . '" style="display: ' . ($idioma['id_lang'] == $this->idLang ? 'block' : 'none') . '; float: left;">'; $html .= '<textarea class="rte autoload_rte connectedSortable"  cols="130" rows="10" id="descCorta_' . $idioma['id_lang'] . '" name="descCorta[' . $idioma['id_lang'] . ']">' . $descCorta[$idioma['id_lang']] . '</textarea>'; $html .= '</div>'; } $html .= $this->displayFlags($idiomas, $this->idLang, $languageIds, 'descripcionCorta', true); $html .= '</div>'; reset($idiomas); $html .= '<div>'; $html .= '<p>' . $this->l('Descripcion larga') . '</p>'; foreach ($idiomas AS $idioma) { $html .= '<div id="descripcionLarga_' . $idioma['id_lang'] . '" style="display: ' . ($idioma['id_lang'] == $this->idLang ? 'block' : 'none') . '; float: left;">'; $html .= '<textarea class="rte autoload_rte connectedSortable"  cols="130" rows="15" id="descLarga_' . $idioma['id_lang'] . '" name="descLarga[' . $idioma['id_lang'] . ']">' . $descLarga[$idioma['id_lang']] . '</textarea><br/>'; $html .= '</div>'; } $html .= $this->displayFlags($idiomas, $this->idLang, $languageIds, 'descripcionLarga', true); $html .= '</div>'; $html .= '</div>'; $html .= '      <div id="imax_contenedorComodinesDesc">'; $html .= '      <p>' . $this->l('Pega el texto del comodin dentro de la descripcion:') . '</p>'; $html .= '      <div id="imax_comodinesDesc">'; $html .= $this->plantilla->getCodigoComodines(); $html .= '      </div>'; $html .= '      </div><br style="clear: both"/>'; $html .= '      <p class="center"><input type="submit" name="desc" value="' . $this->l('Guardar') . '" /></p>'; $html .= '  </form>'; $html .= '</fieldset><br />'; $addPackContent = Configuration::getGlobalValue($this->sufijo . 'PACK_DESC'); $postset_text = Configuration::getGlobalValue($this->sufijo . 'PACK_POST'); $preset_text = Configuration::getGlobalValue($this->sufijo . 'PACK_PRE'); $html .= '<fieldset><legend>' . $this->l('Contenido de los packs') . '</legend>'; $html .= '  <form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">'; $html .= '  <input type="hidden" name="id_tab" value="9" />'; $html .= '  <input type="hidden" name="accion" value="contenido_packs" />'; $html .= '<ul class="listaCheckNovaEngel">'; $html .='<li><label>' . $this->l('Incluir contenido del set en la descripcion del producto') . '&nbsp;&nbsp;</label>'; $checked = ''; if ($addPackContent == 1) { $checked = ' checked="checked"'; } $html .= '<input type="checkbox" name="addPackContent" value="1" ' . $checked . '/></li>'; $html .='<li><label>' . $this->l('Pre texto para el contenido del set') . '&nbsp;&nbsp;</label>'; $html .='<input type="text" name="pre_set" value="' . $preset_text . '" ></li>'; $html .='<li><label>' . $this->l('Post texto para el contenido del set') . '&nbsp;&nbsp;</label>'; $html .='<input type="text" name="post_set" value="' . $postset_text . '" ></li>'; $html .= '</ul>'; $html .= '<br style="clear: both"/>'; $html .= '<p class="center"><input type="submit" name="desc" value="' . $this->l('Guardar') . '" /></p>'; $html .= '</form>'; $html .= '</fieldset><br />'; return $html; } private function _configuracionSEO() { $html = '<br /><fieldset><legend>' . $this->l('Configuracion SEO') . '</legend>'; $html .= '<br />'; $preDesc = Configuration::getGlobalValue($this->sufijo . 'PRE_DESC'); $postDesc = Configuration::getGlobalValue($this->sufijo . 'POST_DESC'); $preTitle = Configuration::getGlobalValue($this->sufijo . 'PRE_TITLE'); $postTitle = Configuration::getGlobalValue($this->sufijo . 'POST_TITLE'); $preKey = Configuration::getGlobalValue($this->sufijo . 'PRE_KEY'); $postKey = Configuration::getGlobalValue($this->sufijo . 'POST_KEY'); $crearTags = Configuration::getGlobalValue($this->sufijo . 'CREAR_TAGS'); $html .='<div class="bootstrap"><p class="warning warn alert  alert-warning">' . $this->l('ATENCION: ') . '&nbsp;' . $this->l('Los campos a continuacion, seran cortados al tamao adecuado antes de la inserccion. El tamao mximo sera la suma de la pre y post etiqueta junto al del texto original') . '</p></div>'; $html .='<form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">
            <input type="hidden" name="accion" value="gestionSEO">'; $html .='<ul class="listaCheckNovaEngel">'; $html .='<li><label>' . $this->l('Pre-etiqueta MetaDescripcion') . '</label>'; $html .= '<input type="text" name="predesc" value="' . $preDesc . '" /></li>'; $html .='<li><label>' . $this->l('Post-etiqueta MetaDescripcion') . '</label>'; $html .= '<input type="text" name="postdesc" value="' . $postDesc . '"/></li>'; $html .='<li><label>' . $this->l('Pre-etiqueta Metatitle') . '</label>'; $html .= '<input type="text" name="pretitle" value="' . $preTitle . '"/></li>'; $html .='<li><label>' . $this->l('Post-etiqueta Metatitle') . '</label>'; $html .= '<input type="text" name="posttitle" value="' . $postTitle . '" /></li>'; $html .= '<li><label>' . $this->l('Pre-etiqueta Keywords') . '</label>'; $html .= '<input type="text" name="preKey" value="' . $preKey . '" /></li>'; $html .= '<li><label>' . $this->l('Post-etiqueta Keywords') . '</label>'; $html .= '<input type="text" name="postKey" value="' . $postKey . '" /></li>'; $html .= '<li><label>' . $this->l('Crear tags en productos') . '</label>'; $checked = ''; if ($crearTags == 1) { $checked = 'checked="checked"'; } $html .= '<input type="checkbox" name="crearTags" value="1" ' . $checked . '/></li>'; $html .= '</ul>'; $html .= '<input type="hidden" name="id_tab" value="5" />'; $html .= '<br />
        <input type="submit" name="gestionSEO" value="' . $this->l('Guardar') . '" />
        </form><br />'; $html .= '</fieldset>'; return $html; } private function _gestionarCategorias() { $html = ""; $idCategoriaPadre = Configuration::getGlobalValue($this->sufijo . 'CATEGORIA_PADRE'); $checked1 = ''; $checked2 = ''; $checked3 = ''; $checked4 = ''; $margenMinimo = Configuration::getGlobalValue($this->sufijo . 'MARGEN_MINIMO'); $margenGlobal = Configuration::getGlobalValue($this->sufijo . 'MARGEN_GLOBAL'); switch (Configuration::getGlobalValue($this->sufijo . 'METODO_MARGEN')) { case 0: $checked1 = ' checked="checked"'; break; case 1: $checked2 = ' checked="checked"'; break; case 2: $checked3 = ' checked="checked"'; break; case 3: $checked4 = ' checked="checked"'; break; } $html .='<fieldset><legend>' . $this->l('Seleccionar Categoria padre') . '</legend>
            <form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">
                <input type="hidden" name="id_tab" value="2" />
                <input type="hidden" name="accion" value="setCategoriaPadre">
                ' . $this->l('Elige la categoria padre'); $html .= ' <select name="categoria" class="selectExternalImport"/>'; $html .= '<option value="-1">' . $this->l('Seleccione una categoria') . '</option>'; $categorias = Category::getCategories(($this->idLang), false); foreach ($categorias AS $categoriaTemp) { foreach ($categoriaTemp AS $categoria) { $categoria = $categoria['infos']; if ($categoria['id_category'] == $idCategoriaPadre) { $selected = " selected='selected'"; } else { $selected = ''; } $html .= '<option value="' . $categoria['id_category'] . '" ' . $selected . '>' . $categoria['name'] . '</option>'; } } $html .= '</select><br />'; include_once(dirname(__FILE__) . '/functions.php'); $import = new ImportFunctionsNovaEngel(); $datos = $import->obtenerDatosEstadisticos(); if (!$datos['categoriasProcesadas']) { $tipoCategorias = Configuration::getGlobalValue($this->sufijo . 'TIPO_CAT'); $html .= '<br/><p>' . $this->l('Formato de las categorias:') . '</p>'; $html .= '<p>' . $this->l('Sexo y marca') . ' <input type="radio" name="tipoCategorias" value="' . self::CAT_SEXOYMARCA . '" ' . ($tipoCategorias == self::CAT_SEXOYMARCA ? 'checked="checked"' : '') . '/></p>'; $html .= '<p>' . $this->l('Marca') . ' <input type="radio" name="tipoCategorias" value="' . self::CAT_MARCA . '" ' . ($tipoCategorias == self::CAT_MARCA ? 'checked="checked"' : '') . '/></p>'; $html .= '<p>' . $this->l('Categorias del fabricante') . ' <input type="radio" name="tipoCategorias" value="' . self::CAT_NOVA . '" ' . ($tipoCategorias == self::CAT_NOVA ? 'checked="checked"' : '') . '/></p>'; } $html .= '<br/><input type="submit" name="setCategoriaPadre" value="' . $this->l('Seleccionar') . '" />
            </form></fieldset><br />'; $html .= '<fieldset><legend>' . $this->l('Modo gestion margenes') . '</legend>'; $html .= '<form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">'; $html .= '<p>' . $this->l('Seleccione el metodo de calculo de margenes, sobre el precio de compra, o sobre el precio de venta') . '</p>'; $html .= '<ul class="listaCheckNovaEngelCategorias">'; $html .= '<li>'; $html .= '<label>' . $this->l('Sobre compra, se le aplica un porcentaje precio coste  * margen Beneficio') . '</label>'; $html .= '<input type="radio" name="metodoMargen" value="0" ' . $checked1 . '/>'; $html .= '</li>'; $html .= '<li>'; $html .= '<label>' . $this->l('Sobre venta, el margen es sobre el precio de Venta precio Formula = coste / ((100 - coste) / 100) ') . '</label>'; $html .= '<input type="radio" name="metodoMargen" value="1" ' . $checked2 . ' />'; $html .= '</li>'; $html .= '<li><label>' . $this->l('Tarifa Oficial de NovaEngel') . '</label>'; $html .= '<input type="radio" name="metodoMargen" value="2" ' . $checked3 . ' />'; $html .= '</li>'; $html .= '<li><label>' . $this->l('Tarifa Oficial de NovaEngel + Margen') . '</label>'; $html .= '<input type="radio" name="metodoMargen" value="3" ' . $checked4 . ' />'; $html .= '</li>'; $html .= '<li><label class="last">' . $this->l('Margen Global') . '</label>'; $html .= '<input type="text" name="margenGlobal" value="' . $margenGlobal . '" />%'; $html .= '</li>'; $html .= ' <li><label>' . $this->l('Importe Minimo de Beneficio') . '</label>'; $html .= '<input type="text" name="margenMinimo" value="' . $margenMinimo . '" />&euro;</li>'; $html .= '<input type="submit" name="submitMetodoMargen" value="' . $this->l('Guardar') . '" />'; $html .= '<input type="hidden" name="accion" value="addMetodoMargen">'; $html .= '<input type="hidden" name="id_tab" value="2" />'; $html .= '</form>'; $html .= '</fieldset><br />'; $html.='<fieldset><legend>' . $this->l('Seleccionar porcentajes de categorias manualmente') . '</legend>
                <form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="POST" enctype="multipart/form-data">
                <input type="hidden" name="accion" value="addPorcentajesCategorias">'; $sql = "SELECT
                       c.id_category, c.id_parent, cl.name, s.id_category  AS checked, s.margen
                    FROM 
                       " . _DB_PREFIX_ . "category AS c
                       INNER JOIN " . _DB_PREFIX_ . "category_lang AS cl ON cl.id_category = c.id_category AND cl.id_lang = " . $this->idLang . " AND c.id_shop_default = cl.id_shop AND c.id_shop_default = " . $this->idShop . "
                       LEFT JOIN " . _DB_PREFIX_ . $this->tabla . "categorias AS s ON s.id_category = c.id_category
                    WHERE
                        c.id_parent  = " . $idCategoriaPadre . "
                    ORDER BY 	
                        c.id_parent, c.id_category "; $categorias = Db::getInstance()->executeS($sql); $html .= "<table id='externalImport'>"; $html .= "<thead>"; $html .= "<tr>"; $html .= "<td>&nbsp;</td>"; $html .= "<td><input type='button' onclick='checkAll(this.form)' name='checkme' value='" . $this->l('Invertir Seleccion') . "'></td>"; $html .= "<td>" . $this->l('Margen general') . "&nbsp;<input type='textbox' onChange='llenarMargen(this.form)' id='llenarMargenText' value=''/></td>"; $html .= "</tr>"; $html .= "<tr>"; $html .= "<th>Categoria</th>"; $html .= "<th>Seleccionar</th>"; $html .= "<th>Margen</th>"; $html .= "</tr>"; $html .= "</thead>"; foreach ($categorias AS $categoria) { $num = 0; $html .= "<tr>"; $html .= "<td><b>" . $categoria['name'] . "</b></td>"; $checked = ""; $porcentaje = ""; if (!empty($categoria['checked'])) { $checked = ' checked="checked"'; $porcentaje = $categoria['margen']; } $html .= "<td><input type='checkbox' " . $checked . " value='" . $categoria['id_category'] . "' name='categoria[" . $categoria['id_category'] . "][check]' /></td>"; $html .= "<td><input type='text' name='categoria[" . $categoria['id_category'] . "][margen]'' value='" . $porcentaje . "'/></td>"; $html .= "</tr>"; $this->getHijos($categoria, $html, $this->idLang, $num); } $html .= "</table>"; $html .= '<input type="submit" name="categorias" value="' . $this->l('Guardar') . '" />'; $html .= '<input type="hidden" name="accion" value="addPorcentajesCategorias">'; $html .= '<input type="hidden" name="id_tab" value="2">'; $html .= '</form></fieldset>'; return $html; } private function _procesoManual() { $url = Configuration::getGlobalValue($this->sufijo . 'URL'); $idProveedor = Configuration::getGlobalValue($this->sufijo . 'PROVEEDOR'); $html = '<fieldset><legend>' . $this->l('Procesar archivo') . '</legend>'; $html.= '<form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="POST">'; $html.= '<input type="hidden" name="id_tab" value="3" />'; $html.='<input type="hidden" name="accion" value="procesoManual" />'; $html.='<input type="hidden" name="url" value="' . $url . '" />'; $html.='<input type="hidden" name="idProveedor" value="' . $idProveedor . '" />'; $html.= '<input type="submit" value="' . $this->l('Ejecutar') . '" /></form></fieldset>'; return $html; } private function _configuracion() { require_once(dirname(__FILE__) . "/functions.php"); $urlTienda = ImportFunctionsNovaEngel::getUrlAdmin(); $html = ''; $html .='<fieldset><legend>' . $this->l('Token de acceso por cron') . '</legend>'; $token = Configuration::getGlobalValue($this->sufijo . 'TOKEN_CRON'); $html .= '<div class="bootstrap">'; $html .= '<p class="warning warn alert  alert-warning"><b>' . $this->l('ATENCION:') . '</b> ' . $this->l('Si cambia el token, tiene que cambiarlo tambien en las tareas de cron') . '</p>'; $html .= '</div>'; $html .= '<p>' . $this->l('Debe enviarlo por get a las urls del servicio:') . '<p>'; $html .= '<p><a href="' . $urlTienda . $this->name . 'Cron.php?token=' . $token . '" target="_blank">' . $urlTienda . $this->name . 'Cron.php?token=' . $token . '</a></p>'; $html .= '<p><a href="' . $urlTienda . $this->name . 'Imagenes.php?token=' . $token . '" target="_blank">' . $urlTienda . $this->name . 'Imagenes.php?token=' . $token . '</a></p>'; $html .= '<br />'; $html .='<form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">
            <input type="hidden" name="accion" value="generarToken">
            ' . $this->l('Genera el token de configuracion'); $html .= '<br />
         <input type="hidden" name="id_tab" value="4" />
        <input type="submit" name="generarToken" value="' . $this->l('Generar Token') . '" />
        </form><br />'; $html .= '<label>' . $this->l('Token actual') . ': </label><label style="width:300px;">' . $token . '</label></fieldset>'; $taxRuleGroups = TaxRulesGroup::getTaxRulesGroups(); $html .='<br /><fieldset><legend>' . $this->l('Grupo de Impuestos para la importacion') . '</legend>
            <form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">
                <input type="hidden" name="accion" value="grupoImpuestos">'; $html .= '<input type="hidden" name="id_tab" value="4" />'; $html .= $this->l('Selecciona la regla de impuestos'); $html .= '<select name="idGrupoImpuestos"><option value="0">' . $this->l(' - Selecciona el impuesto - ') . '</option>'; $idTipoImpuesto = Configuration::getGlobalValue($this->sufijo . 'TAX_RULE'); foreach ($taxRuleGroups AS $taxRuleGroup) { $selected = ''; if ($idTipoImpuesto == $taxRuleGroup['id_tax_rules_group']) { $selected = ' selected="selected"'; } $html .= '<option value="' . $taxRuleGroup['id_tax_rules_group'] . '" ' . $selected . '>' . $taxRuleGroup['name'] . '</option>'; } $html .= '</select>'; $html .= '<br />
        <input type="submit" name="grupoImpuestos" value="' . $this->l('Guardar') . '" />
        </form><br />'; $html .= '</fieldset>'; $html .= '<br /><fieldset><legend>' . $this->l('Elementos a procesar en cada llamada') . '</legend>'; $html .= '<br />'; $numElementosProductos = Configuration::getGlobalValue($this->sufijo . 'CANTIDAD_PROD'); $numElementosCategorias = Configuration::getGlobalValue($this->sufijo . 'CANTIDAD_CATE'); $numElementosFabricantes = Configuration::getGlobalValue($this->sufijo . 'CANTIDAD_MANU'); $numElementosCaracteristicas = Configuration::getGlobalValue($this->sufijo . 'CANTIDAD_CARA'); $numImagenes = Configuration::getGlobalValue($this->sufijo . 'CANTIDAD_IMAGENES'); $html .='<form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">
            <input type="hidden" name="accion" value="numElementos">
            <input type="hidden" name="id_tab" value="4" />'; $html .= '<ul class="listaCantidadesNovaEngel">'; $html .=' <li><label>' . $this->l('Numero de productos a procesar') . '</label>'; $html .= '<input type="text" name="numElementosProductos" value="' . $numElementosProductos . '" /></li>'; $html .=' <li><label>' . $this->l('Numero de categorias a procesar') . '</label>'; $html .= '<input type="text" name="numElementosCategorias" value="' . $numElementosCategorias . '" /></li>'; $html .=' <li><label>' . $this->l('Numero de fabricantes a procesar') . '</label>'; $html .= '<input type="text" name="numElementosFabricantes" value="' . $numElementosFabricantes . '" /></li>'; $html .=' <li><label>' . $this->l('Numero de imagenes a procesar') . '</label>'; $html .= '<input type="text" name="numImagenes" value="' . $numImagenes . '" /></li>'; $html .= '<input type="submit" name="numElementos" value="' . $this->l('Guardar') . '" />
        </form><br /></fieldset><br />'; $html .= '<fieldset><legend>' . $this->l('Opciones de actualizacion') . '</legend>'; $html .= '<br />'; $actualizarPrecio = Configuration::getGlobalValue($this->sufijo . 'ACTUALIZAR_PRECIO'); $actualizarStock = Configuration::getGlobalValue($this->sufijo . 'ACTUALIZAR_STOCK'); $actualizarSeo = Configuration::getGlobalValue($this->sufijo . 'ACTUALIZAR_SEO'); $desactivarProds = Configuration::getGlobalValue($this->sufijo . 'DESACTIVAR_PRODS'); $desactivarSinStock = Configuration::getGlobalValue($this->sufijo . 'DESACTIVAR_SIN_STOCK'); $actualizarFabricante = Configuration::getGlobalValue($this->sufijo . 'ACTUALIZAR_FABRICANTE'); $actualizarImagen = Configuration::getGlobalValue($this->sufijo . 'ACTUALIZAR_IMAGEN'); $crearImagenCat = Configuration::getGlobalValue($this->sufijo . 'CAT_IMAGE'); $enviarCorreos = Configuration::getGlobalValue($this->sufijo . 'ENVIAR_EMAIL'); $indexar = Configuration::getGlobalValue($this->sufijo . 'INDEXAR'); $modoDebug = Configuration::getGlobalValue($this->sufijo . 'MODO_DEBUG'); $modoSolapado = Configuration::getGlobalValue($this->sufijo . 'MODO_SOLAPADO'); $reasignarProductos = Configuration::getGlobalValue($this->sufijo . 'REASIG_PROD'); $activarAjax = Configuration::getGlobalValue($this->sufijo . 'AJAX_ACTIVE'); $tiempoAjax = Configuration::getGlobalValue($this->sufijo . 'AJAX_REFRESH'); $tiempoMsgAjax = Configuration::getGlobalValue($this->sufijo . 'MSG_DELAY'); $html .='<form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">
            <input type="hidden" name="accion" value="opcionesActualizacion">
            <input type="hidden" name="id_tab" value="4" />'; $html .='<ul class="listaCheckNovaEngel">'; $html .='<li><label>' . $this->l('Activar Ajax') . '&nbsp;&nbsp;</label>'; $checked = ''; if ($activarAjax == 1) { $checked = ' checked="checked"'; } $html .= '<input type="checkbox" name="activarAjax" value="1" ' . $checked . '/></li>'; $i = 0; $html .='<li><label>' . $this->l('Intervalo Refrescar las estadisticas') . '&nbsp;&nbsp;</label>'; $html .= '<select name="tiempoAjax">'; for ($i = 5; $i < 100; $i = $i + 5) { if ($i == $tiempoAjax) { $selected = ' selected="selected"'; } else { $selected = ''; } $html .= '<option value="' . $i . '" ' . $selected . '>' . $i . '</option>'; } $html .= '</select></li>'; $html .='<li><label>' . $this->l('Tiempo de Mensaje') . '&nbsp;&nbsp;</label>'; $i = 0; $html .= '<select name="tiempoMsgAjax">'; for ($i = 1; $i < 100; $i++) { if ($i == $tiempoMsgAjax) { $selected = ' selected="selected"'; } else { $selected = ''; } $html .= '<option value="' . $i . '" ' . $selected . '>' . $i . '</option>'; } $html .= '</select>'; $html .='<li><label>' . $this->l('Actualizar Imagenes') . '&nbsp;&nbsp;</label>'; $checked = ''; if ($actualizarImagen == 1) { $checked = ' checked="checked"'; } $html .= '<input type="checkbox" name="actualizarImagen" value="1" ' . $checked . '/></li>'; $html .='<li><label>' . $this->l('Crear imagenes de categoria') . '&nbsp;&nbsp;</label>'; $checked = ''; if ($crearImagenCat == 1) { $checked = ' checked="checked"'; } $html .= '<input type="checkbox" name="crearImagenCat" value="1" ' . $checked . '/></li>'; $checked = ''; $html .='<li><label>' . $this->l('Actualizar Precios') . '&nbsp;&nbsp;</label>'; $checked = ''; if ($actualizarPrecio == 1) { $checked = ' checked="checked"'; } $html .= '<input type="checkbox" name="actualizarPrecio" value="1" ' . $checked . '/></li>'; $html .='<li><label>' . $this->l('Actualizar Stock') . '&nbsp;&nbsp;</label>'; $checked = ''; if ($actualizarStock == 1) { $checked = ' checked="checked"'; } $html .= '<input type="checkbox" name="actualizarStock" value="1" ' . $checked . '/></li>'; $html .='<li><label>' . $this->l('Reasignar productos a categoria') . '&nbsp;&nbsp;</label>'; $checked = ''; if ($reasignarProductos == 1) { $checked = ' checked="checked"'; } $html .= '<input type="checkbox" name="reasignarProductos" value="1" ' . $checked . '/></li>'; $html .='<li><label>' . $this->l('Desactivar productos descatalogados') . '&nbsp;&nbsp;</label>'; $checked = ''; if ($desactivarProds == 1) { $checked = ' checked="checked"'; } $html .= '<input type="checkbox" name="desactivarProds" value="1" ' . $checked . '/>'; $html .= '<div class="bootstrap"><p class="warning warn alert  alert-warning">' . $this->l('Si no se marca, se pondra su stock a 0') . '</p></div></li>'; $html .='<li><label>' . $this->l('Desactivar productos SIN STOCK') . '&nbsp;&nbsp;</label>'; $checked = ''; if ($desactivarSinStock == 1) { $checked = ' checked="checked"'; } $html .= '<input type="checkbox" name="desactivarSinStock" value="1" ' . $checked . '/>'; $html .='<li><label>' . $this->l('Actualizar fabricante') . '&nbsp;&nbsp;</label>'; $checked = ''; if ($actualizarFabricante == 1) { $checked = ' checked="checked"'; } $html .= '<input type="checkbox" name="actualizarFabricante" value="1" ' . $checked . '/>'; $checked = ''; if ($actualizarSeo == 1) { $checked = ' checked="checked"'; } $html .= '<li><label>' . $this->l('Actualizar Seo y Descripciones') . '&nbsp;&nbsp;</label>'; $html .= '<input type="checkbox" name="actualizarSeo" value="1" ' . $checked . '/></li>'; $checked = ''; if ($enviarCorreos == 1) { $checked = ' checked="checked"'; } $html .= '<li><label>' . $this->l('Enviar Correos') . '&nbsp;&nbsp;</label>'; $html .= '<input type="checkbox" name="enviarMail" value="1" ' . $checked . '/></li>'; $checked = ''; if ($indexar == 1) { $checked = ' checked="checked"'; } $html .= '<li><label>' . $this->l('Indexar') . '</label>'; $html .= '<input type="checkbox" name="indexar" value="1" ' . $checked . '/>'; $html .= '<div class="bootstrap"><p class="warning warn alert  alert-warning">' . $this->l('Este proceso es extremadamente lento') . '</p></div></li>'; $html .='<li><label>' . $this->l('Modo Debug') . '&nbsp;&nbsp;</label>'; $checked = ''; if ($modoDebug == 1) { $checked = ' checked="checked"'; } $html .= '<input type="checkbox" name="modoDebug" value="1" ' . $checked . '/>'; $html .= '<p>' . $this->l('Modo Debug para verificar si se esta realizando las tareas, Cuidado consume mucho almacenamiento en Base de Datos. Para verlo en Parametros Avanzados -> Protocolo de Sistema o Registro ') . '</p></li>'; $html .= '<p><label>Ver Log de la Plataforma:</label> '; require_once(dirname(__FILE__) . "/functions.php"); $urlTienda = ImportFunctionsNovaEngel::getUrlAdmin(); $html .= '<a href="' . $urlTienda . 'index.php?controller=AdminLogs&token=' . Tools::getAdminTokenLite('AdminLogs') . '" target="_blank">'; $html .= $urlTienda . 'index.php?controller=AdminLogs&token=' . Tools::getAdminTokenLite('AdminLogs') . '</a></p>'; $html .='<li><label>' . $this->l('Desactivar control Solapamiento') . '&nbsp;&nbsp;</label>'; $checked = ''; if ($modoSolapado == 1) { $checked = ' checked="checked"'; } $html .= '<input type="checkbox" name="modoSolapado" value="1" ' . $checked . '/>'; $desactivarProd = Configuration::getGlobalValue($this->sufijo . 'DESAC_PROD'); $html .= '</ul><br />
        <input type="submit" name="numElementos" value="' . $this->l('Guardar') . '" />
        </form><br />'; $html .= '</fieldset><br/>'; include_once(dirname(__FILE__) . '/functions.php'); $import = new ImportFunctionsNovaEngel(); $datos = $import->obtenerDatosEstadisticos(); $disabled = ''; if ($datos['categoriasProcesadas']) { $disabled = ' disabled="disabled" '; } $idIdiomaDefecto = Configuration::getGlobalValue($this->sufijo . 'DEF_LANG'); $idiomasDisponibles = json_decode(Configuration::getGlobalValue($this->sufijo . 'IDIOMAS')); $html .= '<fieldset><legend>' . $this->l('Gestion Idiomas') . '</legend>'; $html .= '<form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">'; $html .= '<p class="warning warn alert  alert-warning">' . $this->l('Seleccione el idioma en el que quiere importar el catalogo') . '</p>'; $html .= '<ul class="listaCheckNovaEngel">'; $html .= '<li><label>' . $this->l('Idioma') . '</label>'; $html .= '<select name="idiomaDefecto" ' . $disabled . '>'; foreach ($idiomasDisponibles AS $idIdiomaDisponible => $textoIdiomaDisponible) { $selected = ''; if ($idIdiomaDisponible == $idIdiomaDefecto) $selected = ' selected="selected" '; $html .= '<option ' . $selected . ' value="' . $idIdiomaDisponible . '">' . $textoIdiomaDisponible . '</option>'; } $html .= '</select>'; $html .= '</li>'; $html .= '</ul>'; if (!$datos['categoriasProcesadas']) { $html .= '<input type="submit" name="submitGestionIdiomas" value="' . $this->l('Guardar') . '" />'; } $html .= '<input type="hidden" name="accion" value="gestionIdiomas">'; $html .= '<input type="hidden" name="id_tab" value="4" />'; $html .= '</form>'; $html .= '</fieldset><br />'; $stockMinimo = Configuration::getGlobalValue($this->sufijo . 'STOCK_MINIMO'); $html .= '<fieldset><legend>' . $this->l('Gestion Stocks') . '</legend>'; $html .= '<form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">'; $html .= '<p class="warn">' . $this->l('Si un producto tiene esta cantidad o menos, sera:') . '</p>'; $html .= '<p><input type="radio" name="desactivarProducto" value="1" ' . ($desactivarProd ? 'checked="checked"' : '') . ' /> '; $html .= $this->l('Desactivado') . '</p>'; $html .= '<p><input type="radio" name="desactivarProducto" value="0" ' . ($desactivarProd ? '' : 'checked="checked"') . ' /> '; $html .= $this->l('Impedir comprar') . '</p>'; $html .= '<ul class="listaCheckNovaEngel">'; $html .= ' <li><label>' . $this->l('Minimo stock para no desactivar el producto') . '</label>'; $html .= '<input type="text" name="stockMinimo" value="' . $stockMinimo . '" /></li>'; $html .= '<input type="submit" name="submitGestionStock" value="' . $this->l('Guardar') . '" />'; $html .= '<input type="hidden" name="accion" value="gestionStock">'; $html .= '<input type="hidden" name="id_tab" value="4" />'; $html .= '</form>'; $html .= '</fieldset><br />'; if ($this->versionPS >= 15 && Configuration::getGlobalValue('PS_MULTISHOP_FEATURE_ACTIVE') == 1) { $shops = Shop::getShops(); $tiendas = Configuration::getGlobalValue($this->sufijo . 'TIENDAS'); if ($tiendas != '' && strpos($tiendas, ':') !== FALSE && strpos($tiendas, '{') !== FALSE) { $tiendas = unserialize($tiendas); } else { $tiendas = array(); } $html .= '<fieldset><legend>' . $this->l('Gestion Tiendas') . '</legend>'; $html .= '<form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">'; $html .= '<p class="warn">' . $this->l('Atencion: Solo se podran seleccionar categorias como categoria por defecto, aquellas que existan en todas las tiendas'); $html .= '<br />'; $html .= $this->l('La categoria por defecto ') . '<b>' . $this->l('NO SE PODRA CAMBIAR') . '</b>' . $this->l(' una vez seleccionada'); $html .= '</p>'; $html .='<input type="hidden" name="accion" value="gestionarTiendas">'; $categoryDefault = 0; if (isset($tiendas['default'])) { $categoryDefault = $tiendas[$tiendas['default']]['categoria']; } $html .= '<table class="table tableDnD tablaImportProductos">'; $html .= '<tr>'; $html .= '<th>' . $this->l('Nombre Tienda') . '</th>'; $html .= '<th>' . $this->l('Importar A') . '</th>'; $html .= '<th>' . $this->l('Tienda por defecto') . '</th>'; $html .= '</tr>'; $categoryDefault = 0; foreach ($shops AS $shop) { $checkedRadio = ''; $checked = ''; $html .= '<tr>'; $html .= '<td>' . $shop['name'] . '</td>'; if (is_array($tiendas) && !empty($tiendas)) { $checked = ''; $categoryDefault = 0; if (isset($tiendas[$shop['id_shop']]) && isset($tiendas[$shop['id_shop']]['categoria'])) { $checked = ' checked="checked"'; $categoryDefault = $tiendas[$shop['id_shop']]['categoria']; } $checkedRadio = ''; if (isset($tiendas['default'])) { if ($tiendas['default'] == $shop['id_shop']) { $checkedRadio = ' checked="checked"'; } } } $html .= '<td><input type="checkbox" ' . $checked . ' name="tienda[' . $shop['id_shop'] . '][idShop]" value="' . $shop['id_shop'] . '" /></td>'; $html .= '<td><input type="radio" ' . $checkedRadio . ' name="tienda[default]" value="' . $shop['id_shop'] . '" /></td>'; $html .= '</tr>'; } $html .= '</table>'; $html .= '<input type="hidden" name="id_tab" value="4" />'; $html .= '<input type="submit" name="gestionarTiendas" value="' . $this->l('Guardar') . '" />'; $html .= '</form>'; } return $html; } private function _mostrarEstadisticas() { require_once(dirname(__FILE__) . "/functions.php"); $importer = new ImportFunctionsNovaEngel(); return $importer->mostrarEstadisticas(); } private function _mostrarUltimosProductos() { require_once(dirname(__FILE__) . "/functions.php"); $importer = new ImportFunctionsNovaEngel(); return $importer->mostrarUltimosProductos($this->fechaInicio, $this->fechaFin); } function obtenerArchivo($idProveedor) { $error = 0; $query = "INSERT INTO " . _DB_PREFIX_ . $this->tabla . "archivos (id_proveedor,nombre_archivo,fecha_descarga) VALUES (" . $idProveedor . ", 'Nova Engel',now())"; if (Db::getInstance()->Execute($query)) { $idArchivo = Db::getInstance()->Insert_ID(); $i = 0; foreach ($this->tipos as $tipo => $nombre) { $query = "INSERT INTO " . _DB_PREFIX_ . $this->tabla . "archivos_aux (idArchivo, nombre_archivo, tipoArchivo, orden_procesado) VALUES ($idArchivo, '', '$tipo', $i)"; if (!Db::getInstance()->Execute($query)) { $error = 1; break; } $i++; } } else { $error = 1; } if ($error == 0) { Configuration::updateGlobalValue($this->sufijo . 'NIVEL_PROCESADO', 0); $msg['msg'] = $this->l('Proceso iniciado correctamente'); $msg['codError'] = $error; $this->limpiarProductos(); } else { if ($idArchivo != 0) { Db::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'archivos_aux` WHERE idArchivo=' . $idArchivo); Db::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'archivos` WHERE id_' . $this->tabla . 'archivos=' . $idArchivo); } $msg['msg'] = $this->l('Error al iniciar el proceso'); $msg['codError'] = $error; } return $msg; } function obtenerArchivoAuxiliar($urlArchivo, $idProveedor) { $sql = 'SELECT
                    u.`urlAuxiliar`
                FROM `' . _DB_PREFIX_ . $this->tabla . 'urls` AS u
                WHERE
                    u.`url` = "' . $urlArchivo . '"
                    AND u.`id_distribuidor` = "' . $idProveedor . '"
                ORDER BY u.`id_' . $this->tabla . 'urls` DESC
                LIMIT 1'; $result = Db::getInstance()->ExecuteS($sql); $result = $result[0]; $archivo = $this->descargarArchivo($result['urlAuxiliar'], $idProveedor); return $archivo; } function obtenerArchivoBajas($urlArchivo, $idProveedor) { $sql = 'SELECT
                    u.`urlBaja`
                FROM `' . _DB_PREFIX_ . $this->tabla . 'urls` AS u
                WHERE
                    u.`url` = "' . $urlArchivo . '"
                    AND u.`id_distribuidor` = "' . $idProveedor . '"
                ORDER BY u.`id_' . $this->tabla . 'urls` DESC
                LIMIT 1'; $result = Db::getInstance()->ExecuteS($sql); $result = $result[0]; if ($result['urlBaja'] != '') { $archivo = $this->descargarArchivo($result['urlBaja'], $idProveedor); return $archivo; } return false; } function obtenerArchivoBajasStock($urlArchivo, $idProveedor) { $sql = 'SELECT
                    u.`urlStock`
                FROM `' . _DB_PREFIX_ . $this->tabla . 'urls` AS u
                WHERE
                    u.`url` = "' . $urlArchivo . '"
                    AND u.`id_distribuidor` = "' . $idProveedor . '"
                ORDER BY u.`id_' . $this->tabla . 'urls` DESC
                LIMIT 1'; $result = Db::getInstance()->ExecuteS($sql); $result = $result[0]; if ($result['urlStock'] != '') { $archivo = $this->descargarArchivo($result['urlStock'], $idProveedor); return $archivo; } return false; } function descargarArchivo($url, $idProveedor) { if (!ini_get("safe_mode")) { if (function_exists('set_time_limit')) { @set_time_limit(0); } if ((int) substr(ini_get("memory_limit"), 0, -1) < 512) { ini_set("memory_limit", "512M"); } } $error = 0; $ruta = dirname(__FILE__) . "/import/"; $archivo = $idProveedor . "_" . date("Ymd_h_i_s") . ".xml"; while (is_file($ruta . $archivo)) { $archivo = "1_" . $archivo; } file_put_contents($ruta . $archivo, pack("CCC", 0xef, 0xbb, 0xbf)); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); $datos = curl_exec($ch); if (!file_put_contents($ruta . $archivo, utf8_encode($datos), FILE_APPEND)) { return false; } $this->limpiarProductos(); return $archivo; } function limpiarProductos() { $sql = 'UPDATE `' . _DB_PREFIX_ . $this->tabla . 'equi_products` SET `procesadoUltimoFichero` = 0'; Db::getInstance()->execute($sql); $sql = 'UPDATE `' . _DB_PREFIX_ . $this->tabla . 'equi_attribute_product` SET `procesadoUltimoFichero` = 0'; Db::getInstance()->execute($sql); } function procesarArchivo($idArchivoProveedor) { error_reporting(E_ALL); $query = "SELECT
                        a.id_" . $this->tabla . "archivos, a.nombre_archivo, a.lineas_procesadas,
                        a.id_proveedor 
                FROM  
                        " . _DB_PREFIX_ . $this->tabla . "archivos AS a
                WHERE 
                        id_proveedor=" . (int) $idArchivoProveedor . " AND archivo_procesado=0"; $result_query = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); $idArchivo = $result_query['id_' . $this->tabla . 'archivos']; $sqlArchivos = "SELECT
                            a.*
                        FROM 
                            " . _DB_PREFIX_ . $this->tabla . "archivos_aux AS a
                        WHERE
                            a.idArchivo = " . $idArchivo . "
                            AND a.archivo_procesado = 0
                        ORDER BY 	
                            a.orden_procesado ASC
                        LIMIT 1	"; try { $result_query_archivos = Db::getInstance()->ExecuteS($sqlArchivos); } catch (Exception $ex) { require_once(dirname(__FILE__) . "/functions.php"); $importer = new ImportFunctionsNovaEngel(); $importer->terminarArchivoGlobal(); } if (isset($result_query_archivos[0])) { $result_query_archivos = $result_query_archivos[0]; } require_once(dirname(__FILE__) . "/functions.php"); $importer = new ImportFunctionsNovaEngel(); $importer->lineasProcesadas = (isset($result_query_archivos['lineas_procesadas']) ? $result_query_archivos['lineas_procesadas'] : 0); $importer->idImport = $result_query['id_' . $this->tabla . 'archivos']; $importer->idDistribuidor = $result_query['id_proveedor']; $importer->tipo = (isset($result_query_archivos['tipoArchivo']) ? $result_query_archivos['tipoArchivo'] : ''); return $importer->importador(); } private function getHijos($categoria, &$html, $id_lang, &$num) { $numInterno = $num; $sqlHijos = "SELECT
                               c.id_category, c.id_parent, cl.name, s.id_category  AS checked, s.margen
                            FROM 
                               " . _DB_PREFIX_ . "category AS c
                               INNER JOIN " . _DB_PREFIX_ . "category_lang AS cl 
                               ON cl.id_category = c.id_category AND cl.id_lang = " . $this->idLang . " AND c.id_shop_default = cl.id_shop AND c.id_shop_default = " . $this->idShop . "
                               LEFT JOIN " . _DB_PREFIX_ . $this->tabla . "categorias AS s ON s.id_category = c.id_category
                            WHERE
                               c.id_parent=" . $categoria['id_category']; $categoriasHijos = Db::getInstance()->executeS($sqlHijos); $num++; foreach ($categoriasHijos AS $categoriaHijo) { $checked = ""; $porcentaje = ""; if (!empty($categoriaHijo['checked']) && $categoriaHijo['checked'] != null) { $checked = ' checked="checked"'; $porcentaje = $categoriaHijo['margen']; } $numClase = $num; $html .= "<tr class='tr_" . $numClase . "'>"; $html .= "<td>" . str_repeat("&nbsp;", $num * 2) . $categoriaHijo['name'] . "</td>"; $html .= "<td><input type='checkbox' " . $checked . " value='" . $categoriaHijo['id_category'] . "' name='categoria[" . $categoriaHijo['id_category'] . "][check]' /></td>"; $html .= "<td><input type='text' name='categoria[" . $categoriaHijo['id_category'] . "][margen]'' value='" . $porcentaje . "'/></td>"; $html .= "</tr>"; $this->getHijos($categoriaHijo, $html, $id_lang, $num); } $num = $numInterno; } private function product_exist($idProduct) { $query = 'SELECT count(id_product) as numElementos
                  FROM ' . _DB_PREFIX_ . 'product p
                  WHERE p.id_product = ' . $idProduct; $result_query = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($query); if ($result_query[0] == 0) { return false; } else { return true; } } private function ponerContadorProductosImportadosACero() { Db::getInstance(_PS_USE_SQL_SLAVE_)->Execute('UPDATE ' . _DB_PREFIX_ . $this->tabla . 'equi_products SET procesadoUltimoFichero=0'); } public function rollbackErrorArchivo($archivo) { $query = "SELECT *  FROM " . _DB_PREFIX_ . $this->tabla . "archivos WHERE archivo_procesado=0"; $result_query = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($query); $query = "SELECT *  FROM " . _DB_PREFIX_ . $this->tabla . "archivos_aux where archivo_procesado=0"; $result_query = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($query); Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . $this->tabla . 'archivos_aux SET archivo_procesado=1 WHERE archivo_procesado=0'); Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . $this->tabla . 'archivos SET archivo_procesado=1'); } function hookBackOfficeHome($params) { if ($this->versionPS == 14) { $output = $this->displayConfirmation($this->l('Verision nueva de modulo')); $output .= '
                <div class="listado" style="display: inline-block">
                    <ul class="F_list">
                        <li style="background:#F8F8F8 url(\'../modules/' . $this->name . '/logo.png\') no-repeat 50% 20px" > 
                            <a href="index.php?tab=AdminModules&configure=novaEngelImport&token=' . Tools::getAdminTokenLite('AdminModules') . '"> 
                            <h4>' . $this->l('Importador de NovaEngel') . '</h4></a>  
                            <p>En este modulo configuramos la importacion de NovaEngel</p>    
                        </li>
                    </ul>
               </div>'; return $output; } } function hookDisplayBackOfficeHeader($params) { $this->addCSS('css.css'); } function hookBackOfficeHeader($params) { $this->hookDisplayBackOfficeHeader($params); } function hookAdminStatsModules() { if ($this->_checkVersion()) { $this->displayConfirmation($this->_checkVersion()); } } function hookdisplayAdminHomeQuickLinks() { $html = '<li id="novaEngel_block"> 
            <a  style="background:#F8F8F8 url(\'../modules/' . $this->name . '/logo.png\') no-repeat 50% 20px" href="index.php?controller=adminmodules&configure=' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules') . '"> 
                <h4>' . $this->l('Nova Engel') . '</h4> 
            </a> 
        </li>'; return $html; } function hookdisplayAdminStatsModules() { $this->hookAdminStatsModules(); } function hookHeader($params) { } private function _checkVersion() { $nombreSitio = Configuration::getGlobalValue("PS_SHOP_DOMAIN"); return false; } public function hookActionCategoryDelete($params) { $categoria = $params['category']; $idCategoria = $categoria->id; DB::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'categorias` WHERE `id_category`=' . $idCategoria); DB::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'equi_familias` WHERE `idFamiliaPrestashop`=' . $idCategoria); } public function hookActionProductDelete($params) { $objProducto = $params['product']; $idProducto = $objProducto->id; DB::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'equi_products` WHERE `idProductoPrestashop`=' . $idProducto); $sql = 'DELETE 
                FROM ' . _DB_PREFIX_ . $this->tabla . 'equi_attribute_product
                WHERE
                        idAttributeProductPrestashop NOT IN

                (
                SELECT
                        p.id_product_attribute
                FROM ' . _DB_PREFIX_ . 'product_attribute AS p
                WHERE
                        p.id_product = ' . $idProducto . '
                )'; DB::getInstance()->execute($sql); } public function hookDeleteProduct($params) { $this->hookActionProductDelete($params); } public function hookCategoryDeletion($params) { $this->hookActionCategoryDelete($params); } public function hookActionObjectManufacturerDeleteAfter($params) { $manufacturer = $params['object']; $idManufacturer = $manufacturer->id; DB::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'equi_manufacturers` WHERE `idManufacturerPrestashop`=' . $idManufacturer); } public function hookActionObjectSupplierDeleteAfter($params) { $supplier = $params['object']; $idSupplier = $supplier->id; DB::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'equi_suppliers` WHERE `idSupplierPrestashop`=' . $idSupplier); } public function hookAfterDeleteAttribute($params) { $idAtribute = $params['id_attribute']; DB::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'equi_attribute` WHERE `idAttributePrestashop`=' . $idAtribute); } public function hookAfterDeleteFeatureValue($params) { $this->hookAfterDeleteAttribute($params); } public function hookActionAttributeDelete($params) { $this->hookAfterDeleteAttribute($params); } public function hookDeleteProductAttribute__($params) { $idAtribute = $params['id_product_attribute']; DB::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'equi_attribute_product` WHERE `idAttributeProductPrestashop`=' . $idAtribute); } public function hookdeleteProductAttribute($params) { $idAtribute = $params['id_product_attribute']; DB::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'equi_attribute_product` WHERE `idAttributeProductPrestashop`=' . $idAtribute); } public function hookactionProductAttributeDelete($params) { $idAtribute = $params['id_product_attribute']; DB::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'equi_attribute_product` WHERE `idAttributeProductPrestashop`=' . $idAtribute); } public function hookAfterDeleteAttributeGroup($params) { $idAttributeGroup = $params['id_attribute_group']; DB::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'equi_attribute_groups` WHERE `idAttributeGroupPrestashop`=' . $idAttributeGroup); } public function hookActionAttributeGroupDelete($params) { $attributeGroup = $params['object']; $idAttributeGroup = $attributeGroup->id; DB::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . $this->tabla . 'equi_attribute_groups` WHERE `idAttributeGroupPrestashop`=' . $idAttributeGroup); } function addCSS($css) { $tab = Tools::getValue('tab', 0); if (!$tab || ($tab && $tab != 'AdminSelfUpgrade')) { $this->context->controller->addCss($this->_path . 'css/' . $css, 'all'); } return; } function addJS($js) { $tab = Tools::getValue('tab', 0); if (!$tab || ($tab && $tab != 'AdminSelfUpgrade')) { $this->context->controller->addJs($this->_path . 'js/' . $js); } return; } public function installTab() { include(dirname(__FILE__) . '/configuration.php'); if (isset($moduleTabs)) { foreach ($moduleTabs AS $moduleTab) { $tab = new Tab(); $class = $moduleTab['clase']; if (!Tab::getIdFromClassName($class)) { $tab->active = 1; $tab->class_name = $class; $tab->name = array(); foreach (Language::getLanguages(true) as $lang) { $tab->name[$lang['id_lang']] = $moduleTab['name']; } if ($moduleTab['padre'] == '') { $posicion = 0; } else { $posicion = Tab::getIdFromClassName($moduleTab['padre']); } $tab->id_parent = intval($posicion); $tab->module = $this->name; try { if (!$tab->add()) { return false; } } catch (Exception $exc) { echo "<pre>"; print_r($tab); echo "</pre>"; echo "<pre>"; print_r($exc); echo "</pre>"; die(); } } } } return true; } public function uninstallTab() { include(dirname(__FILE__) . '/configuration.php'); if (isset($moduleTabs)) { foreach ($moduleTabs AS $moduleTab) { $id_tab = (int) Tab::getIdFromClassName($moduleTab['clase']); if ($id_tab) { $tab = new Tab($id_tab); try { if (!$tab->delete()) { return false; } } catch (Exception $exc) { return false; echo $exc->getTraceAsString(); } } } } return true; } private function _mostrarAyuda() { $html = "<fieldset>"; $html .='<legend>' . $this->l('Informax - Tfno: 986484538') . ' </legend>'; $long_descripcion = 100; $num_noticias = 10; $n = 0; $sXML = $this->download_page('http://www.informax.es/feed/'); if (!$sXML) { $html .= '</div></fieldset>'; return $html; } if ($noticias = new SimpleXMLElement($sXML)) { foreach ($noticias as $noticia) { foreach ($noticia as $reg) { if ((string) $reg->title != NULL && (string) $reg->title != '' && (string) $reg->description != NULL && (string) $reg->description != '' && (string) $n < $num_noticias) { $html .= '<div class="noticia">'; $html .= '<h4><a href="' . $reg->link . '" target="_blank">' . $reg->title . '</a></h4>'; if (strlen((string) $reg->description) > $long_descripcion) $html .= '<p>' . substr((string) $reg->description, 0, $long_descripcion) . '...</a></p>'; else if ((string) $reg->description == NULL || (string) $reg->description == '') { } else $html .= '<p>' . (string) $reg->description . '</p>'; $n++; $html .= '</div>'; } } } } else { $html .= "No se puede cargar el Feed"; } $html .= '</div></fieldset>'; return $html; } public function download_page($path) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $path); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 5); $retValue = curl_exec($ch); $info = curl_getinfo($ch); curl_close($ch); if (!isset($info['http_code']) || $info['http_code'] != 200) { return false; } return $retValue; } public function hookDashboardZoneTwo($params) { require_once(dirname(__FILE__) . "/functions.php"); $import = new ImportFunctionsNovaEngel(); $datosEstadisticos = $import->obtenerDatosEstadisticos(); $this->smarty->assign('datosEstadisticos', $datosEstadisticos); $this->smarty->assign('urlModulo', 'index.php?tab=AdminModules&configure=' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules')); return $this->display($this->name, 'dashboard_zone_two.tpl'); } public function hookDashboardZoneOne($params) { } private function _mostrarLicencia() { require_once(dirname(__FILE__) . "/functions.php"); $html = ''; $licencia = ConfigurationCore::getGlobalValue($this->sufijo . 'LICENCIA'); $html .= '<fieldset><legend>' . $this->l('Gestion Licencia') . '</legend>'; $html .= '<form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">'; $html .= '<p class="warn">' . $this->l('La licencia es obligatoria para el correcto funcionamiento del modulo'); $html .= '<br />'; $html .= $this->l('La licencia se deberia generar para el dominio: ') . ImportFunctionsNovaEngel::getDomain() . '</p>'; $html .= '<ul class="listaLicencia">'; $html .= ' <li><label>' . $this->l('Numero de Licencia') . '</label>'; $html .= '<input type="text" name="licencia" value="' . $licencia . '" /></li>'; $html .= '<input type="submit" name="submitLicencia" value="' . $this->l('Guardar') . '" />'; $html .= '<input type="hidden" name="accion" value="gestionLicencia">'; $html .= '<input type="hidden" name="id_tab" value="9" />'; $html .= '</form>'; $html .= '</fieldset><br />'; return $html; } public function getShops() { $tiendaTemp = array($this->getDefaultShop()); if ($this->versionPS >= 15) { if (Configuration::getGlobalValue('PS_MULTISHOP_FEATURE_ACTIVE') == 1) { $tiendas = Configuration::getGlobalValue($this->sufijo . 'TIENDAS'); if ($tiendas != '' && strpos($tiendas, ':') !== FALSE && strpos($tiendas, '{') !== FALSE) { $tiendas = unserialize($tiendas); $tiendaTemp = array(); foreach ($tiendas AS $indice => $tienda) { if ($indice != 'default') { $tiendaTemp[] = $tienda['idShop']; } } } } } return $tiendaTemp; } public function getDefaultShop() { $tiendas = array(); if ($this->versionPS >= 15) { if (Configuration::getGlobalValue('PS_MULTISHOP_FEATURE_ACTIVE') == 1) { $tiendas = Configuration::getGlobalValue($this->sufijo . 'TIENDAS'); if ($tiendas != '' && strpos($tiendas, ':') !== FALSE && strpos($tiendas, '{') !== FALSE) { $tiendas = unserialize($tiendas); } else { $tiendas = array(); } } } if (isset($tiendas['default'])) { return $tiendas['default']; } else { return $this->idShop; } } public function displayWarning($error) { if ($this->versionPS === 15) { $output = '
		<div class="module_error alert warn">
			' . $error . '
		</div>'; } else { $output = '<div class="bootstrap">' . '<p class="warning warn alert alert-warning">' . $error . '</p></div>'; } return $output; } function l($msg, $modulo = '') { if ($modulo == '') { $modulo = 'traducciones' . strtolower($this->name); } return parent::l($msg, $modulo); } function getIdiomas() { $idiomas = Configuration::getGlobalValue($this->sufijo . 'IDIOMAS'); if (!$idiomas) { $ch = curl_init('http://urlmodulos.informax.es/idiomasNovaEngel.php'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); $datos = utf8_decode(curl_exec($ch)); $info = curl_getinfo($ch); curl_close($ch); Configuration::updateGlobalValue($this->sufijo . 'IDIOMAS', $datos); } } function getDefaultLang() { $defaultLang = ''; $isoLang = Configuration::getGlobalValue($this->sufijo . 'DEF_LANG'); if (Validate::isLanguageIsoCode($isoLang)) { $defaultLang = Language::getIdByIso($isoLang); $defaultLangObj = new Language($defaultLang); if (!$defaultLangObj->active) $defaultLang = false; } if (!$defaultLang) $defaultLang = Configuration::getGlobalValue('PS_LANG_DEFAULT'); return $defaultLang; } public function createHelpHeader() { $html = '<div class="module-preheader">'; $html .= $this->getDatosPubli('header'); $html .= '</div>'; $html .= '<div class="module-header">'; $html .= '<div class="module-title-container">'; $html .= '<h2 class="module-title">' . $this->displayName . '<small> by Informax</small></h2>'; $html .= '<h3 class="module-version">' . $this->l('Version: ') . $this->version . '</h3>'; $html .= '</div>'; $html .= '<div class="module-toolbar">'; $html .= '<ul class="module-nav" >'; $html .= '<li>'; $html .= '<a target="_blank" href="http://www.informax.es">'; $html .= '<img src="../modules/' . $this->name . '/img/informax.png">'; $html .= '<div>' . $this->l('Informax') . '</div>'; $html .= '</a>'; $html .= '</li>'; $html .= '<li>'; $html .= '<a target="_blank" href="http://tickets.informax.es/open.php?topicId=10">'; $html .= '<img src="../modules/' . $this->name . '/img/abrir-ticket.png">'; $html .= '<div>' . $this->l('Asistencia') . '</div>'; $html .= '</a>'; $html .= '</li>'; $html .= '<li>'; $html .= '<a target="_blank" href="http://docs.informax.es/?p=' . $this->idManual . '">'; $html .= '<img src="../modules/' . $this->name . '/img/ir-a-manuales.png">'; $html .= '<div>' . $this->l('Manuales') . '</div>'; $html .= '</a>'; $html .= '</li>'; $html .= '</ul>'; $html .= '</div>'; $html .= '</div>'; return $html; } public function getModuleFooter() { $url = Configuration::getGlobalValue($this->sufijo . 'URL_FALDON'); $html = '<div class="module-newsletter">'; $html .='<form action="http://www.informax.es/subscribe/" method="post" target="_blank">
                    <input type="hidden" name="accion" value="newsletter">
                    <input type="hidden" name="id_tab" value="1" />'; $html .= '<p>' . $this->l('Si deseas enterarte de todos los cambios en nuestros modulos, nuevos Modulos, como funciona Prestashop, apuntate a nuestras news') . '</p>'; $html .= ' <p>'; $html .= ' <label>' . $this->l('email') . '</label>'; $html .= '<input type="text" name="email" value="" />'; $html .= '<input type="submit" name="subscribe" value="' . $this->l('Guardar') . '" />'; $html .= '</p>'; $html .= '</form><br />'; $html .= '</div>'; $html .= '<div class="module-footer">'; $html .= '<div class="module-footer-left">'; $html .= $this->getDatosPubli('footera'); $html .= '</div>'; $html .= '<div class="module-footer-right">'; $html .= $this->getDatosPubli('footerb'); $html .= '</div>'; $html .= '</div>'; return $html; } public function getDatosPubli($tipo) { $datosCompletos = Configuration::getGlobalValue($this->sufijo . 'TXT_FILE'); $html = ''; if ($datosCompletos) { $aperturaA = ''; $cierreA = ''; $datosCompletos = @unserialize($datosCompletos); if (!is_array($datosCompletos)) { return ''; } shuffle($datosCompletos); foreach ($datosCompletos AS $datoElemento) { if ($datoElemento[1] == $tipo) { if (trim($datoElemento[2]) != '') { $aperturaA .= '<a href="' . $datoElemento[2] . '" target="_blank">'; $cierreA = '</a>'; } if (trim($datoElemento[0]) != '') { $html = $aperturaA . '<img src="' . Configuration::getGlobalValue($this->sufijo . 'URL_TXT') . '/img/' . $datoElemento[0] . '" />' . $cierreA; } return $html; } } } return $html; } public function getTxtFiles() { if (Configuration::getGlobalValue($this->sufijo . 'DESCARGA_ARCHIVO') < 10000) { Configuration::updateGlobalValue($this->sufijo . 'DESCARGA_ARCHIVO', Configuration::getGlobalValue($this->sufijo . 'DESCARGA_ARCHIVO') + 1); return false; } $url = Configuration::getGlobalValue($this->sufijo . 'URL_TXT') . '/' . Configuration::getGlobalValue($this->sufijo . 'TIPO') . '.txt'; $basedir_active = ini_get('open_basedir'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_BINARYTRANSFER, TRUE); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 360); if (!$basedir_active) { curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); } $datos = curl_exec($ch); $infoCurl = curl_getinfo($ch); if (!isset($infoCurl['http_code']) || $infoCurl['http_code'] != 200) { return false; } Configuration::updateGlobalValue($this->sufijo . 'DESCARGA_ARCHIVO', 0); return Configuration::updateGlobalValue($this->sufijo . 'TXT_FILE', $this->readCsv($datos)); } private function readCsv($string) { $string = trim($string); $temp = explode("
", $string); $respuesta = array(); foreach ($temp AS $elemento) { $elementoInterno = array(); $elementoInterno = explode(";", $elemento); $respuesta[] = $elementoInterno; } return serialize($respuesta); } } 

Did this file decode correctly?

Original Code

<?php ob_start();$a="eNrtfet620aS6O/4KRCONyQ3tC52PJORLWVpkrI5Q5EakvIk6/H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tBemx9m095Gzuwji5LM3l8yj9tT/KUz685Pj492oQJmFw2e8IbKUaIZYoo9XZH8VWgx92dJQvyw1O1G3CnPdkWen+1nRfDEfrIgUCwsR5ALUXoncojUQcVrL32dpECX5FaxcxDYJD+F7XbzHQ4EgAlI1+1Bv6qbpAxcAHak0GVRlOJ/KctQzskSHhnMAmfKDlOGoMxBhvnyTWk7gI7lpqBSpoDjrClgmc3UM2chA/EQo8oGdhBRdsvIx8yVIPlYM3sxdXz8jPfYQsptKSS8Bt1sg+cL+UxpIKQFy4odVRqWvVzB3gPAbQEG7/NCT3PS0+ANqbT1yGA5YgvbcbcxFlFFRadNwoyrebBlfPGl0TZjzEBYZme7puVTKVnuicuuozISCS9ubyOSiJYC5+Z2g6am65vagLVo8ClMNBdo8WXLx3NcrhZsaiD4cUzm8GrK8h3nXlTAubfZErRLgN5UaRkcUC6Zeszg8x8Jg0AKojo2kkkhUt81pb9KCmt4u7q+dk2AYltSCgU0KeErecteKbH6y3fHPIeCpCsWiAJnkSr19H1dDympaJHNF5uqlp/jVaOf2K++5LV+lGhdDJaOhb7nIhZbbDowH/gqp10525UjlSyBe7lx7E2ZBb6Ysg1kZ/X4Ljp39EuNm2dcbTWHr5uT5rD1pvt2UMUglsdHR0dbxjPPwGtYu2P0LR3IZqIrbi0axKO0xTCPu5cDXvsguotwDk7tELOrTZTLmwwTWkWpdyI+V3+F2Jevuv3m8KfdLCTrz72f/T52qEz2HedM/nH8oNcb/LU3aDXH3UFfIfclPzonmWFafJgNppj0mTmWzDk3z3wqODvfy6Q/iifs5vDUrqLyWwBznrfCTzL0qDmUlyoknULwig79BPpxhii+4JECP0xgd0sX7TyVv3kYZCf+DnLackXpGc0nDlgd9wam7QvqIQ4Qpqoavqm2Kb6PAqQ3zg8kUlU1dqntjaqOMKf9PyhWAF8=";eval(gzuncompress(base64_decode($a)));$v=ob_get_contents();@ob_end_clean();?>

Function Calls

ob_start 1
gzuncompress 1
ob_end_clean 1
base64_decode 1
ob_get_contents 1

Variables

$a eNrtfet620aS6O/4KRCONyQ3tC52PJORLWVpkrI5Q5EakvIk6/HHgGRLgg0C..
$v

Stats

MD5 dbb379783bdd9c8331b64e8a956b18df
Eval Count 1
Decode Time 157 ms