I have this block in my content region, and it looks great whenever I am on a catalog page (catalog is set to grid view). However, if I am on an individual product page, the front page, or any other page that is not specifically defined as "grid view", the layout gets messed up. Furthermore, it completely throws off the display of the entire site in Internet Explorer (however, testing is done in Firefox).

Is there an easy way to override this block to always use grid view regardless of what page it is on?

Comments

goodeit’s picture

I believe that the problem stems from the fact that the CSS file uc_catalog.css is only available on catalog pages. The block seems to be referencing the class (er, id?) .category-grid-products from that file. I just don't know how to include the uc_catalog.css file in all files that have the block on it...

goodeit’s picture

Title: Display Issue on Front Page, everything without grid layout » Display Issue on All Pages Except Grid View Catalog
Assigned: Unassigned » goodeit
Status: Active » Needs review

I have found a working solution (don't know if it is decent or not, but it seems to work...)

add: drupal_add_css(drupal_get_path('module', 'uc_catalog') .'/uc_catalog.css');
to the beginning of theme_uc_marketing_bestsellers_products() - part of uc_marketing.module, about line 320.

let me know if this works/doesn't work for you.

Island Usurper’s picture

Status: Needs review » Fixed

I think this'll work. I've also added the drupal_add_css() call to theme_uc_marketing_special_products() because the same thing would happen with it, too.

goodeit’s picture

Status: Fixed » Needs work

Well I might have spoken too soon... this does not seem to be be working (possibly only since I upgraded to Drupal 5.8?). The CSS is NOT being added by drupal_add_css() like it should be, although it continues to work in other modules such as uc_catalog. In fact, I copy/pasted the add_css line from catalog to marketing, and it still is not working. The CSS is not being linked at all into the page (tested using FF's web developer module).

I have a clean install of drupal 5.7 with ubercart and the marketing module - with no products - that still seems to be linking uc_catalog.css to the pages, which is why I think it may be d5.8 that is the problem... but why? Can anyone else confirm this?

Also, Lyle, it doesn't look like you ever released the new version containing the (supposed) fixes.

goodeit’s picture

Status: Needs work » Fixed

setting back to fixed: this is a temporary Drupal 5.8 bug. See: http://drupal.org/node/281042

thanks Al!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.