Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2009
    Location
    Louisiana
    Posts
    7
    Plugin Contributions
    0

    Default Sidebox on Checkout Pages Only

    I created an new override sidebox using the method found here:
    https://www.zen-cart.com/tutorials/i...hp?article=270

    I was able to easily create my sidebox and have it display on the index page only. However, my goal is to post my security validation banner on my log in & checkout pages only.

    I cannot figure out how to verify if the checkout page is the current page. I basically want to say " if ($this_is_login_page) then display box" - but with something that works. My code:


    if ($this_is_home_page)
    { $show_security= true; }
    else { $show_security = false;
    }

    if ($show_security == true) {
    echo' Security Banner Code Inserted Here ';
    }
    ?>

  2. #2
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Sidebox on Checkout Pages Only

    Quote Originally Posted by DesignBloke View Post
    I created an new override sidebox using the method found here:
    https://www.zen-cart.com/tutorials/i...hp?article=270

    I was able to easily create my sidebox and have it display on the index page only. However, my goal is to post my security validation banner on my log in & checkout pages only.

    I cannot figure out how to verify if the checkout page is the current page. I basically want to say " if ($this_is_login_page) then display box" - but with something that works. My code:


    if ($this_is_home_page)
    { $show_security= true; }
    else { $show_security = false;
    }

    if ($show_security == true) {
    echo' Security Banner Code Inserted Here ';
    }
    ?>
    try this:

    if (in_array($current_page_base,explode(",",login,checkout_shipping,checkout_paymen t,checkout_confirmation,checkout_success')) ) {
    $show_security= true;
    } else {
    $show_security = false;
    }

  3. #3
    Join Date
    Dec 2009
    Location
    Louisiana
    Posts
    7
    Plugin Contributions
    0

    Default Re: Sidebox on Checkout Pages Only

    Thanks Clyde. That did the trick. A note to anyone with the same isue. Make sure to add a single quote ( ' ) before the word login. Otherwise it will not work and for me it disabled other working sideboxes. Final code:

    <?php

    // test if box should display
    if (in_array($current_page_base,explode(",",'login,checkout_shipping,checkout_payme nt,checkout_confirmation,checkout_success')) ) {
    $show_security = true;
    } else {
    $show_security = false;
    }

    if ($show_security == true) {
    echo'Insert Security Verification Code Here Between Single Quotes';
    }
    ?>

 

 

Similar Threads

  1. Display sidebox only on certain pages
    By delia in forum Templates, Stylesheets, Page Layout
    Replies: 22
    Last Post: 19 Apr 2012, 09:51 PM
  2. SSL on checkout pages only
    By james739 in forum General Questions
    Replies: 8
    Last Post: 8 Jun 2009, 01:14 PM
  3. EZ Pages sidebox appear in only specific category id's?
    By HTsean in forum General Questions
    Replies: 1
    Last Post: 14 May 2008, 03:19 PM
  4. Remove Sidebox for Product Info Pages ONLY
    By icaros in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 8 Oct 2007, 03:12 AM

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