Forums / Addon Sideboxes / Mystery Sidebox Invisible Prior to Login

Mystery Sidebox Invisible Prior to Login

Locked
Results 1 to 20 of 30
This thread is locked. New replies are disabled.
28 Apr 2007, 11:44
#1
samadhi avatar

samadhi

New Zenner

Join Date:
Apr 2007
Posts:
14
Plugin Contributions:
0

Mystery Sidebox Invisible Prior to Login

I'd like to configure a sidebox which is activated by user login in a effort to encourage registration. Any insight would be most appreciated!
28 Apr 2007, 12:40
#2
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Posts:
2,072
Plugin Contributions:
1

Re: Mystery Sidebox Invisible Prior to Login

You could use some of the same code as the shopping cart or my account to create this box.
28 Apr 2007, 12:44
#3
samadhi avatar

samadhi

New Zenner

Join Date:
Apr 2007
Posts:
14
Plugin Contributions:
0

Re: Mystery Sidebox Invisible Prior to Login

Get Em Fast:

You could use some of the same code as the shopping cart or my account to create this box.


Yes, but the question is, how to trigger it so that it only appears when a user logs-in? TIA!
28 Apr 2007, 12:50
#4
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Posts:
2,072
Plugin Contributions:
1

Re: Mystery Sidebox Invisible Prior to Login

Those 2 boxes ARE triggered by login. That's why I suggested the use of the code from them. I'll work on it and see what I can come up with.
May I ask what this box's contents will be? Such as just text, or will it include graphics, also?
28 Apr 2007, 12:52
#5
samadhi avatar

samadhi

New Zenner

Join Date:
Apr 2007
Posts:
14
Plugin Contributions:
0

Re: Mystery Sidebox Invisible Prior to Login

Both text & graphics. I greatly appreciate your help!
28 Apr 2007, 13:06
#6
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Posts:
2,072
Plugin Contributions:
1

Re: Mystery Sidebox Invisible Prior to Login

No problem. I'll get back to you sometime today. It may be a tonight, as I've got to work a couple of hours today, go pick up parts for my sons Bronco, work on it, and visit an uncle of mine that I haven't seen in a year. But don't give up on me......I won't leave you hanging. It's just going to be a busy day.
If I don't get it done by tonight at........say 8:00 P.M. central time, I'll still let you know.
28 Apr 2007, 13:12
#7
samadhi avatar

samadhi

New Zenner

Join Date:
Apr 2007
Posts:
14
Plugin Contributions:
0

Re: Mystery Sidebox Invisible Prior to Login

I'll be here. Patience is a virtue, right? ;-)
Thanks!
28 Apr 2007, 20:13
#8
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Posts:
2,072
Plugin Contributions:
1

Re: Mystery Sidebox Invisible Prior to Login

Got it! It's only 2 short files, and I'm going to add it to the contributions. If it gets accepted as a contribution, will be another story.
But you will have it, anyway.

I've added it as an attachment to this post. I've never attached anything to a post in this forum, so if it don't work, don't blame me, just let me know, and I'll e-mail it to you.

What this does is show the box all the time with a message that reads "Log In to see what surprise awaits you!"

Then, after the user is logged in, it shows your hidden content (which you will have to replace, as I just added the line "your hidden content goes here"

Hope you like it. It was a little challenge, but I enjoyed making something useful for everyone to use.
28 Apr 2007, 20:15
#9
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Posts:
2,072
Plugin Contributions:
1

Re: Mystery Sidebox Invisible Prior to Login

Oops, already updated! Use this one instead!!
28 Apr 2007, 20:31
#10
samadhi avatar

samadhi

New Zenner

Join Date:
Apr 2007
Posts:
14
Plugin Contributions:
0

Re: Mystery Sidebox Invisible Prior to Login

Not exactly what I had in mind (invisible prior to login), but perhaps it will take me a step closer. Thanks for your help! I'll check it out ASAP.
28 Apr 2007, 21:24
#11
samadhi avatar

samadhi

New Zenner

Join Date:
Apr 2007
Posts:
14
Plugin Contributions:
0

Re: Mystery Sidebox Invisible Prior to Login

Invisible or not, this "works a treat" as the Brits say. TY! Now how do I add it to the catalog pull-down in Admin so that I can easily update products ala "specials"? :cool:
28 Apr 2007, 21:26
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Mystery Sidebox Invisible Prior to Login

samadhi:

I'd like to configure a sidebox which is activated by user login in a effort to encourage registration. Any insight would be most appreciated!


samadhi:

Now how do I add it to the catalog pull-down in Admin so that I can easily update products ala "specials"? :cool:


I think it would help if you were to explain what exactly you are wanting to accomplish ...
There might be built-in features already established that might do what you want just by flipping a switch.
28 Apr 2007, 21:34
#13
samadhi avatar

samadhi

New Zenner

Join Date:
Apr 2007
Posts:
14
Plugin Contributions:
0

Re: Mystery Sidebox Invisible Prior to Login

The purpose is to encourage users to register (and login) in order to access member's only offers. Incidentally, this doesn't have to be a sidebox. Surprised I couldn't find any info on this. Thanks, Doc!
28 Apr 2007, 21:37
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Mystery Sidebox Invisible Prior to Login

You can set up the store so that it requires customers to log in before they can see prices. You can further restrict it so they have to log in before they can even browse what's *in* the store.
28 Apr 2007, 21:37
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Mystery Sidebox Invisible Prior to Login

samadhi:

Now how do I add it to the catalog pull-down in Admin so that I can easily update products ala "specials"? :cool:


What exactly do you mean by this?
28 Apr 2007, 21:46
#16
samadhi avatar

samadhi

New Zenner

Join Date:
Apr 2007
Posts:
14
Plugin Contributions:
0

Re: Mystery Sidebox Invisible Prior to Login

DrByte:

You can set up the store so that it requires customers to log in before they can see prices. You can further restrict it so they have to log in before they can even browse what's *in* the store.


Yes, but what I'd like to do is incorporate a special access-restricted area (rather than the entire site) for member's only.
28 Apr 2007, 22:13
#17
samadhi avatar

samadhi

New Zenner

Join Date:
Apr 2007
Posts:
14
Plugin Contributions:
0

Re: Mystery Sidebox Invisible Prior to Login

Btw, no fee to join. Membership via normal registration grants access.
28 Apr 2007, 22:29
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Mystery Sidebox Invisible Prior to Login

What will be in this "restricted area"?

Zen Cart doesn't currently offer category-specific or product-specific security restrictions.
Was there some other sort of content you were planning to limit access to?
28 Apr 2007, 22:41
#19
samadhi avatar

samadhi

New Zenner

Join Date:
Apr 2007
Posts:
14
Plugin Contributions:
0

Re: Mystery Sidebox Invisible Prior to Login

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!
29 Apr 2007, 01:32
#20
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Posts:
7,017
Plugin Contributions:
12

Re: Mystery Sidebox Invisible Prior to Login

Get Em Fast:

Oops, already updated! Use this one instead!!


If you want this sidebox to show up only after someone has logged in

change mystery_box.php as follows.

 $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.