Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to make product model display in product_new?


Guest

Recommended Posts

Posted

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 !

Posted
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

Posted

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

  • 4 months later...
Posted
someone please help me!

 

 

I have tryed it also and gives the same error.

Did you found the answer?

 

thx

Love & Light

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...