Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to make something <b>bold</b> or <u>underlined</u> directly in code?


oneeezy

Recommended Posts

Posted

I know this has to be super easy.. I'm not wanting to edit this in the stylesheet.css because i dont want all of my words in the box to be bold or underlined. Im actually trying to make the product name underlined and the price bold and the product image with a border of 1px around it.

 

I'm trying to edit the file:

/includes/boxes/featured.php

 

and this is the code that needs the corrections:

$info_box_contents = array();
   $info_box_contents[] = array('align' => 'center',
                                'text' => '<br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br>' . $new_price);

 

I know that this one is the product name that needs the underline:

<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a>

 

I know that this one is the product image that needs the 1px border:

<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>

 

I know that this one is the price that needs the bold:

 . $new_price);

 

 

Now.., for the life of me i cannot figure out how to do it right!.. its driving me crazy... can anyone explain the best method? ;)

Windows Phone 7 Forum | Tricks, Tips, Hacks, Apps, and Games for your Windows Phone 7!
Posted

For bold and underlined have you tried this?

 

$info_box_contents = array();
   $info_box_contents[] = array('align' => 'center',
                                'text' => '<br><u><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a></u><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><strong>' . $new_price . '</strong>');

 

 

Make sure you are adding html inside of ' marks and concatenate with periods.

Posted

For bold and underlined have you tried this?

 

$info_box_contents = array();
   $info_box_contents[] = array('align' => 'center',
                                'text' => '<br><u><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a></u><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><strong>' . $new_price . '</strong>');

 

 

Make sure you are adding html inside of ' marks and concatenate with periods.

 

hmmm, well that worked but not all the way.., you definently helped me tons tho. http://66.49.195.144/index.php , if you look to the right you will see the featured products thing.. the link on top is blue with a black underline but it needs to be a blue underline and im still trying to get a 1px black border around the image..i think if i play around with it enough now i will be able to get it

Windows Phone 7 Forum | Tricks, Tips, Hacks, Apps, and Games for your Windows Phone 7!
Posted

You could try using an inline style tag in the link instead. style="text-decoration:underline; color:blue;"

 

You could try the same thing with the image.

style="border-style:solid; border-width:1px;"

 

 


$info_box_contents = array();    
   $info_box_contents[] = array('align' => 'center',                                 
                                'text' => '<br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '" style="text-decoration:underline; color:blue;">' . $random_product['products_name'] . '</a><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><strong>' . $new_price . '</strong>');

Posted

You could try using an inline style tag in the link instead. style="text-decoration:underline; color:blue;"

 

You could try the same thing with the image.

style="border-style:solid; border-width:1px;"

 

 


$info_box_contents = array();    
   $info_box_contents[] = array('align' => 'center',                                 
                                'text' => '<br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '" style="text-decoration:underline; color:blue;">' . $random_product['products_name'] . '</a><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><strong>' . $new_price . '</strong>');

 

thanks i'll give that a shot

Windows Phone 7 Forum | Tricks, Tips, Hacks, Apps, and Games for your Windows Phone 7!
Posted

well.. i got the underlined color to turn blue again and i got the price to turn bold but for some reason i cannot get the border around image????? :blink: im stumped.

Windows Phone 7 Forum | Tricks, Tips, Hacks, Apps, and Games for your Windows Phone 7!

Archived

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

×
×
  • Create New...