PDA

View Full Version : Cross Sell product Prioritization



davem
10-18-2005, 05:06 PM
There appears to be an error in the file:

catalog/includes/modules/xsell_products.php

$xsell_query (line 14) is currently:

$xsell_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, m.manufacturers_name, p.products_tax_class_id, products_price from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and m.manufacturers_id = p.manufacturers_id and p.products_status = '1' order by xp.products_id asc limit " . MAX_DISPLAY_ALSO_PURCHASED);

this should be:

$xsell_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, m.manufacturers_name, p.products_tax_class_id, products_price from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and m.manufacturers_id = p.manufacturers_id and p.products_status = '1' order by xp.sort_order asc limit " . MAX_DISPLAY_ALSO_PURCHASED);

jpf
10-20-2005, 08:58 AM
Submit it to the bugtracker - explain the error/problems and post the fixed code there.

davem
10-22-2005, 03:29 PM
Now submitted.

Also, please ignore above code as I had previously modified it to include the manufacturer's name. The code submitted to the bugtracker relates to the original downloaded in V2RC2.