Zen Follower
- Join Date:
- Jul 2008
- Posts:
- 162
- Plugin Contributions:
- 0
Customers authorization status
Is there another switch in admin that I need to set?
thanks
Derek
Zen Follower
Oba-san
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
Zen Follower
Oba-san
Zen Follower
Oba-san
$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']); '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
);/**
* 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_authorizationZen Follower
Zen Follower
Oba-san
Zen Follower
Oba-san
Oba-san
// bof: block customers
if (true || $_SESSION['customer_id'] != '') {
// eof: block customers
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'] == ''): 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'] == ''): 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'] == ''):New Zenner
Ajeh:
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:
$fax = zen_db_prepare_input($_POST['fax']); // bof: override CUSTOMERS_APPROVAL_AUTHORIZATION and set to 0 for approved [B]//[/B] $customers_authorization = CUSTOMERS_APPROVAL_AUTHORIZATION; $customers_authorization = 0; [B]// eof: override CUSTOMERS_APPROVAL_AUTHORIZATION and set to 0 for approved[/B] $customers_referral = zen_db_prepare_input($_POST['customers_referral']);
around line 260 or so:
'customers_default_address_id' => 0, 'customers_password' => zen_encrypt_password($password), // bof: override CUSTOMERS_APPROVAL_AUTHORIZATION and set to 0 for approved [B]//[/B] 'customers_authorization' => (int)CUSTOMERS_APPROVAL_AUTHORIZATION 'customers_authorization' => (int)$customers_authorization [B]// eof: override CUSTOMERS_APPROVAL_AUTHORIZATION and set to 0 for approved[/B] );
....
New Zenner
// array('fieldName'=>'customers_authorization', 'value'=>$customers_authorization, 'type'=>'integer'),
array('fieldName'=>'customers_authorization', 'value'=> 0, 'type'=>'integer'),New Zenner
New Zenner
Totally Zenned
New Zenner
Zen Follower
Zen Follower
VDecalS:
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.
Destination thread ID and reason are required when shown.
Tell staff why this post should be reviewed.
Required for login, security, and core site functionality.
Help us understand how the site is used so we can improve it.
Used for promotion and personalized campaign measurement.