Let me re-think this for what changes are required ... I will try to look at it this afternoon or tonight ...
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!
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:
around line 113:Code:// bof: block customers if (true || $_SESSION['customer_id'] != '') { // eof: block customers
/includes/functions/functions_prices.phpCode: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'] == ''):
around line 159:
/includes/functions/functions_general.phpCode: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'] == ''):
around line 1087:
See if this works better for you ...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'] == ''):
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!
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:
- ideally, the proposed solution above, or
- 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!
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):
- 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
- At about line 277, comment out the existing line (1st line below) and replace it with the 2nd line below:
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.Code:// array('fieldName'=>'customers_authorization', 'value'=>$customers_authorization, 'type'=>'integer'), array('fieldName'=>'customers_authorization', 'value'=> 0, 'type'=>'integer'),
If I'm mistaken or there's a better way to do it, please let me know.
Thanks
Cheers...Gerri
And thanks to Dr Byte who pointed me in the right direction, way back when, in post #2 here.
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
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.
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!
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)
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)
Bookmarks