Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how not to display price on index page under what's new for the month


Tidbeck

Recommended Posts

Wondering what file and how to edit so that the product prices dont show up on the main page under what's new for the month. I want the customer to have to click to the product detail page for price info. A button there that links to the product detail page would be best.

 

 

thanks

Link to comment
Share on other sites

Hello again. ;)

 

The file you are looking for would be in /catalog/includes/modules/new_products.php

 

On a stock install, around line 33 you will see:

 

$new_prods_content .= '<td width="33%" align="center" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br />' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</td>';

 

Delete the following:

 

. $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id']))

 

Make sure to leave the . '</td>'; at the end though.

 

Viola, price is gone. ;)

 

Hope that helps!

 

Peace,

Chris

Link to comment
Share on other sites

Thanks for the help!

my php looks a bit differen though, not sure if it is that i have ver 2.2

i tried a few different ways but no luck

 

here is the code around that section in the new_product.php

 

 

$info_box_contents = array();

while ($new_products = tep_db_fetch_array($new_products_query)) {

$info_box_contents[$row][$col] = array('align' => 'center',

'params' => 'class="smallText" width="33%" valign="top"',

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));

 

$col ++;

if ($col > 2) {

$col = 0;

$row ++;

}

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...