Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

border around products on the home page


Guest

Recommended Posts

Hello

 

I have oscommerce 2.3.1 installed and was wondering how I can put a border around each of the products and the products text and price on the home page

 

Can anyone help me on how to do this please

 

Thank you

 

Ian

Link to comment
Share on other sites

what is the heading of the products on the main page?? Is it New Products for the month??

 

 

 

 

If it is open your includes/modules/new_products.php find line 33

 

 

 

 

<td width="33%" align="center" valign="top" >

 

 

 

 

and change to

 

 

 

 

<td style="border:1px solid blue;" width="33%" align="center" valign="top" >

 

 

Link to comment
Share on other sites

Hello

 

Yeah it is called New Products For July

 

If I change it to say Featured Products, What would I do then to get a border around each of the products

 

Thank you

 

Ian

Link to comment
Share on other sites

Hello

 

I did what you said but it didn't add a border around each product

 

I changed <td width="33%" align="center" valign="top" > to <td style="border:1px solid blue;" width="33%" align="center" valign="top" >

 

But did't work

 

Would you know why

 

Sorry

 

Thanks

 

Ian

Link to comment
Share on other sites

Hello

 

I did what you said but it didn't add a border around each product

 

I changed <td width="33%" align="center" valign="top" > to <td style="border:1px solid blue;" width="33%" align="center" valign="top" >

 

But did't work

 

Would you know why

 

Sorry

 

Thanks

 

Ian

 

I'm going to give you some different advise. I wouldn't suggest trying to put your styles inline, rather use your CSS. Here is a simple example.

Open catalog/stylesheet.css

 

Add To the bottom of the sheet.:

.newproductsbgtd {
background-color:#3FF; /* this color should make it obvious what area you're working with.. change it to suit your needs or remove if if not needed */
border-top: solid 1px #300;
border-right: solid 1px #300;
}

 

Open catalog/includes/modules/new_products.php

 

FIND:

$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>';

 

CHANGE TO:

$new_prods_content .= '<td width="33%" align="center" valign="top" class="newproductsbgtd"><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>';

 

Again this is a very basic example. The only thing I'm doing is creating a class, and adding it to the <td> there are more tags you can add classes to, like the <table> and <tr>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...