Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27
  1. #21
    Join Date
    May 2012
    Posts
    36
    Plugin Contributions
    0

    Default Re: Require Login for one EZ Page?

    Code:
    	// bof: if company is "specific company" then customer authorization is approved; else pending
        
    if ($company == "specific comany") {
    	$customers_authorization = 0;
    }
    	else {
    	$customers_authorization = CUSTOMERS_APPROVAL_AUTHORIZATION;
    	}
    	
    	// eof: if company is "specific company" then customer authorization is approved; else pending
    Would this code in module - create_account.php work to automatically approve certain customers who input a specific "company" in the create account form? Just curious if this is the only file that needs to be touched. If it turns out that more files and custom coding has to be done, then my wife says she will just manually approve.

    Just for reference, we don't normally use the company field, but if this works then we will use it as sort of a secondary password to automatically approve certain customers locally who are referred to us by business associates which would cut down on the approval time lag.

  2. #22
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Require Login for one EZ Page?

    You would need more customization than that as this is not updating the customers table it is just setting a variable ...

    You would need to check the customer's company field and then update the customers table based on that result and providing the customer spells the company *exactly* as what you are testing for, you would then need to update the customers table ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #23
    Join Date
    May 2012
    Posts
    36
    Plugin Contributions
    0

    Default Re: Require Login for one EZ Page?

    Quote Originally Posted by Ajeh View Post
    You would need more customization than that as this is not updating the customers table it is just setting a variable ...

    You would need to check the customer's company field and then update the customers table based on that result and providing the customer spells the company *exactly* as what you are testing for, you would then need to update the customers table ...
    Yes, that was the one thing we recognized which we were showing that the customers checkbox shows red and is pending approval. But am I correct to assume that this is only a visual problem where it says "pending approval" but in actuality it is "approved" for that account.

    The code we used above actual passes the customer to the account_success screen. While all other company inputs takes them to the customer_authorization screen.

    Modifications to this particular store in our subfolder bypasses the zencart checkout system. We don't use the admin for customers, orders or any data but instead use our merchant to keep the data. The only times we were loggin in to admin were to either update products or manually approve customer accounts. The latter is what we are trying to avoid so we don't have to login everyday as product updates only happen twice a month.

    Would this coding suffice to as is or does the customer table need to be updated for other functions besides using the checkout system within zencart?

    Thanks

  4. #24
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Require Login for one EZ Page?

    You are doing a work around if you have the Customer details setup based on Customer Authorization ... so I am really not sure how to advise you on this ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #25
    Join Date
    May 2012
    Posts
    36
    Plugin Contributions
    0

    Default Re: Require Login for one EZ Page?

    Quote Originally Posted by Ajeh View Post
    You are doing a work around if you have the Customer details setup based on Customer Authorization ... so I am really not sure how to advise you on this ...
    Yes, its actually a bad workaround as it only allowed access after creating account. No access again if having to re-login. So we are going to dump the modification we did.

    Code:
    if ($ezpage_id == 16) {
      if (!$_SESSION['customer_id']) {
        $_SESSION['navigation']->set_snapshot();
        $messageStack->add_session('header', 'Please login to access Member\'s area', 'caution');
        zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
      }
      if ($_SESSION['customer_id'] != 2 && $_SESSION['customer_id'] != 7) {
        $messageStack->add_session('header', 'Sorry you do not have access to Member\'s area', 'caution');
        zen_redirect(zen_href_link(FILENAME_EZPAGES, 'id=17', 'NONSSL'));
    A question though on using sessions? I see that "$_SESSION['customer_id']" is checking if a customer is logged in and if logged in to check their customer id. I have it modified further to include $_SESSION['customer_first_name'] and it works well. I can get customer id and first name to get checked but not others.

    But I cannot get any other sessions to work to check other info such as $_SESSION['customer_last name'] or $_SESSION['customer_telephone']. I seen other posts back in 2007 to set these sessions in the login - header_php.php file by adding 2 lines. But even then it does not seem to work. Do you know what fields are allowed to be checked besides customer id and first name.

    NOTE: since we don't use the zencart admin to use the data, we decided to modify the language files to show what we want on the form. So for example, we used the first name field as a "Code". We would like to use the last name field as a "Sub code". Presently we are using the first name "Code" field to automatically grant access certain ez pages. The sub code will let them access the other pages so it would be nice to have another session check so we don't have to go in this header_php file to manually update. Instead we can change access codes and such from the "extra filename" file we made.

    Thanks

  6. #26
    Join Date
    May 2012
    Posts
    36
    Plugin Contributions
    0

    Default Re: Require Login for one EZ Page?

    Also to mention, the $_SESSION['customer_last_name'] only works when I logout after creating an account and by logging back in that it grants access to the certain pages. Is there a way to make the last_name work like the first_name where it can grab the customer info after the create account success without logging out and back in.

  7. #27
    Join Date
    May 2012
    Posts
    36
    Plugin Contributions
    0

    Default modify link of shopping cart content

    the items in the cart are linked to the product pages. How do I make them non-clickable?

    I assumed its in tpl_shopping_cart_default but unable to figure where the links are coded. This is important to make sure that no links are backtracking to member only areas for international customers.

    Thanks

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. v151 Require Login for Certain Categories or Products
    By clausont in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 6 Jun 2013, 01:41 PM
  2. NOT require login to view EZ Page from Banner Link
    By dimsumgurl in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 29 Apr 2011, 04:00 PM
  3. want 2 login pages - one for check out, one for login
    By vandiermen in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 11 Aug 2007, 07:34 PM
  4. Require Login for Certain Pages
    By samad64 in forum General Questions
    Replies: 5
    Last Post: 26 Jun 2007, 03:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR