Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Listing Tweak


Guest

Recommended Posts

Posted

Hi, folks. I'm trying to tweak my product listing (category) area. I'd like to have a small text link in place of the Buy Now image, but I don't speak php very well. I'd also like a bit of text saying Read more... to link into the product's page (I have customers emailing regularly that can't figure out to hover on the product name or image to find the link). Here's the Buy Now section:

		  case 'PRODUCT_LIST_BUY_NOW':
		$lc_align = 'center';
		$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

 

and the Read more... could go anywhere but ideally I'd like it after the short description contribution I added. It could just as easily go immediately under the Buy Now link.

I just want small text links (underlined) for each. Any help would be greatly appreciated.

Posted

Hey, wow! I actually figured this one out so I thought I shoud share it. The end result is nice.

		  case 'PRODUCT_LIST_BUY_NOW':
		$lc_align = 'center';
		$lc_text = '<a href="' . tep_href_link(basename(FILENAME_DEFAULT), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . TEXT_BUY_NOW . '</a><br><br>'.
		$lc_text = '?<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . TEXT_READ_MORE . '</a>?';

in place of the one shown above in product_listing.php.

 

 

You'll need to add this to english.php, too :

 define('TEXT_BUY_NOW', '<u>Buy Now</u>');
define('TEXT_READ_MORE', '<u>Read More...</u>');

 

This is what it looks like in place of the buy it now image:

buylinks.jpg

Archived

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

×
×
  • Create New...