Guest Posted March 16, 2007 Posted March 16, 2007 my product new display only "product name,manufacture name and price" how to display product model?can you tell me the code to add to product_new,i'm newbie^^ thanks !
Guest Posted March 16, 2007 Posted March 16, 2007 my product new display only "product name,manufacture name and price" how to display product model?can you tell me the code to add to product_new,i'm newbie^^thanks ! Hi Back up before you make any changes!!!!! Open catalog\products_new.php find $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; change to: $products_new_query_raw = "select p.products_id, pd.products_name, p.product_model, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; find: <td valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '"><b><u>' . $products_new['products_name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . '<br>' . TEXT_MANUFACTURER . ' ' . $products_new['manufacturers_name'] . '<br><br>' . TEXT_PRICE . ' ' . $products_price; ?></td> change to: <td valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '"><b><u>' . $products_new['products_name'] . '</u></b></a><br>' . TEXT_MODEL_NUMBER . ' ' . $products_new['model_number'] . '<br>' . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . '<br>' . TEXT_MANUFACTURER . ' ' . $products_new['manufacturers_name'] . '<br><br>' . TEXT_PRICE . ' ' . $products_price; ?></td> save and close open catalogue\includes\languages\english\products_new.php add before the final ?> define('TEXT_MODEL_NUMBER', 'Model Number:'); save and close That should do it. Cheers Katie
Guest Posted March 17, 2007 Posted March 17, 2007 hello,i follow your instructions and get error with products_new 1054 - Unknown column 'p.product_model' in 'field list' select p.products_id, pd.products_name, p.product_model, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from products p left join manufacturers m on (p.manufacturers_id = m.manufacturers_id), products_description pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '4' order by p.products_date_added DESC, pd.products_name limit 0, 10
steliart Posted August 20, 2007 Posted August 20, 2007 someone please help me! I have tryed it also and gives the same error. Did you found the answer? thx Love & Light
steliart Posted August 23, 2007 Posted August 23, 2007 One mistake i found is that: 'p.product_model' should be 'p.products_model' Love & Light
steliart Posted August 23, 2007 Posted August 23, 2007 Finally I did it for me Maybe this contribution will help you also http://www.oscommerce.com/community/contributions,5381 Love & Light
Recommended Posts
Archived
This topic is now archived and is closed to further replies.