Contributions
Control Login
This instruction will guide you to enable controlling over
signingup/logging in to your shopping cart. This will force your
customers to not be able to login, nor check out until you have
activate his account in admin area.
This mod is based on snapshot july 2002; however, it should work with
current snapshot, wouldn't be hard to adjust it.
Expand All / Collapse All
V2.2 Cumulative Patch for OSC 2.2 RC2a
Cumulative patch files for osCommerce 2.2 RC2a release.
- Cleaned up instructions,
- included working version of email notification (truly fixed the parse error),
- separated out email text to language file.
Finally works as you'd expect!
When a customer registers, their membership has to be approved by the admin (Activate/Deactivate/Edit/Delete/See Orders/Email). Once approved, an email will be sent to the customer letting them know they can now log in.
You may want to edit the language of the create_account_success.php page to make it more noticeable that a separate verification email will be sent upon activation.
Full Package with screenshot.
From kesters last post I figured it out. The customers_status column needs to be added to the query above where the data gets used.
In admin/customers.php
Find this:
QUOTE
$customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by c.customers_lastname, c.customers_firstname";
Change to this:
QUOTE
$customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_status, a.entry_country_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by c.customers_lastname, c.customers_firstname";
--------------------
Gary
Corrected the parse error on line 74
mail ($email,
Corrected sql errors add the table at the begining of the table not the end.
Constantly get a parse error on this mod. Am not clever enough with php to debug.
Attachment is empty
A mod to the customers.php file so that the user is notified by email once the account has been activated. Does not do anything when account is de-activated, but you could easily hack the code to do so by setting the if($HTTP_GET_VARS['flag'] == condition to '0'.
I applied all of the patches into the current release of osCommerce, 2.2 MS2. I created this archive that includes the patched files, so you can simply unzip it into your osCommerce 2.2 MS2 installation.
See the README for details.
Itīs any Problem with Login and Error
Please in login.php
after:
$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id, customers_status from " . TABLE_CUSTOMERS . " where customers_status = '1' and customers_email_address = '" . tep_db_input($email_address) . "'");
if (!tep_db_num_rows($check_customer_query)) {
insert:
$error = true;
follow dosenīt change:
$HTTP_GET_VARS['login'] = 'fail';
} else {
$check_customer = tep_db_fetch_array($check_customer_query);
And than itīs work for Error in Login
Read Howto to Solve following Bug.
User that just registered is already logged in, even that the customers_status is set to '0'. Only after logging out, he/she can't login anymore until account has been activated.
Matt and another guy (I forgot his name, sorry :( ) emailed me the fix.
Credits for the fix shall go to them :D
Fixed:
1. Error when customer just signed up and automatic log in. This fix will kill the session and the customer will have to wait until you activate him in admin area so he can log in/checkout.
2. Error in admin area, when you activate/deactivate the customer, this fixed from global activation to an individual activation.
That's all. This should work perfectly as it does for my site. Enjoy!
I forgot one more change. Here's an update.
This instruction will guide you to enable controlling over
signingup/logging in to your shopping cart. This will force your
customers to not be able to login, nor check out until you have
activate his account in admin area.
This mod is based on snapshot july 2002; however, it should work with
current snapshot, wouldn't be hard to adjust it.
Note: Contributions are used at own risk.