Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Change colour of product boxes on home page


Recommended Posts

<_< Tried that but don't know which bit to change


This is usual bit to change below but note this will alter the colour of all infoboxes including the new products, to just change the new products you would have to make a new class but with possibly just a few changes.


Old css class:


.infoBoxContents {
?font-family: Verdana, Arial, sans-serif;
?font-size: 10px;
?background: #fffbf0;
?color: #000000;


New class test: Just change the background to the required colour, then paste this code to the stylesheet.css file at the base done, you now have a new class.


.newproductsbox {
?font-family: Verdana, Arial, sans-serif;
?font-size: 10px;
?background: #fffbf0;
?color: #000000;


You would now need to call this new class in the new products boxes so go into the catalog/includes/modules/new_products.php and make some changes to use the new class newproductsbox, I have included below a snip of html code I use from my new_products.php file, it will use the new class I have above ok, now the below html snip in new_products.php, at about line 32 of new_products.php you should have this,

'text' => '

Replace everything after with the below code.


 <table width="150" border="0" cellspacing="0" cellpadding="0">
? ?<td><span class="newproductsbox"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></span></td>
? ?<td><span class="newproductsbox">Price: ' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])).'</span></td>
? ?<td><span class="newproductsbox"><a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id'], 'NONSSL') . '">' . tep_image_button('addtocart.gif', TEXT_BUY . $new_products['products_name'] . TEXT_NOW) . '</a></span></td>

? ?$col ++;
? ?if ($col > 2) {
? ? ?$col = 0;
? ? ?$row ++;
? ?}

?new contentBox($info_box_contents);
<!-- new_products_eof //-->


I hope this helps, it will change the box layout a little but nothing much try it, what it does give you is the ability to change the look of this box very simply.


Regards :thumbsup:

Link to comment
Share on other sites


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

  • Create New...