Forums / Templates, Stylesheets, Page Layout / must log in to browse hides EZ-Pages...

must log in to browse hides EZ-Pages...

Views: 2,645

Results 1 to 15 of 15
10 Feb 2009, 12:12 AM
#1
alogon avatar

alogon

New Zenner

Join Date:
Feb 2009
Posts:
7
Plugin Contributions:
0

must log in to browse hides EZ-Pages...

HI,

I am setting up a zen cart site for a wholesale company so I want the site set to "must login to browse" in order to hide all of the products and prices from everyone except retailers. However I would like for the EZ-Pages to be visible to everyone so that the entire site is managed by zen cart. Is there a way this can be done?

Thanks,
Daniel.

BTW, I have tried to search the forums for this situation but have had no luck.

10 Feb 2009, 6:12 AM
#2
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: must log in to browse hides EZ-Pages...

Must login to browse should not affect whether EZ pages are shown or not..
but without url to site in question, difficult to advise further.

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

10 Feb 2009, 7:09 AM
#3
alogon avatar

alogon

New Zenner

Join Date:
Feb 2009
Posts:
7
Plugin Contributions:
0

Re: must log in to browse hides EZ-Pages...

http://maharani.servdot.com/zencart/

This is the URL to the site. Try to click on any of those easy pages at teh top (Home, About Us, etc).

Right now under Admin > Configuration > Customer Details I have:

Customer Shop Status - View Shop and Prices	 =      1	 
Customer Approval Status - Authorization Pending = 	1	
10 Feb 2009, 7:23 AM
#4
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: must log in to browse hides EZ-Pages...

Set up your template header to use hard coded link entries for ezpages.

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

10 Feb 2009, 7:39 AM
#5
alogon avatar

alogon

New Zenner

Join Date:
Feb 2009
Posts:
7
Plugin Contributions:
0

Re: must log in to browse hides EZ-Pages...

I understand how to hard code links in my header but i am not sure what the direct URL's to the EZ-Pages would be. Can you please explain.

Thanks,
Daniel.

10 Feb 2009, 7:50 AM
#7
alogon avatar

alogon

New Zenner

Join Date:
Feb 2009
Posts:
7
Plugin Contributions:
0

Re: must log in to browse hides EZ-Pages...

http://maharani.servdot.com/zencart/index.php?main_page=page&id=1

^ would be the link to the "Home" EZ-page but when you go to it, it redirects you to the login page.

I hard coded the "TEST LINK" in the header to test this theory with no luck :-(

Please take a look to make sure I did what you were thinking.

10 Feb 2009, 7:53 AM
#8
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: must log in to browse hides EZ-Pages...

What happens when you switch from current template to default, Classic template..

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

10 Feb 2009, 7:54 AM
#9
alogon avatar

alogon

New Zenner

Join Date:
Feb 2009
Posts:
7
Plugin Contributions:
0

Re: must log in to browse hides EZ-Pages...

I get the same behavior when using the default template also.

10 Feb 2009, 7:58 AM
#10
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: must log in to browse hides EZ-Pages...

http://www.zen-cart.com/forum/showthread.php?t=66495
Seems that when zencart has your current settings, then
viewing ezpages is not available...see similar post above..
suggest you contact zencart developer for clarification..
i.e drbyte, ajeh, kim,wilt

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

10 Feb 2009, 8:02 AM
#11
alogon avatar

alogon

New Zenner

Join Date:
Feb 2009
Posts:
7
Plugin Contributions:
0

Re: must log in to browse hides EZ-Pages...

Alright, thanks for the info. According to that post you linked it looks like this has been happening since 2007 :-(

10 Feb 2009, 8:47 AM
#12
alogon avatar

alogon

New Zenner

Join Date:
Feb 2009
Posts:
7
Plugin Contributions:
0

Re: must log in to browse hides EZ-Pages...

The following information will tell you how to allow anyone to view your ez-pages even when zen cart is set to "customer must be logged in to browse". This is an ideal solution for wholesale companies who need an informational website but only want vendors seeing their products and prices.

NOTE: I take no responsibility in any unintended side effects caused by making the following changes. Use this tip at your own risk.

First add the following line to /zencart/includes/filenames.php

define('FILENAME_PAGE', 'page');(save yourself some future headache and put it where it belongs, the file is in alpha order)

Next edit the following line in /zencart/includes/init_includes/init_customer_auth.php

if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_LOGOFF, FILENAME_CREATE_ACCOUNT, FILENAME_PASSWORD_FORGOTTEN, FILENAME_CONTACT_US, FILENAME_PRIVACY))) {to say> if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_LOGOFF, FILENAME_CREATE_ACCOUNT, FILENAME_PASSWORD_FORGOTTEN, FILENAME_CONTACT_US, FILENAME_PRIVACY, FILENAME_PAGE))) {

After making these changes you should be able to view your EZ-pages even when your cart is set to "customer must be logged in to browse"

Hope this helps someone.

25 Feb 2009, 11:14 PM
#13
rottiejoe avatar

rottiejoe

New Zenner

Join Date:
Mar 2007
Posts:
86
Plugin Contributions:
0

Re: must log in to browse hides EZ-Pages...

Hi Guys,

Have tried to use this method to have the index page show when customer is set to login in to browse. I have tried the method below and it works but it also lets all other pages show as well it breaks the must log in module. Does any one know why this might be.

Regards
Rottie

19 Mar 2011, 7:19 PM
#14
gallantmedia avatar

gallantmedia

New Zenner

Join Date:
Mar 2011
Location:
Ottawa, Canada
Posts:
3
Plugin Contributions:
0

Re: must log in to browse hides EZ-Pages...

TO SHOW THE HOME PAGE:

After hours of searching the forums and finally figuring this out on my own...

Edit includes/init_includes/init_customer_auth.php

Around line 115

  • customer must be logged in to browse
    */
    // if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_CREATE_ACCOUNT))) {
    if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_LOGOFF, add FILENAME_DEFAULT

The home page file name is FILENAME_DEFAULT

20 Mar 2011, 4:57 AM
#15
gallantmedia avatar

gallantmedia

New Zenner

Join Date:
Mar 2011
Location:
Ottawa, Canada
Posts:
3
Plugin Contributions:
0

Re: must log in to browse hides EZ-Pages...

After further review.... this is the correct format:

First edit includes/filenames.php

Scroll down to where you see FILENAME_DEFAULT (index) and change to: FILENAME_DEFAULT_INDEX

THEN edit includes/init_includes/init_customer_auth.php

Around line 115

  • customer must be logged in to browse
    */
    // if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_CREATE_ACCOUNT))) {
    if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_LOGOFF, add FILENAME_DEFAULT_INDEX

And that's it. You'll now be able to view the index page while product categories are 'log in to view'.