Calificación:
  • 0 voto(s) - 0 Media
  • 1
  • 2
  • 3
  • 4
  • 5
Nula sincro.
#1
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??????????????????????????????????
Responder
#2
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.
Oscar Guirado
Sysme Software

Sysme Software
Veravap
Responder
#3
Nada.
Responder
#4
Lo has probado con otro producto?
Oscar Guirado
Sysme Software

Sysme Software
Veravap
Responder
#5
Si, tengo varios productos con el mismo problema.
Responder
#6
Cambié la última línea desde el símbolo del dolar hasta el final.
Responder
#7
HTTP/1.1 500 IMTERNAL SERVER ERROR
Tengo este mensaje cada poco...¿?
Responder
#8
?? puedes pasarme el fichero entero por aquí?
Oscar Guirado
Sysme Software

Sysme Software
Veravap
Responder
#9
(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 . '\'');
Responder
#10
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);
       }
   }
}
?>
Oscar Guirado
Sysme Software

Sysme Software
Veravap
Responder


Salto de foro:


Usuarios navegando en este tema: 3 invitado(s)

Contáctanos | Sysme Software | Volver arriba | | Archivo (Modo simple) | Sindicación RSS