"Related Products" text not visible in product view

Rainman - July 3, 2009 - 00:53
Project:UC Upsell
Version:6.x-1.15
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:by design
Description

on my products page the background is the same color as my h2 header so the "Related Products" text is invisible, kinda makes ya wonder where those extra products came from without the text! .. the text shows up fine in cart, apparently not using header.

#1

torgosPizza - July 4, 2009 - 17:41

That's something you can fix in your style.css or layout.css file. Just specify a color for the h2 (you can even choose a color for just the h2 tag within the upsell block if you wish).

#2

Rainman - July 7, 2009 - 01:15

ok I have been trying to do my due diligence research-wise, here is what I think I found:

                  <div id="content-bottom" class="region region-content_bottom">
            <div id="block-uc_upsell-0" class="block block-uc_upsell region-odd even region-count-1 count-2">
  <div class="block-inner">

          <h2 class="block-title">Related products:</h2>

is using:

.block h2.block-title{color:#ffffff;

what I was trying to do was

.upsell-block-product h2.block-title{
color: #666;
}

no love

#3

torgosPizza - July 7, 2009 - 03:49

Try

.block-uc_upsell h2.block-title {
  color:#666;
}

instead.

#4

Rainman - July 7, 2009 - 05:19

well huh. I tried that and no love. so on a lark I decided to just re-commit my theme (pixture-reloaded) and I find this is now included:

.block-uc_upsell h2.block-title{color:#787878;}

so I should be able to see that against the white background, ermm but no.

#5

torgosPizza - July 7, 2009 - 16:33

Are you sure there isn't a CSS rule somewhere else that is overriding it? Also, if you're using CSS aggregation, you need to turn it off and turn it back on to rebuild the cached CSS file.

#6

Rainman - July 7, 2009 - 17:27

Well, yes and no? I do believe it is being overridden as it were by the standard h2.block-title, I guess that is really the issue.

Here is what is found in the cached css file:

.block-uc_upsell h2.block-title{color:#787878;}

.block h2.block-title{color:#ffffff;font-size:12px;font-weight:bold;height:22px;margin:0px;padding:5px 0 0 0;text-align:center;}

and here is the html source

<DIV class="region region-content_bottom" id=content-bottom>
<DIV class="block block-uc_upsell region-odd even region-count-1 count-2"
id=block-uc_upsell-0>
<DIV class=block-inner>
<H2 class=block-title>Related products:</H2></DIV></DIV></DIV>

so it seems to me that the .block-uc_upsell is not applied for that line and it is using instead the .block h2.block-title definition.

#7

torgosPizza - July 19, 2009 - 01:03

Try clearing your cache (especially CSS aggregation cache file) and see if that helps. The tags in the Upsell block are pretty easy to directly alter if you drill down in your CSS. If you have a page I can look at, I can help. Paste a URL here and I can take a look.

#8

Rainman - July 19, 2009 - 10:00

I have cleared the cache, even re-applied the theme which seems to rebuild it all but no luck. I have sent PM with the URL as the site is not yet live, Thanks for giving it a look!

#9

torgosPizza - July 19, 2009 - 15:27

I looked at your cached CSS file and you still don't appear to have any "upsell" style declarations there. Are you sure you're editing the correct style.css (or layout.css) file?

In your source file, it has this: /site/sites/default/files/css/css_60601f425a2e39abe32a5ce290491b46.css

When I go to that file, there is nothing with the term "upsell" in it. You need to make sure you go to admin/settings/performance, turn OFF css aggregation, then hit Submit. Go and check your page again (in Internet Explorer it might look like crap because of IE's "no more than 20 CSS files at a time" glitch, so you use Firefox)...

Make your changes to your theme's CSS file, make sure you include something like

.block-uc_upsell .block-title { color: #000; }

which is specific enough for the Upsell block. Then once you see the changes on your page, go back to admin/settings/performance and re-enable CSS aggregation. That should work.

I think the main issue is that you are still using your cached CSS file, as I suspected. When I loaded that file into my browser, I did a search for "upsell" and I found nothing.

#10

Rainman - July 19, 2009 - 15:40

Huh, well ok now you really got me, because when I searched the same css, I find the following:

.block-uc_upsell h2.block-title{color:#787878;}

regardless caching is now turned off, no change.. searching the /site/sites/default/files/color/pixture_reloaded-d59fb76d/style.css now I find where it was originally defined

.block-uc_upsell h2.block-title {
  color:#787878;
}

Same results using Firefox or IE, logged in or not.

color me baffled.

#11

Rainman - July 19, 2009 - 16:11

Oh I realized I can attach the css file, I had saved a copy before I turned off caching.

update: I also just added .block-uc_upsell .block-title { color: #787878; } to make sure the bases were covered.

AttachmentSize
css_60601f425a2e39abe32a5ce290491b46.css_.txt 42.08 KB

#12

torgosPizza - July 19, 2009 - 16:13

I think I figured it out. Your declaration for uc_upsell .block-title comes BEFORE your regular h2.block-title declarations. I looked at your attached CSS file, and here's how it works out:

Line 283:

.block-uc_upsell h2.block-title {
  color:#787878;
}
.block-uc_upsell .block-title { color: #787878; }

Line 320:

.block h2.block-title {
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
height: 22px;
  margin: 0px;
  padding: 5px 0 0 0;
  text-align: center;
}

You need to move your custom declarations to the bottom if you want them to take precedence. CSS styles run top-to-bottom in their hierarchy.

#13

Rainman - July 19, 2009 - 16:32

Yes, of course that was it. Originally I had it way up in the Regular Blocks section before the block headers are defined. I moved to the bottom of the template in Misc others section of the base template, re-applied the theme and turned caching back on.. everything works as expected.

OK now I certainly feel like a bonehead, but maybe this will help others... where do I send the donation:)

#14

torgosPizza - July 19, 2009 - 16:49

Haha, it's no problem. CSS can be a funny thing sometimes.

If you do feel like donating, I take PayPal with my email address torgospizza@gmail.com. No worries :)

#15

torgosPizza - July 19, 2009 - 16:52
Status:active» by design
 
 

Drupal is a registered trademark of Dries Buytaert.