Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default What to name the CSS files for Product pages?

    I read the wiki and (forgive me) I'm stilll confused as to how to name my css files.

    I targeted each Category page on my site by naming the css files accordingly (c_1.css, c_2.css etc). Now I'm trying to target the product pages.

    I've tried p_[category path].css but nothing is happening.

    Thanks

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: What to name the CSS files for Product pages?

    p_##.css

    where ## is the products_id value from the URL when you look at that product page on your site

    It's explained in your /includes/templates/template_default/css/CSS_read_me.txt file amongst other places
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default Re: What to name the CSS files for Product pages?

    Here is an example url of my product page:

    hxxp://my_stupid_website.com/index.php?main_page=product_info&cPath=40_18&products_id=813

    I'm thinking of naming the product page CSS file either product_info.css or p_40.css.

    Thing is I want this to have an affect on all of my product pages located under the Categories and Subcategories.

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

    Default Re: What to name the CSS files for Product pages?

    If you want to target all product info pages, name your custom stylesheet product_info.css.

  5. #5
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default Re: What to name the CSS files for Product pages?

    Quote Originally Posted by gjh42 View Post
    If you want to target all product info pages, name your custom stylesheet product_info.css.
    Thank you. I read all the documentation in the wiki. I don't know why I didn't come accross that.

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

    Default Re: What to name the CSS files for Product pages?

    Probably because it isn't spelled out in so many words for this particular case. The CSSreadme.txt in the /classic/css/ folder talks about stylesheets for "page names", and product_info is a page name... for all individual product pages.

  7. #7
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default Re: What to name the CSS files for Product pages?

    One more thing. To edit the order by which items show up on the product page I can edit tpl_product_info_display.php? I want to move the Add to Cart button to the top inline with the product's price.

    Thanks

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

    Default Re: What to name the CSS files for Product pages?

    That's right. Move code blocks to an appropriate output order, then fine-tune the display in your stylesheet.

    Remember that a floated element (as the add to cart will likely be) can only rise to the bottom of the preceding non-floated element. If you want it inline with the prices and the prices are not floated, it needs to come before the price block in the output.

  9. #9
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default Re: What to name the CSS files for Product pages?

    Nevermind got it. My assumption was right.

    Sorry for the pollution

  10. #10
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default Re: What to name the CSS files for Product pages?

    Quote Originally Posted by gjh42 View Post

    Remember that a floated element (as the add to cart will likely be) can only rise to the bottom of the preceding non-floated element. If you want it inline with the prices and the prices are not floated, it needs to come before the price block in the output.
    Yup, I floated the price element left, reduced the width from 100% to 150px. Floated the button right and it slid right up.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Default CSS Optmization - How do I change CSS File name in header of all pages?
    By Beama in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 7 Oct 2009, 09:50 PM
  2. What are the roles of CSS, Admin, and tpl_ files in design?
    By jbalcony in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Nov 2008, 04:15 PM
  3. what files do i need to reinstall the admin login pages only
    By what44 in forum Installing on a Windows Server
    Replies: 0
    Last Post: 26 Sep 2008, 10:38 AM
  4. What should be the name of the stylesheet so that it appears only for HOME PAGE
    By surabisantosh in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 22 Nov 2007, 08:59 PM
  5. What files have the IP address for the cart?
    By PetesTown in forum General Questions
    Replies: 2
    Last Post: 28 Jul 2007, 07:14 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