Results 1 to 10 of 1685

Hybrid View

  1. #1
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    Hello, I would like to know how to change color example h1 only on the product page, the shopping cart page, I know how to do it for the home page but not for the other pages.
    PHP Code:
    <?php
    // -----
    // Set a different color for the h1 tag only on the home page.
    //
    if ($this_is_home_page) {
    ?>
    <style>
        h1 {color: red;}
    </style>
    <?php
    }

    // -----
    // Load an additional stylesheet.
    //
    ?>
    Giovanni,
    Zen Cart V2.1

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,536
    Plugin Contributions
    127

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    The product page and shopping cart page have their own css files you can set up.

    includes/templates/bootstrap/css/shopping_cart.css
    includes/templates/bootstrap/css/product_info.css
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    By the way what I want to know is how to replace if ($this_is_home_page) with the name of the page example if ($this_is_product_info_page) does not work as well as ($this_is_shopping_cart_page) does not work. it's not to complicate my life but, it will allow me to do a lot of things if I know the exact name of the page to put on if ($this_is_home_page).
    Giovanni,
    Zen Cart V2.1

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,536
    Plugin Contributions
    127

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    $this_is_home_page is a special case; it's not done for other pages.

    If you want to check the name of the current page you can do so using the variable $current_page_base.

    if ($current_page_base == 'shopping_cart') {
    ...
    }

    if ($current_page_base == 'product_info') {
    ...
    }

    but if all you're doing is adding page-specific CSS, you'd be better off doing it the way I suggested; that way you can upgrade your template at any time and not lose these customizations.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    Exact it is so as not to touch the basic model. Thank you, it worked for me
    HTML Code:
    if ($current_page_base == 'product_info') { +
    , if now I want to put 2 or more pages for example
    HTML Code:
    if ($current_page_base == 'product_info PLUS another page, ') {
    Giovanni,
    Zen Cart V2.1

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,536
    Plugin Contributions
    127

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    The PHP syntax for this would be

    if ($current_page_base == 'product_info' || $current_page_base == 'some-other-page' ) {
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #7
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: ZCA Bootstrap 4 Template [Support Thread]

    Thank you very much, it worked for me.
    Giovanni,
    Zen Cart V2.1

 

 

Similar Threads

  1. v155 Clone a Template [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 107
    Last Post: 11 Nov 2024, 08:28 PM
  2. v150 aBagon Template Support Thread
    By VJef in forum Addon Templates
    Replies: 54
    Last Post: 5 Sep 2020, 08:44 PM
  3. v155 ZCA Bootstrap Template 1.0 (BETA)
    By rbarbour in forum Addon Templates
    Replies: 74
    Last Post: 25 Apr 2018, 07:05 PM
  4. TB Sempre Template Support Thread
    By brandonturpin in forum Addon Templates
    Replies: 48
    Last Post: 19 Mar 2015, 06:33 PM
  5. Wallet Template - Support Thread
    By zami in forum Addon Templates
    Replies: 45
    Last Post: 25 Mar 2010, 10:15 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