Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Customers authorization status

    Let me re-think this for what changes are required ... I will try to look at it this afternoon or tonight ...
    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!

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

    Default Re: Customers authorization status

    See if this works for you ...

    Set both of those settings back to 0 ...

    Then change the code in these files with the code in RED ...

    /includes/init_includes/init_customer_auth.php

    Around line 39:
    Code:
    // bof: block customers
    if (true || $_SESSION['customer_id'] != '') {
    // eof: block customers
    
    around line 113:
    Code:
      case (STORE_STATUS != 0):
        break;
    // bof: block customers
      case ($_SESSION['customers_authorization'] > '0'):
      if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_LOGOFF, FILENAME_CONTACT_US, FILENAME_PRIVACY))) {
        if ($_GET['main_page'] != CUSTOMERS_AUTHORIZATION_FILENAME) {
          zen_session_destroy();
          zen_redirect(zen_href_link(FILENAME_LOGOFF, $logoff_lang));
        }
      }
      break;
    // eof: block customers
      case (CUSTOMERS_APPROVAL_AUTHORIZATION == '1' and $_SESSION['customer_id'] == ''):
    /includes/functions/functions_prices.php

    around line 159:
    Code:
          switch (true) {
    // bof: block customers
            case ($_SESSION['customers_authorization'] > '0'):
            // customer must be logged in to browse
            return TEXT_AUTHORIZATION_PENDING_PRICE;
            break;
    // eof: block customers
            case (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == ''):
    /includes/functions/functions_general.php

    around line 1087:
    Code:
          switch (true) {
    // bof: block customers
            case ($_SESSION['customers_authorization'] > '0'):
            // customer must be logged in to browse
            return TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE;
            break;
    // eof: block customers
            case (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == ''):
    See if this works better for you ...
    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. #13
    Join Date
    Jul 2013
    Location
    Brisbane, Australia
    Posts
    39
    Plugin Contributions
    0

    Default Re: Customers authorization status

    Quote Originally Posted by Ajeh View Post
    You need to do some customization to have a new account be set to Authorized but still be able to change that after the fact and be able to change it while a customer is logged in so that the next click will reflect the change ...

    Edit the file:
    /includes/modules/create_account.php

    and add the code in RED around line 69:
    Code:
      $fax = zen_db_prepare_input($_POST['fax']);
    // bof: override CUSTOMERS_APPROVAL_AUTHORIZATION and set to 0 for approved
    //  $customers_authorization = CUSTOMERS_APPROVAL_AUTHORIZATION;
     $customers_authorization = 0;
    // eof: override CUSTOMERS_APPROVAL_AUTHORIZATION and set to 0 for approved
     $customers_referral = zen_db_prepare_input($_POST['customers_referral']);
    around line 260 or so:
    Code:
                                'customers_default_address_id' => 0,
                                'customers_password' => zen_encrypt_password($password),
    // bof: override CUSTOMERS_APPROVAL_AUTHORIZATION and set to 0 for approved
    //                            'customers_authorization' => (int)CUSTOMERS_APPROVAL_AUTHORIZATION
                               'customers_authorization' => (int)$customers_authorization
    // eof: override CUSTOMERS_APPROVAL_AUTHORIZATION and set to 0 for approved
       );
    ....
    I know it’s been a long time since this thread was active but I'm hoping Ajeh, or someone else, can to help me with the code changes need for ZC 1.5.5e to achieve either:
    1. ideally, the proposed solution above, or
    2. at the very least, have customers who register to shop automatically authorized to buy and so can shop immediately instead of needing to wait until we manually approve them to shop.


    I couldn't progress past step 1 of Ajeh's recommended changes (thanks for those - this is the closest solution I've been able to find yet) since my ZCv1.5.5e version of that create_account.php file looks quite different from step 2 code. BTW, none of my plug-ins have amended the /includes/modules/create_account.php file.

    My current admin settings:
    Customer Shop Status - View Shop and Prices = 0
    Customer Approval Status - Authorization Pending = 3

    The 2nd setting is needed (as far as my research as shown) because:
    • The website’s default display prices need to include the local Aussie tax (GST) by law;
    • I need to know a customer’s address (i.e. they need to log in) before prices can be changed before purchase if they ship outside AUS
    • The normal delay before we manually give authorization will, I suspect, result in lost customers who get frustrated that they’ve registered but still can’t shop immediately.


    My current system:
    • Zen Cart v1.5.5e
    • local WAMP + SSL (apache 2.4.23; mysql 5.7.14; php 5.6.25) – expect to go live in early 2018
    • Plugins:
      • Clone of Responsive Sheffield Blue v2.0 (amended for compatibility with ZC1.5.5)
      • One Page Checkout v1.4.1
      • Direct Bank Deposit V1.5.3-revised; Australia Post Shipping Module v2.2.1
      • Image Handler v5.0.0Beta4, Database I/O v1.4.0, backup_mysql_plugin_v5c; Product Images on Invoice, Email v1.1; Ckeditor v3.7;
      • Super Orders v4.0.10, Edit Orders v4.3.0, Ty Package Tracker v3.1.5
      • Sales Report v3.2.0


    Thanks in advance. Zen Cart rocks!

  4. #14
    Join Date
    Jul 2013
    Location
    Brisbane, Australia
    Posts
    39
    Plugin Contributions
    0

    Default Re: Customers authorization status

    After lots more searching, I think I may have found the answer.

    In case it helps others...to make it so that a new account is set to Authorized as default (a solution for ZCv1.5.5e):


    1. Make a copy of \includes\modules\create_account.php in \includes\modules\YOUR-TEMPLATE\ create_account.php (or amend the second one if it is created already
    2. At about line 277, comment out the existing line (1st line below) and replace it with the 2nd line below:


    Code:
    //   array('fieldName'=>'customers_authorization', 'value'=>$customers_authorization, 'type'=>'integer'),
          array('fieldName'=>'customers_authorization',  'value'=> 0, 'type'=>'integer'),
    Any customer's status can then be manually changed at any later time via ADMIN>Customers>Customers and either changing the Authorized status from a green tick to a red cross - or editing the Customers Authorization Status from 'Approved' to another setting as required.

    If I'm mistaken or there's a better way to do it, please let me know.

    Thanks
    Cheers...Gerri

  5. #15
    Join Date
    Jul 2013
    Location
    Brisbane, Australia
    Posts
    39
    Plugin Contributions
    0

    Default Re: Customers authorization status

    And thanks to Dr Byte who pointed me in the right direction, way back when, in post #2 here.

  6. #16
    Join Date
    Aug 2005
    Location
    SF Bay Area, California, USA
    Posts
    89
    Plugin Contributions
    0

    Default Re: Customers authorization status

    Hello,

    I am setting up a new store in v1.5.7c, with a B2B environment and will manually approve registration requests as they come in. That functionality works well at this point, but I am wondering how I might be able to trigger an automatic notification email once the registration is approved in the admin. Any suggestions are appreciated.

    Cheers, chrx

  7. #17
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,541
    Plugin Contributions
    19

    Default Re: Customers authorization status

    If I remember correctly, the email notification is triggered only when you approve the account by using the red/green status icon in the customer listing, but it does NOT trigger if you edit a customer and then change status on the edit page.

  8. #18
    Join Date
    Aug 2005
    Location
    SF Bay Area, California, USA
    Posts
    89
    Plugin Contributions
    0

    Default Re: Customers authorization status

    Thank you balihr! And thank you as well, for your initial advise on all of this.

    I ran another registration test right after posting this question and just figured that out. On my initial tests, I was using the *Customers Authorization Status* pull-down within the specific Customers info page to revise the status and found there was no notification sent. Just on a whim I tried clicking the red *Authorized* icon on the Customers list page and that triggered the notification email. Perfect!

  9. #19
    Join Date
    Jun 2009
    Location
    Sparta, TN
    Posts
    158
    Plugin Contributions
    0

    Default Re: Customers authorization status

    157C, clone a template, SiteMapXML v4.0.0
    I had a customer that was able to purchase erroneously with a New Zealand address, but marked as United States (our store default). I was able to change the "Customers Authorization Status" with the pull down, but had to click the "update" button twice before selection took effect.
    My store - closed 12/05/2023
    1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

  10. #20
    Join Date
    Jun 2009
    Location
    Sparta, TN
    Posts
    158
    Plugin Contributions
    0

    Default Re: Customers authorization status

    Quote Originally Posted by VDecalS View Post
    157C, clone a template, SiteMapXML v4.0.0
    I had a customer that was able to purchase erroneously with a New Zealand address, but marked as United States (our store default). I was able to change the "Customers Authorization Status" with the pull down, but had to click the "update" button twice before selection took effect.
    .. I've now changed my CUTOMER DETAILS, "Create Account Default Country ID" to NONE. Now customer can see right away when I do not ship to them if not in the drop-down.
    My store - closed 12/05/2023
    1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v139h Customers Authorization Status
    By skipwater in forum General Questions
    Replies: 2
    Last Post: 10 Nov 2012, 03:52 AM
  2. eMail notification for Customers Authorization Status = Pending
    By Austria_Des in forum Managing Customers and Orders
    Replies: 4
    Last Post: 8 Mar 2009, 03:49 PM
  3. Customers Authorization Status
    By lps_01 in forum Managing Customers and Orders
    Replies: 1
    Last Post: 28 Dec 2008, 01:25 PM
  4. Customer Authorization Status Question??
    By dcfxking in forum General Questions
    Replies: 17
    Last Post: 18 Aug 2006, 10:02 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