Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2009
    Posts
    30
    Plugin Contributions
    0

    Default Specific Product Listing CSS file

    Hello,

    I've read through the ReadMe.txt for the CSS folders regarding using p_ and c_ for particular page id's or category id's.

    I can't seem to figure out how to provide a product listing only stylesheet using this particular system. Is it possible?

    My product listing page URL looks like:
    index.php?main_page=index&cPath=1

    I tried searching, but it kept coming back with vague results, so I'm not sure what to do. If anyone can help that'd be great.

    Thanks!

  2. #2
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Specific Product Listing CSS file

    Make a stylesheet and call it c_1.css and put just this one line in it...
    body { background: red; }
    ... and tell us what happens. If the background of that category turns red, then put whatever you really want into that stylesheet.

    I'm not quite sure from your question, but maybe you mean that you want the listing to be styled a certain way but not the product info pages you'd get to from that listing. The hard way to do that would be to undo the style changes you made for the category in page-specific stylesheets. But you'd need one for each product page, which would get tedious fast. Somewhere here in the forum there is a better way involving a php IF statement, but I can't find it at the moment. Maybe someone who knows how will step in if that's what you need.

    Rob

  3. #3
    Join Date
    Nov 2009
    Posts
    30
    Plugin Contributions
    0

    Default Re: Specific Product Listing CSS file

    Hi Rob,

    Yeah, that was the initial thought I had for that possibility, but c_1.css isn't even loaded into the HTML.

    I have the auto-generated header and footer links with a custom btn-# per each link, so that I can assign them a page specific color/style. The problem is, while I have all of the ez-pages working due to the page-specific CSS mod, I have no way to create the same effect for the product listing page.

    I am just trying to find out if Zen Cart would read a specifically named CSS file in the CSS folder or if that's not setup for the product listings page.

    Right now, I can simply insert "#indexProductList", for example, into the master CSS file and while it does stylize that on the product listing page, it's not page specific.

    Hopefully, that makes sense.

    I could potentially create a PHP file that simply gets the id and have it call the CSS file, but I'm trying to keep things clean as possible...

  4. #4
    Join Date
    Nov 2009
    Posts
    30
    Plugin Contributions
    0

    Default Re: Specific Product Listing CSS file

    I take it back. c_1.css did work. It was just taking a long time to register due to being cached.

    Thanks!

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Specific Product Listing CSS file

    The product listing page is exactly what will be affected by a c_##.css file. What did you name your file? What is the category path to that listing page?
    The default behavior affects only the specific cPath named, not its subcats, but there is a very simple mod (one line added to a file) posted in a forum thread to allow top & subs or just the specified cat to be affected.

    Good to hear that it did work for you:)

  6. #6
    Join Date
    Nov 2009
    Posts
    30
    Plugin Contributions
    0

    Default Re: Specific Product Listing CSS file

    Hi Glenn,

    The c_1. css actually worked as noted above. But, I did have one last (hopefully) question about the specific CSS files.

    In reference to the Log In page, it is: index.php?main_page=login or...
    in reference to the checkout page it is: index.php?main_page=time_out or...
    in reference to the shopping cart page it is: index.php?main_page=shopping_cart

    ...is there a way to specify a CSS file for those main_pages? The readme text is a bit hard to understand which I hope improves in the future ;-)

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Specific Product Listing CSS file

    page_name.css // changes to one page

    page_name is the main_page= in the URL, so you would use login.css for index.php?main_page=login.
    Checkout has specific pages titled like checkout_shipping or checkout_success.

  8. #8
    Join Date
    Nov 2009
    Posts
    30
    Plugin Contributions
    0

    Default Re: Specific Product Listing CSS file

    This worked. Thanks again for your help, Glenn.

 

 

Similar Threads

  1. CSS applied to product listing page in specific categories only
    By robgt in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 7 Mar 2008, 01:32 AM
  2. Targeting specific products in product listing
    By doodlebee in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 27 Aug 2007, 10:13 PM
  3. Create a new product type to allow specific refining of product listing?
    By dumoti in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 15 Jun 2007, 05:07 PM
  4. Product Listing CSS
    By fantasticals in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 12 Apr 2007, 04:43 AM
  5. Product listing of specific categories
    By seville in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 26 Aug 2006, 09:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg