Setting a customer's status e.g. "Pending approval - may browse no prices" doesn't seem to affect anything
Is there another switch in admin that I need to set?
thanks
Derek
Printable View
Setting a customer's status e.g. "Pending approval - may browse no prices" doesn't seem to affect anything
Is there another switch in admin that I need to set?
thanks
Derek
Check your settings in Configuration ... Customer Details ...
Quote:
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
Quote:
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
many thanks Linda - I was not aware of that switch!!
Not a problem ... I do like to make those things ... :cool:
I still seem to have a problem:
My client wants to let people register a new account as normal and automatically become approved, purchase and buy goods.
He would also like then the option of changing a customer's status to say:
Customer May Browse and May see Prices but Must be Authorized to Buy
where he has a dispute with the customer
I've tried setting this option for a dummy customer but it doesn't seem to work - the add to cart button is still active
I am a bit confused as to the combination of admin switches needed for this process
please help
Derek
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:
around line 260 or so: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']);
/includes/init_includes/init_customer_autho.phpCode:'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
);
and see if that works better for you ...Code:/**
* recheck customer status for authorization
*/
// bof: override CUSTOMERS_APPROVAL_AUTHORIZATION check approval each click
//if (CUSTOMERS_APPROVAL_AUTHORIZATION > 0 && ($_SESSION['customer_id'] != '' and $_SESSION['customers_authorization'] != '0')) {
if ($_SESSION['customer_id'] != '') {
// eof: override CUSTOMERS_APPROVAL_AUTHORIZATION check approval each click
$check_customer_query = "select customers_id, customers_authorization
many thanks Linda for taking the time and trouble to code this.
I thought it would be a simple option of changing the customer authorisation status using the customer admin section.
The site in question is busy at the moment but when I have the chance to implement these changes I'll report back to you
best regards
Derek
Hi Linda
I tried inserting your mods into the the two files and uploaded but it doesn't seem to have made any difference.
I logged in with my dummy account and set the customer authorisation status to
Pending approval - may browse no prices
but all the prices were still there as well as add to cart buttons
best regards
Derek
Make sure the 2 settings in post#2 are set to 2 ...
Go to your store as a guest, and everything should be:
Price Unavailable
APPROVAL PENDING
Make sure your test account is set to Green for Authorized, and then login ... you should see Prices and Add to Cart features ...
Now, in your Admin, click the Green icon on your test account customer and it will turn Red ... in the store click a link and everything should change back to:
Price Unavailable
APPROVAL PENDING
Then in the Admin, click the Red icon on your test customer so it turns Green and in the store click a link and you should see should Prices and Add to Cart features ...
thanks Linda
As I understand it, this would mean that by setting those options to 2:
2= May browse but no prices unless logged in
2= May browse but no prices unless Authorized
All visitors would have to register to see prices and then wait for authorisation from admin if new
My client prefers new visitors and registered customers to be able to browse and see prices and fill a shopping basket and then checkout either by creating a new customer account or by direct paypal etc.
Is this possible?
thanks
Derek
Let me re-think this for what changes are required ... I will try to look at it this afternoon or tonight ...
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'] == ''):
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.