Results 1 to 6 of 6
  1. #1
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default Different main page when logged in

    Hi

    I've done a few searches but cannot find the answer to this little problem.

    I want to show a different center main page depending on whether you are logged in or not.

    I'm sure it's a really simple thing to do but I'm a bit stuck!

    Thanks

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Different main page when logged in

    Assuming that you're talking about the main-page content (the define-page), you can edit the define_main_page.php:
    Code:
    <?php
    if (!isset ($_SESSION['customer_id'])) {
    ?>
            [Insert text/HTML for not logged-in customers]
    <?php
    } else {
    ?>
            [Insert text/HTML for logged-in customers]
    <?php
    }

  3. #3
    Join Date
    May 2014
    Location
    UK
    Posts
    317
    Plugin Contributions
    0

    Default Re: Different main page when logged in

    Quote Originally Posted by lat9 View Post
    Assuming that you're talking about the main-page content (the define-page), you can edit the define_main_page.php:
    Code:
    <?php
    if (!isset ($_SESSION['customer_id'])) {
    ?>
            [Insert text/HTML for not logged-in customers]
    <?php
    } else {
    ?>
            [Insert text/HTML for logged-in customers]
    <?php
    }
    Wicked ... thank you

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Different main page when logged in

    You're very welcome!

  5. #5
    Join Date
    Dec 2009
    Posts
    22
    Plugin Contributions
    0

    Default Re: Different main page when logged in

    I tried this in 1.5.4 but it does not work. The main page is now empty. Could it be that in the new version we can not add php code in define_main_page.php?

  6. #6
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Different main page when logged in

    Quote Originally Posted by KnowNoneSince View Post
    I tried this in 1.5.4 but it does not work. The main page is now empty. Could it be that in the new version we can not add php code in define_main_page.php?
    Be sure that when/if adding such php code that it is while viewing the source code either through the default text editor or if using something like ck_editor that you have selected the source code button in the toolbar before adding the code.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Page Layout Shift When User Account Is Logged In
    By techiegirl in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 30 Jun 2010, 08:52 PM
  2. Shows VAT incl. price when logged out, and ex-VAT when logged in
    By mrroy44 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 7
    Last Post: 10 Mar 2010, 01:39 PM
  3. Replies: 18
    Last Post: 29 Sep 2009, 02:37 PM
  4. SSL problem blank page when i logged in
    By wokcy in forum Basic Configuration
    Replies: 4
    Last Post: 5 Jun 2009, 03:30 PM
  5. Different Main Page Text for Customers Who Are Logged In
    By sjbmaine in forum Basic Configuration
    Replies: 1
    Last Post: 10 Oct 2007, 04:48 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR