Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

product listings


Guest

Recommended Posts

thanks :)

how would i output the manufacturer properly? i've got the values set on the product listings config, but if there's no manufacturer, the link still displays (hidden to the naked eye, but if i view the source, the link destination is a 404)

 

i've tried:

$manufacturer_result = $listing['manufacturers_id'];
if ( $manufacturer_result == 0 ) {
echo "";
} else {
echo 'manufactuerer link: <a href="' . tep_href_link(FILENAME_DEFAULT, '&manufacturers_id=' . $listing['manufacturers_id']) . '">' . sprintf($listing['manufacturers_name']) . '</a>?';

}

which WORKS... but all of the manufacturer links are at the top of the page, they're not aligned with the product td at all

Link to comment
Share on other sites

yea you cannot echo in the product listing because the output is built from the $list_box_contents array. So you pass the info you want to output in it. Look how the manufacturer is done there for instance:

 

		  case 'PRODUCT_LIST_MANUFACTURER':
		$lc_align = '';
		$lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> ';
		break;

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...