Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30
  1. #21
    Join Date
    Apr 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Mystery Sidebox Invisible Prior to Login

    Cool! What's the best way to embed product info & photos in this?

  2. #22
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Mystery Sidebox Invisible Prior to Login

    Quote Originally Posted by clydejones View Post
    If you want this sidebox to show up only after someone has logged in

    change mystery_box.php as follows.

    Code:
     $show_mystery_box = false;
     
    if ($_SESSION['customer_id']) { 
    $show_mystery_box = true;
    }
    
      if ($show_mystery_box == true) {
        require($template->get_template_dir('tpl_mystery_box.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_mystery_box.php');
    
    // if no active banner in the specified banner group then the box will not show
    // uses banners in the defined group $banner_box_group
    //    if ($banner->RecordCount() > 0) {
    
          $title =  'Mystery Box';
          $title_link = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    }
    This triggers the box to show only after login.

    Clyde, I know that you're totally Zenned, and all that, but you got that code from my first upload, I guess, because the code that's in tpl_mystery_box now is:


    <?php
    /**
    * Side Box Template
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_mystery_box.php 1.0 4/28/2007 Get Em Fast $
    */
    $content = '';
    if ((!$_SESSION['customer_id'])) {
    //This will display on all pages untill logged in*/
    $content = '<a href="index.php?main_page=login">Log In</a href> to see what surprise awaits you!';
    } else {
    //This will display to logged in customers ONLY */
    $content = 'Your hidden content goes here';
    }


    ?>



    And that's it. Nothing else.
    And it DOES only show the special content to logged in members ONLY.
    Now, I'm no php expert, but if it works, why mess with it, right?
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  3. #23
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Mystery Sidebox Invisible Prior to Login

    The old code is also in the contribution file you uploaded to the downloads area.
    .

    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.

  4. #24
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Mystery Sidebox Invisible Prior to Login

    Quote Originally Posted by samadhi View Post
    Perhaps I can approach this another way. I'd like to offer 2 or 3 products which will change on a monthly basis exclusively to logged-in users. Is it possible to put a login restriction on the existing "specials" sidebox? IOW, it doesn't appear unless user is registered and logged-in. Thanks for your help!
    Quote Originally Posted by samadhi View Post
    Cool! What's the best way to embed product info & photos in this?
    Well, sure, you can manually embed product info and photos by writing the desired HTML and inserting it into the template file supplied earlier.

    BUT ... there's NOTHING stopping ANY customer from SEEing ALL products active on your site, whether logged-in or not. Zen Cart shows all products to everyone who is allowed to browse the site. If they're "featured" or "on special", those details are also shown to everyone.

    You said you wanted to do this to give incentive for folks to create accounts. That's fine. How do you plan to market this? How will they know that they'll suddenly see a sidebox with extra content *after* they log in ?

    Now, if you're wanting to simply draw special attention to certain products after someone logs in, you could alter the "featured products" sidebox or centerbox slightly so that those only appear when logged in. You can control which products are "featured" using the "featured products" option under Admin->Catalog->featured products.
    This will NOT prevent non-logged-in customers from SEEing these products within their categories etc, but if you've turned off the "featured" sidebox/centerbox, then special attention will not be drawn to them until logged in.

    I guess it all depends what you're really wanting to accomplish, and I'm still uncertain what "exactly" you're after, apart from "showing special content to logged in users". Surely you want to do "more" with it than just "show" it?
    .

    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.

  5. #25
    Join Date
    Apr 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Mystery Sidebox Invisible Prior to Login

    Doc,

    My fantasy is to replicate the "specials" sidebox functionality and use it to show exclusive merchandise to logged-in users only. The user incentive is exclusive access to view & purchase certain products which will rotate monthly. The homepage will include an invite to join. Membership is free, the purpose is primarily to generate a mailing list.

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

    Default Re: Mystery Sidebox Invisible Prior to Login

    Quote Originally Posted by Get Em Fast View Post
    Clyde, I know that you're totally Zenned, and all that, but you got that code from my first upload, I guess, because the code that's in tpl_mystery_box now is:


    <?php
    /**
    * Side Box Template
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_mystery_box.php 1.0 4/28/2007 Get Em Fast $
    */
    $content = '';
    if ((!$_SESSION['customer_id'])) {
    //This will display on all pages untill logged in*/
    $content = '<a href="index.php?main_page=login">Log In</a href> to see what surprise awaits you!';
    } else {
    //This will display to logged in customers ONLY */
    $content = 'Your hidden content goes here';
    }


    ?>



    And that's it. Nothing else.
    And it DOES only show the special content to logged in members ONLY.
    Now, I'm no php expert, but if it works, why mess with it, right?
    I didn't even look at your uploads. I was just answering the question on how to make the box invisible until login.

  7. #27
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Mystery Sidebox Invisible Prior to Login

    Quote Originally Posted by DrByte View Post
    The old code is also in the contribution file you uploaded to the downloads area.
    Oops. The Dr. is right again. That WAS the old code that was uploaded to the contribs area. It should look like this.

    <?php
    /**
    * mystery_box sidebox - used to display special content in sideboxes for logged in users ONLY! Shows other content until user logs in.
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: mystery_box.php 1.0 4/28/2007 Get Em Fast $
    */
    //


    require($template->get_template_dir('tpl_mystery_box.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_mystery_box.php');

    $title = 'Mystery Box';
    $title_link = false;
    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);


    ?>

    DrByte, can you change this for me before (even if) it's released, or do I need to re-upload? Or will it even be released?

    I see now, that it's not what samadhi wanted, but it's still a pretty good little box to give the customers an incentive to create an account, if the store owner puts something like a free gift in it after login, like say a discount coupon code, or something like that, don't you think?
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  8. #28
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Mystery Sidebox Invisible Prior to Login

    Sorry, samadhi, I just can't do what you want. I see now what you're wanting, but I'm not sure it's even possible. I made this one where it would show at all times, but just show the different content based on whether a customer was logged in, or not, because Like DrByte said, "You said you wanted to do this to give incentive for folks to create accounts. That's fine. How do you plan to market this? How will they know that they'll suddenly see a sidebox with extra content *after* they log in ?"
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  9. #29
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Mystery Sidebox Invisible Prior to Login

    Quote Originally Posted by Get Em Fast View Post
    DrByte, can you change this for me before (even if) it's released, or do I need to re-upload? Or will it even be released?
    Just submit an update to the already-activated contribution.
    .

    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.

  10. #30
    Join Date
    Apr 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Mystery Sidebox Invisible Prior to Login

    GEF,

    I truly appreciate your efforts. Ditto Doc & Clyde.

    I ran into the same brick-wall. Part of the problem with the sidebox concept IMO is that there's only so much real estate to juggle and it rapidly gets out-of-hand. The more boxes triggered by relevant events the better. In this case...

    How will they know that they'll suddenly see a sidebox with extra content *after* they log in ?
    A simple invitation on the home page resolves this nicely without wasting real estate on another static sidebox.


    Samadhi
    Thinking outside the sidebox.


    Quote Originally Posted by Get Em Fast View Post
    Sorry, samadhi, I just can't do what you want. I see now what you're wanting, but I'm not sure it's even possible. I made this one where it would show at all times, but just show the different content based on whether a customer was logged in, or not, because Like DrByte said, "You said you wanted to do this to give incentive for folks to create accounts. That's fine. How do you plan to market this? How will they know that they'll suddenly see a sidebox with extra content *after* they log in ?"

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Second mystery sidebox
    By SRHEdD in forum Addon Sideboxes
    Replies: 1
    Last Post: 28 Sep 2011, 03:48 PM
  2. Force registration/login prior to adding to cart
    By JayMot in forum Managing Customers and Orders
    Replies: 10
    Last Post: 30 Dec 2010, 10:02 AM
  3. Login form : Invisible telephone field
    By Artoo in forum General Questions
    Replies: 5
    Last Post: 15 Jul 2010, 03:10 PM
  4. Banner sidebox image is invisible
    By Chuckmiester in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 May 2010, 04:38 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