Post by dmbrownfield » Fri Jan 02, 2009 7:36 am

When I originally typed in my product descriptions, I selected Comic Sans MS (large) every time and I noticed last week that this type face and size is only used hit & miss in my catalog so I changed it in
product.css and it still is using whatever the OpenCart default is for over half of my products.  Is there somewhere else I need to change the code?  And, why do some products have the type/size I selected and others do not?  Thanks much and

HAPPY NEW YEAR TO EVERYONE !!!!!! :-* :-*

New member

Posts

Joined
Fri May 09, 2008 12:37 am

Post by Qphoria » Fri Jan 02, 2009 9:43 am

CSS is a powerful beast, but can be confusing the way that affected levels are cascaded.

For example
if you set all links to red in the default.css
a {
color: FF0000;
}

and then set product.css to have all green links
a {
color: 00FF00;
}

Then it would show red links up until the point where the product.css file was loaded in the middle of the page, which would override the red links to be green. So all links from that point on would be green. Normally, pages shouldn't load CSS in the middle like that so the last loading css would be the final override.

So you need to find which CSS affects the fonts that you want. Best way is to use FF's web developer extension and edit the CSS on the fly and see the outcome instantly (without actually changing anything permanently). Then mimic that change when you found it in the actual css file.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by dmbrownfield » Fri Jan 02, 2009 3:24 pm

Oh my gawd - this is going to be a VERY useful toolbar.  Thanks and I'm sure you'll be hearing from
me when I get into using it . ;D

New member

Posts

Joined
Fri May 09, 2008 12:37 am

Post by bthirsk » Fri Jan 02, 2009 10:21 pm

dmbrownfield wrote: And, why do some products have the type/size I selected and others do not?  Thanks much and
If this is happening some where where you have a shorten description such as category display or
latest/featured/specials modules, it is a problem with how text is chopped.

You can't included formatting in text that is inadvertently chopped. It you chop the text before closing
tag, all the following tags are screwed up.

Just look at the source for your page that is not correct. It all the tags from the incorrectly displayed
item on are showing errors, it is because you have chopped the text before a closing tag.

Brent


Active Member

Posts

Joined
Wed Sep 03, 2008 11:33 am
Location - Canada

Post by Qphoria » Fri Jan 02, 2009 11:00 pm

that does raise a good point. The description should be parsed to effect only the inner text. OR probably better would be to remove the formatting done by the fckeditor and make it match the format of the category page so that it flows better with that page, then when clicking on the product, it can use the designated format. This ensures that the tags are always controlled.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by bthirsk » Sat Jan 03, 2009 12:56 am

I think I have made that point before.

I think removing formatting from FCK editor is a regressive.
I handle output of description so it does not break the page.
Virtually every description I have has Bold, color, and other formatting.
I have over 1100 products on my autoparts store site, and no broken pages
that I know of.

I have a 1 line description in category, 3 line lines in latest/featured/specials,
and product description is handled by  formatting routines.

If you want to look at it, I just posted a module for related products.
http://forum.opencart.com/index.php/topic,2160.0.html
It is located in library, application the file is string_modify.php

This file has routines to prevent HTML errors and allow formating to
be included in chopped descriptions.

I think we have an acceptable Editor in FCK, we just need to control the output.

Brent


Active Member

Posts

Joined
Wed Sep 03, 2008 11:33 am
Location - Canada

Post by Qphoria » Sat Jan 03, 2009 1:22 am

maybe.. But you might have size 32 font on the product page. but You don't want that on the category page, as you'd want that to stay normal size to match the rest of the list.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by bthirsk » Sat Jan 03, 2009 1:48 am

Would you not still have that option.
If you want different font sizes on different pages,
format on the page and don't format in FCK editor.
But that should be the developers option.

If you change the code to remove all FCK Output to
strip tags and formatting, you have removed options,
making things too ridge.

Brent


Active Member

Posts

Joined
Wed Sep 03, 2008 11:33 am
Location - Canada

Post by Qphoria » Sat Jan 03, 2009 2:33 am

I suppose.
One problem I see tho is that if your truncated description lands on a tag. You can't very well close the table tag if the td and tr aren't closed and it might not even be in the right spot.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by bthirsk » Sat Jan 03, 2009 3:25 am

I agree, but should one include tables in FCK.
I use it for formatting Text, Bold, Font size, color.
I think that should be the only type of formatting one should use.

My code even removes tags, both opening and closing.
The only line formatting tags that I believe should be used are
and one for description line breaks.
That is how I do it, anyway.

Brent


Active Member

Posts

Joined
Wed Sep 03, 2008 11:33 am
Location - Canada

Post by Qphoria » Sat Jan 03, 2009 3:31 am

I've used tables in the past for displaying some data.. like specs, or an episode list on a dvd.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by dmbrownfield » Sat Jan 03, 2009 5:41 am

I looked at several pages and this is what I found.

The code for products the way I want them is:


Isn't this saying exactly the same thing, just in a different order?  or am I missing something?

Cheers !

New member

Posts

Joined
Fri May 09, 2008 12:37 am

Post by bthirsk » Sat Jan 03, 2009 6:04 am

Which one works.
It can make a difference in what order you apply the formatting.

For example, if you apply color, then bold, it will work.
If you apply bold to an item and then a color, color won't work.
It will remain black default.
Which ever method works, apply formatting in that order.

A good HTML reference book will explain the proper order of tags.

ps
here is an example that works
For Maximum Performance:

Recommended Air Pressure 90 PSI
Last edited by Anonymous on Sat Jan 03, 2009 6:11 am, edited 1 time in total.

Brent


Active Member

Posts

Joined
Wed Sep 03, 2008 11:33 am
Location - Canada

Post by dmbrownfield » Sat Jan 03, 2009 10:41 pm

ok, I understand about the order.  BUT....why are product descriptions showing up different when I entered them all the same way?  I'm talking about the original descriptions I typed in for every new product I created.

New member

Posts

Joined
Fri May 09, 2008 12:37 am

Post by bthirsk » Sun Jan 04, 2009 2:01 am

When you type your description, I assume you are using the icons to format.
If you high lite text, format with say bold, add more text, then go back and
do some other formatting like change font, this can occur.

I found it is best to do all formatting in one operation in an order that works
so as to not embed one tag in another.

Brent


Active Member

Posts

Joined
Wed Sep 03, 2008 11:33 am
Location - Canada

Post by dmbrownfield » Sun Jan 04, 2009 5:18 am

Just to set the record straight:  I typed all my product descriptions in whatever the default is, then
highlighed it all, used the icon to change all the type to Comic-San-MS and then used the icon to change the font size to large.  >:(

But, most importantly, is there a way for me to get all my product descriptions in the same type size and type style without having to type most of them over again?

New member

Posts

Joined
Fri May 09, 2008 12:37 am

Post by Qphoria » Sun Jan 04, 2009 7:37 am

No if you are going to have mixed styles in the description:
This is not the same

This is not the same

This is not the same
Yes if your product description font is going to be the same from start to finish:
This is all the same

This is all the same

This is all the same
You can edit the product.css file and change (or add) a font-family: comic sans. (See google for proper css syntax)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 29 guests