Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing Particular Product Name's Font Color or Particular Price Tag's Color


prinshaw

Recommended Posts

Posted

Hello Everybody,

 

I have a site shoppiiers.com and want o change the color of only particular product's name or price as in like FREE SAMPLE to RED color as present on the site.

 

I have done it using directly <font color="RED"> from admin panel while assigning products name but the code is appearing on the site when we zoom the image and also on the TAB.

 

Please give solution how to do it in the Stylesheet.css

  • 2 weeks later...
Posted

You need to add the style not only to your css stylesheet, but also assign it to the listing. Go to catalog/includes/modules/new_products.php

 

This line is the one that shows all of the product info:

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

 

so add your style to it:

<a style="color:red;" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a>

---OR--

<a class="color-red" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a>

and then add to your stylesheet:

.color-red {

color:red;

}

 

then you won't have to individually try to add it on every product, note that this change would only affect the new_products.php, if you wanted it sitewide you would need to add your style into the other files as well.

  • 1 month later...
Posted

Hey lost_in_normalcy thanks for ua guidance bt the thing is that i want to change only particular product name's font color or particular price tag's color.

 

I have tried the above code but it assigns the same color to all the product name rather than any specific.

So please give the solution.

Archived

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

×
×
  • Create New...