Cool! What's the best way to embed product info & photos in this?
Cool! What's the best way to embed product info & photos in this?
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!
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.
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.
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.
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!
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!
.
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.
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...
A simple invitation on the home page resolves this nicely without wasting real estate on another static sidebox.How will they know that they'll suddenly see a sidebox with extra content *after* they log in ?
Samadhi
Thinking outside the sidebox.
Bookmarks