Zen Cart Logo
Forums / General Questions / Log In to View one Page of Website

Log In to View one Page of Website

Views: 2,461

Results 1 to 19 of 19
13 Feb 2014, 9:35 PM
#1
sfklaas avatar

sfklaas

Zen Follower

Join Date:
Mar 2008
Posts:
219
Plugin Contributions:
0

Log In to View one Page of Website

I attempted to search for other posts regarding this same question, but the two posts I found didn't have any answers:
Post 1

and

Post 2

I have a basic website for a tennis club. I don't sell any products, it is more of a informative website for the general public and for club members.
So, my goal for my website is to have 1 log-in username and password that can be used by 100-200 people so they can log in and find contact information for others (e.i. names, email address and phone numbers.) So after you log in, you are sent to that one page with all that info. I attempted to create the log in page, and then when you click log in, I want it to go to that one webpage that can only be seen after logging in. Right now, when you log in, it goes back to the home page with "Welcome" at the top.

Is this possible through zen cart? Any suggestions?

13 Feb 2014, 10:43 PM
#3
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Log In to View one Page of Website

I hate to say it, but, do you actually need to use Zen Cart?
You could quickly build a site with WordPress and there are several plugins that easily redirect users after login.

14 Feb 2014, 7:20 AM
#4
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Log In to View one Page of Website

picandnix:

I hate to say it, but, do you actually need to use Zen Cart?
You could quickly build a site with WordPress and there are several plugins that easily redirect users after login.

nods in agreement:yes:

The saying "putting a bandaid on a bullet wound" seems to fit..

14 Feb 2014, 7:37 AM
#5
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Log In to View one Page of Website

Although you don't want/need all of the features available, you can do this with Zen Cart.

You want:

  • One Customer, One Login User/Password

  • One Landing Page for this particular customer only

**
You need:**

  • To make the login an unused email with your domain/free email account

  • Twitch Restrict Categories by Customer or Group

  • One line of code changed - the redirect link back to YOUR desired landing page
    or

  • Add the landing page info to define_main_page.php

You can shut off every other sidebox, define page, ez page that you wish as normal or use the customers_cat_group to filter them all for this one customer.

14 Feb 2014, 1:57 PM
#6
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Log In to View one Page of Website

twitchtoo:

Although you don't want/need all of the features available, you can do this with Zen Cart.

You want:

  • One Customer, One Login User/Password

  • One Landing Page for this particular customer only

**
You need:**

  • To make the login an unused email with your domain/free email account

  • Twitch Restrict Categories by Customer or Group

  • One line of code changed - the redirect link back to YOUR desired landing page
    or

  • Add the landing page info to define_main_page.php

You can shut off every other sidebox, define page, ez page that you wish as normal or use the customers_cat_group to filter them all for this one customer.

Sure you can use Zen Cart and do this.. but WHY?? It's a ONE PAGE website..WordPress takes 5 minutes to install takes a LOT less effort to configure for a one page website, and is a solution that makes sense for an informational website (which is what the OP says he is attempting to make) versus making what is primarily an e-commerce solution fit..

14 Feb 2014, 2:09 PM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Log In to View one Page of Website

DivaVocals:

Sure you can use Zen Cart and do this.. but WHY?? It's a ONE PAGE website..WordPress takes 5 minutes to install takes a LOT less effort to configure for a one page website, and is a solution that makes sense for an informational website (which is what the OP says he is attempting to make) versus making what is primarily an e-commerce solution fit..

True, and if the OP's site will always be a one-page informational site, I'd agree. I have made several informational sites which weren't selling anything at first, but which later ended up selling memberships, hats, bumper stickers, etc., and we were glad we already had the shopping cart stuff built in.

14 Feb 2014, 2:13 PM
#8
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Log In to View one Page of Website

Because eventually, members just might want more.

And...

Sfklaas asked the Zen Cart forum, not the Word Press forum.

And...

Zen Cart can.

14 Feb 2014, 2:53 PM
#9
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Log In to View one Page of Website

stevesh:

True, and if the OP's site will always be a one-page informational site, I'd agree. I have made several informational sites which weren't selling anything at first, but which later ended up selling memberships, hats, bumper stickers, etc., and we were glad we already had the shopping cart stuff built in.

  1. WordPress
  2. A login redirect plugin
  3. Woocommerce (if wanted/if selling is one day required)
  4. Done.
14 Feb 2014, 4:43 PM
#10
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Log In to View one Page of Website

picandnix:

  1. WordPress
  2. A login redirect plugin
    3. Woocommerce (if wanted/if selling is one day required)
  3. Done.

Done, and $800 poorer if you actually want to sell something using USPS, UPS, Table Rate Shipping, Attributes, CSV Import, Group Pricing and Follow-Up Emails, all included in Zencart or by using free mods contributed by the community.

14 Feb 2014, 5:02 PM
#11
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Log In to View one Page of Website

twitchtoo:

Sfklaas asked the Zen Cart forum, not the Word Press forum.

And...

Zen Cart can.
I got that.. Perhaps the OP asked here because they weren't aware of alternative, and possibly more appropriate solutions.. I guess I am a fan of finding the RIGHT solution.. not just making one work..

stevesh:

Done, and $800 poorer if you actually want to sell something using USPS, UPS, Table Rate Shipping, Attributes, CSV Import, Group Pricing and Follow-Up Emails, all included in Zencart or by using free mods contributed by the community.

Perhaps.. but not for nothing this is all included in WooCommerce.. (which is what picandnix was suggesting..)

Anyway this just drives home the point that the OP needs to consider the LONG and short term needs of their "basic website for a tennis club". If the club doesn't "sell any products" today, but MIGHT tomorrow, then ABSOLUTELY he needs to factor those considerations into the platform he chooses to build the site.. (and that doesn't take WordPress off the table depending on the number of products he MIGHT plan to sell in the future)

If it is always going to be "more of a informative website for the general public and for club members." then I standby my opinion that Zen Cart may not be the RIGHT solution for this site -- though it's certainly one that can be made to work if the OP wanted..

Carry on all..

14 Feb 2014, 5:07 PM
#12
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Log In to View one Page of Website

DivaVocals:

Perhaps.. but not for nothing this is all included in WooCommerce.. (which is what picandnix was suggesting..)

Could be I'm missing something, but all those functions are listed as extensions on Woocomerce's website, with prices attached. Not sure why I would want to buy them if they are included in the basic package.

14 Feb 2014, 5:16 PM
#13
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Log In to View one Page of Website

stevesh:

Could be I'm missing something, but all those functions are listed as extensions on Woocomerce's website, with prices attached. Not sure why I would want to buy them if they are included in the basic package.

Perhaps.. I have only one client using WooCommerce.. "theCartPress" plugin certainly doesn't make most "standard" plugins premium..

None of this matters.. Though Zen Cart could certainly be used as a platform for a one-page site, it's certainly a BIG solution for a very small need.. My only point is that the OP needs to look at short and long terms site needs, and pick the solution that makes the most sense for the need.. Zen Cart may NOT be it.. 'tis all..

ya'll carry on.. :smile:

14 Feb 2014, 6:55 PM
#14
sfklaas avatar

sfklaas

Zen Follower

Join Date:
Mar 2008
Posts:
219
Plugin Contributions:
0

Re: Log In to View one Page of Website

Thanks for the advice...

I know there has been a lot of WordPress suggestions, but I do love using zen cart with the ease of already knowing a lot about customizing it. The EZpages, and the help from this forum is what has allowed me to create numerous websites the last 6 years. Plus, knowing that I can easily turn each one of my websites into a place where I can also sell items is reassuring to me and my clients.

Long story short, here is what I did to make it work. For those that sell items and have customers log in to buy items, this solution probably won't work. Bust because I have a website that doesn't sell items, this seems to work for me:

I first put a link on my website pointing to the page where people can log in (http://www.mywebsite.com/index.php?main_page=login). Then I created one account that I will send out that everyone can use to log in. After created my email username and password, i went ahead and modified my log in page, "includes/templates/CUSTOM/templates/tpl_login_default.php". I only kept the email input, password input, and log in button. Everything else I cleared with <!-- -->. I didn't want to have the forgotten password or the create account text/inputs.

Then the page I am going to use to display the members contact information is "includes/templates/CUSTOM/templates/tpl_account_default.php" (or http://www.mywebsite.com/index.php?main_page=account). I cleared all the info on that page, like "account history", "change password", etc with <!-- -->. I will be creating a table on that page that displays my members name, ability level, email, and phone number. The reason I used this page because it seems like this page can only be found after someone logs in (am I wrong?). I just don't want this page to be found on google search. Does anyone have suggestions to make this "account page" more secure so the email and phone numbers won't be found on search engines or with people that don't log in? Or will I be ok?

My last task is to find the file and code where it redirects to "http://www.mywebsite.com/index.php?main_page=account" (tpl_account_default.php), instead of going back to the home page after you click login and successfully log in. Does anyone know where to find that?

As I'm sure there a many other ways, this way seems to be working for me so far.

14 Feb 2014, 7:06 PM
#15
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Log In to View one Page of Website

includes/templates/YOUR_TEMPLATE/templates/tpl_create_success_default.php

bottom of the file:

<div class="buttonRow forward"><?php echo '<a href="' .** $origin_href **. '">' . zen_image_button(BUTTON_IMAGE_CONTINUE, BUTTON_CONTINUE_ALT) . '</a>'; ?></div>

**$origin_href **is where it's headed to...

which is decided on this page:
includes/modules/pages/create_account_success/header_php.php

if (sizeof($_SESSION['navigation']->snapshot) > 0) {
$origin_href = zen_href_link($_SESSION['navigation']->snapshot['page'], zen_array_to_string($_SESSION['navigation']->snapshot['get'], array(zen_session_name())), $_SESSION['navigation']->snapshot['mode']);
$_SESSION['navigation']->clear_snapshot();
} else {
$origin_href = zen_href_link(FILENAME_DEFAULT);
}

// redirect customer to where they came from if their cart is not empty and they didn't click on create-account specifically
if ($_SESSION['cart']->count_contents() > 0) {
if ($origin_href != zen_href_link(FILENAME_DEFAULT)) {
zen_redirect($origin_href);
}
}

14 Feb 2014, 7:35 PM
#16
sfklaas avatar

sfklaas

Zen Follower

Join Date:
Mar 2008
Posts:
219
Plugin Contributions:
0

Re: Log In to View one Page of Website

Thanks Twitchtoo! I feel that I am so close. I just took the short cut and modified the file: includes/templates/YOUR_TEMPLATE/templates/tpl_create_success_default.php. Near the bottom, I tried to add in the new link. But it still sends me to the homepage.

Am I missing something? Here is the code I modified:

<div class="buttonRow forward"><?php echo '<a href="http://www.mywebsite.com/index.php?main_page=account">' . zen_image_button(BUTTON_IMAGE_CONTINUE, BUTTON_CONTINUE_ALT) . '</a>'; ?></div>
14 Feb 2014, 9:28 PM
#17
sfklaas avatar

sfklaas

Zen Follower

Join Date:
Mar 2008
Posts:
219
Plugin Contributions:
0

Re: Log In to View one Page of Website

if (sizeof($_SESSION['navigation']->snapshot) > 0) {
$origin_href = zen_href_link($_SESSION['navigation']->snapshot['page'], zen_array_to_string($_SESSION['navigation']->snapshot['get'], array(zen_session_name())), $_SESSION['navigation']->snapshot['mode']);
$SESSION['navigation']->clear_snapshot();
} else {
$origin_href = zen_href_link(FILENAME
ACCOUNT);
}

// redirect customer to where they came from if their cart is not empty and they didn't click on create-account specifically
if ($SESSION['cart']->count_contents() > 0) {
if ($origin_href != zen_href_link(FILENAME
ACCOUNT)) {
zen_redirect($origin_href);
}
}

I also attempted this coding by changing DEFAULT to ACCOUNT, but it still does not redirect to the account page after logging in. Any thoughts?

14 Feb 2014, 9:39 PM
#18
sfklaas avatar

sfklaas

Zen Follower

Join Date:
Mar 2008
Posts:
219
Plugin Contributions:
0

Re: Log In to View one Page of Website

HA I figured it out!! I had to go into includes/modules/pages/login/header_php.php and change the following code near the bottom:

$SESSION['navigation']->clear_snapshot();
zen_redirect($origin_href);
} else {
zen_redirect(zen_href_link(FILENAME
ACCOUNT, '', $request_type));

I Changed DEFAULT to ACCOUNT and now after logging in, it takes me to the My Account Page.

14 Feb 2014, 10:06 PM
#19
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Log In to View one Page of Website

I believe you'll need to change:
includes/modules/pages/login/header_php.php

this:
zen_redirect(zen_href_link(FILENAME_DEFAULT, '', $request_type));

to this:
zen_redirect(zen_href_link(FILENAME_ACCOUNT, '', $request_type));