Foro de ayuda y soporte técnico de Sysme Software
Nula sincro. - Versión para impresión

+- Foro de ayuda y soporte técnico de Sysme Software (https://www.sysme.net/foro)
+-- Foro: Software Sysme (Español) (https://www.sysme.net/foro/forumdisplay.php?fid=3)
+--- Foro: Sysme Tpv (https://www.sysme.net/foro/forumdisplay.php?fid=4)
+---- Foro: Ayuda General Sobre Sysme Tpv (https://www.sysme.net/foro/forumdisplay.php?fid=17)
+---- Tema: Nula sincro. (/showthread.php?tid=6228)

Páginas: 1 2


Nula sincro. - FRAN948 - 01-10-2019

Cada vez que quito la pestaña de sincronizar por acabarse el producto y al recibirlo de nuevo añadiéndolo en el estocaje, la web me dice producto no encontrado, por esto tengo que estar cambiando el nombre para poder visualizarlo en la web.
Que hago mal y que no aparece en las instrucciones??????????????????????????????????


RE: CABREO MÁXIMO - sysme - 01-10-2019

Buenas Fran,

Esto ocurre porque tuvimos un error en una versión anterior por la que la URL AMIGABLE de los productos se quedaba en la base de datos de Opencart y, por tanto, al volver a activar el producto se producía un duplicado y no podía mostrarse.

Para solucionarlo edita el fichero C:\SYSME\SGC\xampp\htdocs\sysmetpvopencart\remove.php y modifica la penultima línea dejandola así:

$result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'url_alias where query = \'product_id=' . $product_id . '\'');

Guarda el fichero y vuelve a cargar el módulo de Opencart desde Sysme Tpv.

Ya me dices.


RE: CABREO MÁXIMO - FRAN948 - 01-10-2019

Nada.


RE: CABREO MÁXIMO - sysme - 01-10-2019

Lo has probado con otro producto?


RE: CABREO MÁXIMO - FRAN948 - 01-10-2019

Si, tengo varios productos con el mismo problema.


RE: CABREO MÁXIMO - FRAN948 - 01-10-2019

Cambié la última línea desde el símbolo del dolar hasta el final.


RE: CABREO MÁXIMO - FRAN948 - 01-10-2019

HTTP/1.1 500 IMTERNAL SERVER ERROR
Tengo este mensaje cada poco...¿?


RE: CABREO MÁXIMO - sysme - 01-10-2019

?? puedes pasarme el fichero entero por aquí?


RE: CABREO MÁXIMO - FRAN948 - 01-10-2019

(01-10-2019, 01:21 PM)sysme escribió: ?? puedes pasarme el fichero entero por aquí?

<?php


// Configuration
require_once '../config.php';
require_once './token.php';
if ($token != $_POST['token']) {
    die;
}
if (!isset($_POST['tipo'])) {
    die;
}
$conexion = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD) or die('Error');
mysqli_set_charset($conexion, 'utf8');
mysqli_select_db($conexion, DB_DATABASE);
if ($_POST['tipo'] == 'CAT') {
    $category_id = '';
    $result = mysqli_query($conexion, 'select category_id from ' . DB_PREFIX . 'category where image = \'data/' . $_POST['item'] . '.jpg\'');
    if (mysqli_num_rows($result) > 0) {
        $row = mysqli_fetch_array($result);
        $category_id = $row['category_id'];
        if ($category_id != '') {
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category_description where category_id = ' . $category_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category_path where category_id = ' . $category_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category_path where path_id = ' . $category_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category_filter where category_id = ' . $category_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category_to_layout where category_id = ' . $category_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category_to_store where category_id = ' . $category_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'url_alias where query = \'category_id=' . $category_id . '\'');
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category where category_id = ' . $category_id);
        }
    }
}
if ($_POST['tipo'] == 'PRO') {
    $product_id = '';
    $result = mysqli_query($conexion, 'select product_id from ' . DB_PREFIX . 'product where model = \'' . $_POST['item'] . '\'');
    if (mysqli_num_rows($result) > 0) {
        $row = mysqli_fetch_array($result);
        $product_id = $row['product_id'];
        if ($product_id != '') {
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_description where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_to_store where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_image where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_attribute where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_discount where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_filter where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_option where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_option_value where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_related where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_reward where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_special where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_to_download where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_to_layout where product_id = ' . $product_id);
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'url_alias where query = \'producto_id=' . $product_id . '\'');
            $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'url_alias where query = \'product_id=' . $product_id . '\'');


RE: CABREO MÁXIMO - sysme - 02-10-2019

Te pongo el fichero completo, copialo todo incluidos los corchetes de cierre finales:


Código:
<?php


// Configuration
require_once '../config.php';
require_once './token.php';
if ($token != $_POST['token']) {
   die;
}
if (!isset($_POST['tipo'])) {
   die;
}
$conexion = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD) or die('Error');
mysqli_set_charset($conexion, 'utf8');
mysqli_select_db($conexion, DB_DATABASE);
if ($_POST['tipo'] == 'CAT') {
   $category_id = '';
   $result = mysqli_query($conexion, 'select category_id from ' . DB_PREFIX . 'category where image = \'data/' . $_POST['item'] . '.jpg\'');
   if (mysqli_num_rows($result) > 0) {
       $row = mysqli_fetch_array($result);
       $category_id = $row['category_id'];
       if ($category_id != '') {
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category_description where category_id = ' . $category_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category_path where category_id = ' . $category_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category_path where path_id = ' . $category_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category_filter where category_id = ' . $category_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category_to_layout where category_id = ' . $category_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category_to_store where category_id = ' . $category_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'url_alias where query = \'category_id=' . $category_id . '\'');
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'category where category_id = ' . $category_id);
       }
   }
}
if ($_POST['tipo'] == 'PRO') {
   $product_id = '';
   $result = mysqli_query($conexion, 'select product_id from ' . DB_PREFIX . 'product where model = \'' . $_POST['item'] . '\'');
   if (mysqli_num_rows($result) > 0) {
       $row = mysqli_fetch_array($result);
       $product_id = $row['product_id'];
       if ($product_id != '') {
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_description where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_to_store where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_image where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_attribute where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_discount where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_filter where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_option where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_option_value where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_related where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_reward where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_special where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_to_download where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product_to_layout where product_id = ' . $product_id);
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'url_alias where query = \'product_id=' . $product_id . '\'');
           $result2 = mysqli_query($conexion, 'delete from ' . DB_PREFIX . 'product where product_id = ' . $product_id);
       }
   }
}
?>