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!
Views: 5,260
New Zenner
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!
Totally Zenned
You could use some of the same code as the shopping cart or my account to create this box.
New Zenner
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!
Totally Zenned
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?
New Zenner
Both text & graphics. I greatly appreciate your help!
Totally Zenned
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.
New Zenner
I'll be here. Patience is a virtue, right? ;-)
Thanks!
Totally Zenned
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.
Totally Zenned
Oops, already updated! Use this one instead!!
New Zenner
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.
New Zenner
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:
Sensei
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.
New Zenner
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!
Sensei
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.
Sensei
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?
New Zenner
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.
New Zenner
Btw, no fee to join. Membership via normal registration grants access.
Sensei
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?
New Zenner
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!
Deceased
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.
Fields marked required must be completed.
Tell staff why this post should be reviewed.
Required for login, security, and core site functionality.
Help us understand how the site is used so we can improve it.
Used for promotion and personalized campaign measurement.