Il produttore nel dettaglio prodotti.

Questo forum è dedicato alle discussioni riguardanti le contribution per osCommerce

Moderatore: mod Generali

Rispondi
paolo
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 29/04/2004, 0:00
Località: USA

Il produttore nel dettaglio prodotti.

Messaggio da paolo »

Ciao,
come si può inserire il produttore (manufactures) nel dettaglio dei prodotti? (product_info)

C'è già in giro qualche cosa?

Grasiie

Paolo
Avatar utente
itan80
membro Senior
membro Senior
Messaggi: 309
Iscritto il: 09/07/2004, 0:00
Località: Italia
Contatta:

Spero hai già risolto, altrimenti dai un'okkiata a questo:

Messaggio da itan80 »

************************************************************************************************
In catalog/product_info.php
RIGHT AFTER
=====================================================================
$product_check = tep_db_fetch_array($product_check_query);
=====================================================================
ADD THESE FOLLOWING LINES
=====================================================================
// Start "Category & Manufactureres Name in Product_info"
$categories_name_query = tep_db_query("select c.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " c where c.categories_id = '" . (int)$current_category_id . "' and c.language_id = '" . (int)$languages_id . "'");
$category = tep_db_fetch_array($categories_name_query);
// Start "Category & Manufactureres Name in Product_info"
=====================================================================
AND SEARCH FOR THE FOLLOWING LINE (AROUND LINE 70)
ADD REPLACE IT WITH THIS FOLLOWING CODE BLOCK
PLEASE NOTE I COULD NOT FIGURE OUT A WAY TO OUTER JOIN THESE TABLE USING THE GLOBAL
DEFINES FOR THE TABLE NAMES (I am not very familiar with either php or mysql syntax, you are welcome to take a
shot at it and update this contribution accordingly)
=====================================================================
// Start "Category & Manufactureres Name in Product_info"
$product_info_query = tep_db_query("select products.products_id, products_description.products_name, products_description.products_description, products.products_model, products.products_quantity, products.products_image, products_description.products_url, products.products_price, products.products_tax_class_id, products.products_date_added, products.products_date_available, products.manufacturers_id, manufacturers.manufacturers_name FROM products LEFT JOIN manufacturers ON products.manufacturers_id = manufacturers.manufacturers_id left join products_description on products_description.products_id = products.products_id WHERE products.products_status = '1' and products.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and products_description.language_id = '" . (int)$languages_id . "'");
// End "Category & Manufactureres Name in Product_info"
=====================================================================
SEARCH FOR THIS LINE
$products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
=====================================================================
AND REPLACE IT WITH
=====================================================================
// Start "Category & Manufactureres Name in Product_info"
$products_name = $product_info['products_name'] . '<br><span class="smallText">' . $product_info['products_model'] . ' </span>' . ' <span class="smallText"> ' . $category['categories_name'] . '</span>' . ' <span class="smallText">[Mfg:' . $product_info['manufacturers_name'] . ']</span>';
// End "Category & Manufactureres Name in Product_info"
=====================================================================
AND SEARCH FOR THE FOLLOWING TEXT
=====================================================================
else {
$products_name = $product_info['products_name']
=====================================================================
AND REPLACE IT WITH
=====================================================================
else {
$products_name = $product_info['products_name'] . '<br><span class="smallText"> ' . $category['categories_name'] . '</span>' . ' <span class="smallText">[Mfg:' . $product_info['manufacturers_name'] . ']</span>';
=====================================================================
YOU ARE DONE

=====================================================================

cià cià
™ ÅñЮ€Å ™

www.mistertemplate.it - Template x osCommerce...
www.microdirect.it - Distribuzione Informatica
Rispondi