Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do we bold or highlight text


ajsinopoli

Recommended Posts

Folks,

 

How can we randomly enlarge text in our product descritions to highlight or emphasize things. See this link for example:

 

http://www.janddwines.com/osc/product_info.php?products_id=692

 

 

If we wanted to highlight a particular sentance in that product description is there a way to do it?

 

Please let me know.

 

Thanks

Tony

Link to comment
Share on other sites

Yes you can use html to bold text

if you go to your admin and in the product description

you can bold sentances like this

 

<b>sentance</b>

 

the above code will bold that word <b> opens the statement and </b> closes it

if you need any further help please IM me or leave a message in this topic.

Link to comment
Share on other sites

Yes you can use html to bold text

if you go to your admin and in the product description

you can bold sentances like this

 

<b>sentance</b>

 

the above code will bold that word <b> opens the statement and </b> closes it

if you need any further help please IM me or leave a message in this topic.

 

Thanks that worked awesome, now to take it one step further can we enlarge the text that way or add a weight to how much it gets bolded.

Link to comment
Share on other sites

Hey Tony,

 

Although I still use the <b> tag myself for bold text (I'm wicked old school LOL) you should get in the habit of using <strong>.

 

This might be of help for you formatting text - HTML Text Formatting.

 

 

 

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

Thanks that worked awesome, now to take it one step further can we enlarge the text that way or add a weight to how much it gets bolded.

Why don't you use CSS? Add a style to your stylesheet like so

.productDescriptionHighlight {
 font-weight: bold;
 font-color: #FF0000;
 font-size: 16px;
}

Then for any product description you want highlight add this

<span class="productDescriptionHighlight">Your sentence here.</span>

Link to comment
Share on other sites

Thanks Brian we are new to this. I will give this a try also. It would be nice if there was some sort of cheat sheet for the stylesheet.css file. Someone already helped us in another area of this file and we had no idea how he figured out what to edit.

Thanks again,

Tony

 

 

Why don't you use CSS? Add a style to your stylesheet like so

.productDescriptionHighlight {
 font-weight: bold;
 font-color: #FF0000;
 font-size: 16px;
}

Then for any product description you want highlight add this

<span class="productDescriptionHighlight">Your sentence here.</span>

Link to comment
Share on other sites

DUH...

 

Nice call Brian thumbsup.gif

 

Wonder where my heads been... oh yeah, panicing over my osC problems LOL crying.gif

 

Hey Tony,

 

Here's the cheat sheet for the stylesheet.css - click here SHHHH... keep it a secret hehe. tongue.gif

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

Thanks Brian we are new to this. I will give this a try also. It would be nice if there was some sort of cheat sheet for the stylesheet.css file. Someone already helped us in another area of this file and we had no idea how he figured out what to edit.

Thanks again,

Tony

 

 

I tried this entry in my stylesheet and nothing changed. hum..:-(

Link to comment
Share on other sites

I tried this entry in my stylesheet and nothing changed. hum..:-(

 

 

Remember style sheets are cached, so you may have to clear that b4 u see changes.

 

download firefox and its web developer & firebug plugins, then use that to find/edit the css of any element on a page.

 

This page gives details on the css objects for osC

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

All of the above are considered correct. BUT...for accessibility and semantically correctness, you need to decide why and how the text needs to be highlighted.

 

This

<b>blah</b>

is different to this

<strong>blah</strong>

is different to this

<span style="font-weight: bold">blah</span>

and you could also use this

<em>blah</em>

 

Which one you use depends upon what you need to do - simply bold a piece of text or give it a special emphasis. It's kinda hard to explain, if I can find some relevant outside links I'll post them.

Link to comment
Share on other sites

  • 2 weeks later...

Here's a tricky one which can't be fixed by CSS alone....

 

On the Shipping Checkout Screen, I just want to bold the Shipping Price.

 

The element on the stylesheet.css (line 48) is:

 

td.main, p.main {

font-family:Verdana,Arial,sans-serif;

font-size:11px;

line-height:1.5;

}

 

... but the problem is that ALL the text on the page will be bolded if I add "font-weight: bold;" to the CSS.

Anyone have any thoughts on singling out just this Shipping Price Element, so I can bold it?

Link to comment
Share on other sites

Sure it can be made bold, with or without CSS. You need to find the code that outputs the price (I assume that you mean something like $39.95, rather than Shipping Price text). Wrap HTML around it in whatever style you want: <b>, <em>, <strong>, <span style="font-weight: bold;">, or <span class="boldPrice"> and a CSS entry for .boldPrice. The hardest part will be finding the PHP code that outputs the price itself -- it will take some searching, but if you see the page name in the browser, at least you can narrow it down to one file to look in.

 

The example you gave will bold an entire table cell or paragraph (with class "main"), which is more than you want. You need to find the actual price text being output and highlight that specifically.

Link to comment
Share on other sites

You need to find the code that outputs the price (I assume that you mean something like $39.95, rather than Shipping Price text).

This worked for me. Try:

 

<td class="main"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></td>

 

Optionally, you can change "main" to something else and modify your stylesheet instead. Then you can play around all you want.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...