Editing product had not category. Fixed.

When clicking in any row of Product Name column, the page points to product edit page but the category of the product in this link is "missing" and it does not match to the real category that the products belongs to. You can check it above, seeing that it marks "New product in Top".

To solve this, just a few changes quite easy:

Find this:

$product_query = tep_db_query("SELECT products_name FROM products_description WHERE products_id = '" . (int)$id . "' AND language_id = '" .

($language_id > 0 ? (int)$language_id : '3') . "'");
$product = tep_db_fetch_array($product_query);

Below it you must add this:

$product_query2 = tep_db_query("SELECT categories_id FROM products_to_categories WHERE products_id = '" . (int)$id . "'");
$product2 = tep_db_fetch_array($product_query2);


And find this:


' .

$product['products_name']; ?>



Replace with this:


' . $product['products_name']; ?>


Sorry by muy poor English, I'm spanish.


En Español:

Al editar un producto, este no tiene categoria.

Cuando pinchas en cualquier fila de la columna Product Name, la pagina se va a la edicion del producto, pero sin categoria, es decir, esta como perdida, y en

el texto grande de arriba no se muestra la categoria real al que pertenece el producto, esto se puede comprobar viendo que arriba pone "Nuevo Producto en

Principio". Solucion facil y rapida de instalar.

More...