Zen Cart Logo
Forums / General Questions / Forced to log into account when viewing products

Forced to log into account when viewing products

Views: 1,832

Results 1 to 20 of 34
26 Jan 2015, 8:57 PM
#1
clriding avatar

clriding

New Zenner

Join Date:
Feb 2012
Posts:
53
Plugin Contributions:
0

Forced to log into account when viewing products

Hi Zenners

Ok, I have exhausted all avenues of resources trying to find the answer and now, I've hit a brick wall.

Since installing a new site template, you can still view the products in the sub categories, however, when you click to view a single product, it takes you to the login/register page.

I've checked the obvious things within the admin panel and my settings were correct, therefore, I've tried looking into the files but, I just can not fathom what to do to rectify this.

Please help!! If you have any idea which file would be the one to go into and correct, I would be most grateful.

Web is gifts-and-collectables.biz

Kind regards

Claire

26 Jan 2015, 9:28 PM
#2
divavocals avatar

divavocals

Totally Zenned

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

Re: Forced to log into account when viewing products

What happens if you switch to a different template?

clriding:

Hi Zenners

Ok, I have exhausted all avenues of resources trying to find the answer and now, I've hit a brick wall.

Since installing a new site template, you can still view the products in the sub categories, however, when you click to view a single product, it takes you to the login/register page.

I've checked the obvious things within the admin panel and my settings were correct, therefore, I've tried looking into the files but, I just can not fathom what to do to rectify this.

Please help!! If you have any idea which file would be the one to go into and correct, I would be most grateful.

Web is gifts-and-collectables.biz

Kind regards

Claire

26 Jan 2015, 9:43 PM
#3
clriding avatar

clriding

New Zenner

Join Date:
Feb 2012
Posts:
53
Plugin Contributions:
0

Re: Forced to log into account when viewing products

DivaVocals:

What happens if you switch to a different template?

Hi,

It works fine on my previous template.

regards

26 Jan 2015, 10:34 PM
#4
stevesh avatar

stevesh

Black Belt

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

Re: Forced to log into account when viewing products

Have you contacted the people from whom you purchased the template?

26 Jan 2015, 11:07 PM
#5
divavocals avatar

divavocals

Totally Zenned

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

Re: Forced to log into account when viewing products

stevesh:

Have you contacted the people from whom you purchased the template?

Yep.. because it sounds like something hardcoded into the template... Sounds like another messy Theme Forrest or Template Monstrosity template..

27 Jan 2015, 1:37 PM
#6
stevesh avatar

stevesh

Black Belt

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

Re: Forced to log into account when viewing products

DivaVocals:

Yep.. because it sounds like something hardcoded into the template... Sounds like another messy Theme Forrest or Template Monstrosity template..

12Leaves, I think.

27 Jan 2015, 2:45 PM
#7
divavocals avatar

divavocals

Totally Zenned

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

Re: Forced to log into account when viewing products

stevesh:

12Leaves, I think.

Same thing..:laugh: just another site with templates submitted by folks who know PhotoShop/Dreamweaver, but look like they guess their way through Zen Cart/WordPress/Joomla/Drupal and whomever else they say they are "experts" in making themes/templates for..

27 Jan 2015, 3:10 PM
#8
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Forced to log into account when viewing products

DivaVocals:

but look like they guess their way through Zen Cart/WordPress/Joomla/Drupal and whomever else

...... But don't we all do this (at least to some degree) ?

DivaVocals:

they say they are "experts" in making themes/templates for..

..... Well, there's the difference... Those that are the real experts are those that know (and acknowledge) that they only know about 10% of the workings of any of these systems, and as such, never proclaim themselves as being experts in the 1st place. :)

Just my 10cents worh. :)

Cheers
RodG

27 Jan 2015, 4:44 PM
#9
divavocals avatar

divavocals

Totally Zenned

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

Re: Forced to log into account when viewing products

RodG:

...... But don't we all do this (at least to some degree) ?Yes, but I think the difference I am referring to is that it only takes a half second to SEE that some of these theme/template makers are doing this.. Some miss very CLEAR basics..

RodG:

..... Well, there's the difference... Those that are the real experts are those that know (and acknowledge) that they only know about 10% of the workings of any of these systems, and as such, never proclaim themselves as being experts in the 1st place. :)

Just my 10cents worh. :)

Cheers
RodGAgreed!!!

(goodness.. am I ALWAYS agreeing with you these days!!!!!:laugh: What the he!! happened to the good old days of me sparring with RodG :laugh:)

27 Jan 2015, 4:48 PM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Forced to log into account when viewing products

DivaVocals:

(goodness.. am I ALWAYS agreeing with you these days!!!!!:laugh: What the he!! happened to the good old days of me sparring with RodG :laugh:)

He's worked his magic and converted you to the otherside... :P

27 Jan 2015, 4:54 PM
#11
divavocals avatar

divavocals

Totally Zenned

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

Re: Forced to log into account when viewing products

mc12345678:

He's worked his magic and converted you to the otherside... :P
Oh NOOOO!!!!!!

You mean...

I went to...

THE DARKSIDE!!!!!!!!!!:laugh:

27 Jan 2015, 5:24 PM
#12
clriding avatar

clriding

New Zenner

Join Date:
Feb 2012
Posts:
53
Plugin Contributions:
0

Re: Forced to log into account when viewing products

mc12345678:

He's worked his magic and converted you to the otherside... :P

Hi all, apologies for just getting back to you all (been at work all day), appreciate the input. No have not yet gone to 12leaves as I was hoping to sort out however, knowing that it is something to do with the hardcode, I will now refer to them for help. Many thanks

Claire

27 Jan 2015, 5:25 PM
#13
clriding avatar

clriding

New Zenner

Join Date:
Feb 2012
Posts:
53
Plugin Contributions:
0

Re: Forced to log into account when viewing products

mc12345678:

He's worked his magic and converted you to the otherside... :P

stevesh:

Have you contacted the people from whom you purchased the template?

Hi Steve, no gonna do that now :)

27 Jan 2015, 6:48 PM
#14
divavocals avatar

divavocals

Totally Zenned

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

Re: Forced to log into account when viewing products

clriding:

Hi all, apologies for just getting back to you all (been at work all day), appreciate the input. No have not yet gone to 12leaves as I was hoping to sort out however, knowing that it is something to do with the hardcode, I will now refer to them for help. Many thanks

Claire

and honestly whatever they have hardcoded into the template doesn't sound like it's STANDARD Zen Cart behavior..

28 Jan 2015, 6:22 PM
#15
clriding avatar

clriding

New Zenner

Join Date:
Feb 2012
Posts:
53
Plugin Contributions:
0

Re: Forced to log into account when viewing products

mc12345678:

He's worked his magic and converted you to the otherside... :P

Still no joy and still awaiting 12leaves response. grrrr.......

28 Jan 2015, 6:33 PM
#16
divavocals avatar

divavocals

Totally Zenned

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

Re: Forced to log into account when viewing products

clriding:

Still no joy and still awaiting 12leaves response. grrrr.......

Sorry to hear that.. unfortunately it is difficult for anyone here to help you since we can;t see your template to know what those changes might be.. Suggest while you're waiting that you compare your template files to the default Zen Cart files in the template_default folder.. Concentrate on comparing all of the product_info pages to their default Zen Cart counterparts.. One of the changes/modifications 12leaves.com made is the issue..

You'll need a tool like WinMerge or Beyond Compare.. WinMerge is Free.. Beyond Compare is a superior file comparsion tool, but it's not free.. However, IMHO. it's well worth the small cost for the tool..

28 Jan 2015, 10:07 PM
#17
clriding avatar

clriding

New Zenner

Join Date:
Feb 2012
Posts:
53
Plugin Contributions:
0

Re: Forced to log into account when viewing products

DivaVocals:

Sorry to hear that.. unfortunately it is difficult for anyone here to help you since we can;t see your template to know what those changes might be.. Suggest while you're waiting that you compare your template files to the default Zen Cart files in the template_default folder.. Concentrate on comparing all of the product_info pages to their default Zen Cart counterparts.. One of the changes/modifications 12leaves.com made is the issue..

You'll need a tool like WinMerge or Beyond Compare.. WinMerge is Free.. Beyond Compare is a superior file comparsion tool, but it's not free.. However, IMHO. it's well worth the small cost for the tool..

Hey Diva..

Thank you for your input, I will take those steps next. I came across this file: init_customer_auth.php and this particular part of the code:

 case (in_array($_GET['main_page'], array(FILENAME_LOGOFF, FILENAME_PRIVACY, FILENAME_PASSWORD_FORGOTTEN, FILENAME_CONTACT_US, FILENAME_CONDITIONS, FILENAME_SHIPPING, FILENAME_UNSUBSCRIBE))):
    // on special pages, allow customers to access regardless of store mode or cust auth mode
  break;

/**
 * check store status before authorizations
 */
  case (STORE_STATUS != 0):
    break;
/**
 * if not down for maintenance check login status
 */
  case (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == ''):
  /**
   * customer must be logged in to browse
   */
  if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_CREATE_ACCOUNT))) {
    if (!isset($_GET['set_session_login'])) {
      $_GET['set_session_login'] = 'true';
      $_SESSION['navigation']->set_snapshot();
    }
    zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
  }
  break;
  case (CUSTOMERS_APPROVAL == '2' and $_SESSION['customer_id'] == ''):
  /**
   * customer may browse but no prices
   */
  break;
  default:
  /**
   * proceed normally
   */
  break;
}

switch (true) {
/**
 * check store status before authorizations
 */
  case (STORE_STATUS != 0):
    break;
  case (CUSTOMERS_APPROVAL_AUTHORIZATION == '1' and $_SESSION['customer_id'] == ''):
  /**
   * 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, FILENAME_CREATE_ACCOUNT, FILENAME_PASSWORD_FORGOTTEN, FILENAME_CONTACT_US, FILENAME_PRIVACY))) {
    if (!isset($_GET['set_session_login'])) {
      $_GET['set_session_login'] = 'true';
      $_SESSION['navigation']->set_snapshot();
    }
    zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
  }
  break;
  case (CUSTOMERS_APPROVAL_AUTHORIZATION == '2' and $_SESSION['customer_id'] == ''):
  /**
   * customer may browse but no prices unless Authorized
   */
  /*
  if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_CREATE_ACCOUNT))) {
   if (!isset($_GET['set_session_login'])) {
    $_GET['set_session_login'] = 'true';
    $_SESSION['navigation']->set_snapshot();
   }
  zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
  }
  */
  break;
  case (CUSTOMERS_APPROVAL_AUTHORIZATION == '1' and $_SESSION['customers_authorization'] != '0'):
  /**
   * customer is pending approval
   * customer must be logged in to browse
   */
  if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_LOGOFF, FILENAME_CONTACT_US, FILENAME_PRIVACY))) {
  if ($_GET['main_page'] != CUSTOMERS_AUTHORIZATION_FILENAME) {
    zen_redirect(zen_href_link(CUSTOMERS_AUTHORIZATION_FILENAME));
    }
  }
  break;
  case (CUSTOMERS_APPROVAL_AUTHORIZATION == '2' and $_SESSION['customers_authorization'] != '0'):
  /**
   * customer may browse but no prices
   */
  break;
  default:
  /**
   * proceed normally
   */
  break;
}
?>

I think something in here may need changing but I don't want to mess with it because I am not a programmer.

Any ideas?

Regards

28 Jan 2015, 11:25 PM
#18
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Forced to log into account when viewing products

What are your settings for Configuration ... Customer Details ...

Customer Shop Status - View Shop and Prices
Customer must be approved to shop
0= Not required
1= Must login to browse
2= May browse but no prices unless logged in
3= Showroom Only

Customer Approval Status - Authorization Pending
Customer must be Authorized to shop
0= Not required
1= Must be Authorized to Browse
2= May browse but no prices unless Authorized
3= Customer May Browse and May see Prices but Must be Authorized to Buy

29 Jan 2015, 3:13 AM
#19
divavocals avatar

divavocals

Totally Zenned

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

Re: Forced to log into account when viewing products

Unless this file came bundled with your temple and was modified, this ISN'T the issue.. you need to compare the files in your template to their default equivalents using a file comparison tool.. 12leaves.com has modicied something which is causing the behavior you are reporting since it only happens when your new template is active..

clriding:

Hey Diva..

Thank you for your input, I will take those steps next. I came across this file: init_customer_auth.php and this particular part of the code:

case (in_array($_GET['main_page'], array(FILENAME_LOGOFF, FILENAME_PRIVACY, FILENAME_PASSWORD_FORGOTTEN, FILENAME_CONTACT_US, FILENAME_CONDITIONS, FILENAME_SHIPPING, FILENAME_UNSUBSCRIBE))):
// on special pages, allow customers to access regardless of store mode or cust auth mode
break;

/**

  • check store status before authorizations
    /
    case (STORE_STATUS != 0):
    break;
    /
    *
  • if not down for maintenance check login status
    /
    case (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == ''):
    /
    *
    • customer must be logged in to browse
      /
      if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_CREATE_ACCOUNT))) {
      if (!isset($_GET['set_session_login'])) {
      $_GET['set_session_login'] = 'true';
      $_SESSION['navigation']->set_snapshot();
      }
      zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
      }
      break;
      case (CUSTOMERS_APPROVAL == '2' and $_SESSION['customer_id'] == ''):
      /
      *
    • customer may browse but no prices
      /
      break;
      default:
      /
      *
    • proceed normally
      */
      break;
      }

switch (true) {
/**

  • check store status before authorizations
    /
    case (STORE_STATUS != 0):
    break;
    case (CUSTOMERS_APPROVAL_AUTHORIZATION == '1' and $_SESSION['customer_id'] == ''):
    /
    *
    • 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, FILENAME_CREATE_ACCOUNT, FILENAME_PASSWORD_FORGOTTEN, FILENAME_CONTACT_US, FILENAME_PRIVACY))) {
      if (!isset($_GET['set_session_login'])) {
      $_GET['set_session_login'] = 'true';
      $_SESSION['navigation']->set_snapshot();
      }
      zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
      }
      break;
      case (CUSTOMERS_APPROVAL_AUTHORIZATION == '2' and $_SESSION['customer_id'] == ''):
      /
      *
    • customer may browse but no prices unless Authorized
      /
      /

      if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_CREATE_ACCOUNT))) {
      if (!isset($_GET['set_session_login'])) {
      $_GET['set_session_login'] = 'true';
      $_SESSION['navigation']->set_snapshot();
      }
      zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
      }
      /
      break;
      case (CUSTOMERS_APPROVAL_AUTHORIZATION == '1' and $_SESSION['customers_authorization'] != '0'):
      /
      *
    • customer is pending approval
    • customer must be logged in to browse
      /
      if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_LOGOFF, FILENAME_CONTACT_US, FILENAME_PRIVACY))) {
      if ($_GET['main_page'] != CUSTOMERS_AUTHORIZATION_FILENAME) {
      zen_redirect(zen_href_link(CUSTOMERS_AUTHORIZATION_FILENAME));
      }
      }
      break;
      case (CUSTOMERS_APPROVAL_AUTHORIZATION == '2' and $_SESSION['customers_authorization'] != '0'):
      /
      *
    • customer may browse but no prices
      /
      break;
      default:
      /
      *
    • proceed normally
      */
      break;
      }
      ?>
> 
> I think something in here may need changing but I don't want to mess with it because I am not a programmer.
> 
> Any ideas?
> 
> Regards
29 Jan 2015, 6:52 PM
#20
clriding avatar

clriding

New Zenner

Join Date:
Feb 2012
Posts:
53
Plugin Contributions:
0

Re: Forced to log into account when viewing products

DivaVocals:

Unless this file came bundled with your temple and was modified, this ISN'T the issue.. you need to compare the files in your template to their default equivalents using a file comparison tool.. 12leaves.com has modicied something which is causing the behavior you are reporting since it only happens when your new template is active..

Hi and thank you. Yeah I can't understand why this is an issue? It shouldn't be and I am not too happy with 12leaves as I contacted them 2 days ago now.. I realise that it may take up to 72 hours however, this is affecting people staying on my site. Ok, I will go through the comparison tool and see what's what... thanks :)