Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Display manufacturer name below product name.


Guest

Recommended Posts

Hi everyone,

Does anybody know if there is a way to display the manufacturer name below the product name on the product listing page?

Currently it displays in a column next to the product name.

Many thanks.

Link to comment
Share on other sites

I havnt tested but something like this should work in catalog/modules/product_listing.php

 

case 'PRODUCT_LIST_NAME':

 

$lc_align = 'center';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a>';

$lc_text = ' ' . $listing[$x]['manufacturers_name'] . ' ';

} else {

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a> ';

$lc_text = ' ' . $listing[$x]['manufacturers_name'] . ' ';

if (PRODUCT_LIST_DESCRIPTION && $listing[$x]['products_description'] && PRODUCT_LIST_DESCRIPTION_MAX_LENGTH)

$lc_text .= '<br><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="productDesc" align="center">' . tep_flatten_product_description($listing[$x]['products_description'], ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing[$x]['products_id']) . '"></a>') . '</td></tr></table>';

}

 

dont copy this code since, i use a heavily modified site....here in this example you can see where i have made the changes

$listing[$x]

this may be different for you...

 

also in my code i have made the description appear under the product name..hope this helps

l8ter

Link to comment
Share on other sites

I havnt tested but something like this should work in catalog/modules/product_listing.php

 

 

 

dont copy this code since, i use a heavily modified site....here in this example you can see where i have made the changes

$listing[$x]

this may be different for you...

 

also in my code i have made the description appear under the product name..hope this helps

 

Hi juniorprg,

I tried placing $lc_text = ' ' . $listing[$x]['manufacturers_name'] . ' '; into my code to get the following:

 

case 'PRODUCT_LIST_NAME':

$lc_align = '';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';

$lc_text = ' ' . $listing[$x]['manufacturers_name'] . ' ';

} else {

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';

$lc_text = ' ' . $listing[$x]['manufacturers_name'] . ' ';

}

 

However the manufacturer now replaces the product name, does the above look correct to you?

Thanks for your help i appreciate it.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...