Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Member Approval v 0.1


Guest

Recommended Posts

I thought I had all code entered correctly,

now I am getting this error in /admin/customer module

 

HEADING_TITLE  HEADING_TITLE_SEARCH  

TABLE_HEADING_LASTNAME TABLE_HEADING_FIRSTNAME TABLE_HEADING_ACCOUNT_CREATED TABLE_HEADING_ACTION  
1054 - Unknown column 'member_level' in 'where clause'

select count(*) as total from customers c left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id where member_level = '0'

[TEP STOP]
 

 

It apears that the admin email is sent however the customer email isnt sent.

 

Please advise, I really need to get this issue solved.... Thank you

 

Tony

Link to comment
Share on other sites

  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

Ok, I got the last problem solved.

However now I have a new one

 

Fatal error: Call to undefined function: tep_array_merge() in /home/knick-n/public_html/members/admin/members.php on line 110

Link to comment
Share on other sites

Im sorry snowman,

 

the credits at the bottom of the mod has your name on it.

oops

 

well that worked, now only prob I have is people actually being allowed to login.

even after aproved it wont allow login

 

:blink:

Link to comment
Share on other sites

Ok, I seem to have a few probs again...

the script works, great.

I have a few define problems

In admin where you accept members I have alot of undefined text

and in the email sent to members after approved I get this

 

 

Knick-nacks.com

EMAIL_SEPARATOR

EMAIL_TEXT_CONFIRM

 

EMAIL_CONTACT

 

EMAIL_WARNING

 

 

 

 

as well as an undefined email subject...

 

I figured I forgot to define something but I find NO more define files, and NONE for the admin/includes/languages/english.php

 

 

Thanks for your help

 

Tony

 

:blink:

Link to comment
Share on other sites

  • 3 weeks later...

Dootch,

 

I wish I could give you an answer... I havnt gotten it fixed as of yet...

the confirmation email is still all screwed up...... as soon as I get a fix I will post it, I promies

Link to comment
Share on other sites

OK Tony,

Here's what I did to get the confirm email to work. Sorry not worried about the header in admin as of yet.

 

in admin/members.php

 

about line 149

add this line just after <?php

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CUSTOMERS);

 

then in admin/includes/languages/english/customers.php

 

then add the defines (here is mine) at the end just above ?>

 

define('EMAIL_CONTACT', 'For help with any of our online services, please email us at: ' . STORE_OWNER_EMAIL_ADDRESS);

 

define('EMAIL_TEXT_CONFIRM', 'Your application to become a wholesale customer of EpicenterPC has been approved. You can now access pricing on the Epicenter site.<br>You can now take part in the <b>various services</b> we have to offer you. Some of these services include:' . "\n" . '<li><b>Permanent Cart</b> - Any products added to your online cart remain there until you remove them, or check them out.' . "\n" . '<li><b>Address Book</b> - We can now deliver your products to another address other than yours! This is perfect to drop ship direct to your customer.' . "\n" . '<li><b>Order History</b> - View your history of purchases that you have made with us.' . "\n" . '<li><b>Products Reviews</b> - Share your opinions on products with our other customers.' . "\n");

 

define('EMAIL_WARNING', '<b>Note:</b> This email address was used to request access to our wholesale website. If you did not signup to be a customer, please send an email to ' . STORE_OWNER_EMAIL_ADDRESS . "\n\n");

 

define('EMAIL_TEXT_SUBJECT', 'Account Approved');

 

define('EMAIL_SEPARATOR', '----------------------------------------------');

 

 

Add or take out the "\n" 's to suit your taste in spacing

 

Hope this helps...

Link to comment
Share on other sites

Tony,

One small thing about line 72 in admin/members.php change

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

to

<td class="pageHeading"><?php echo HEADING_TITLE_MEMBERS; ?></td>

 

and in

admin/includes/languages/english.php

 

change

define('HEADING_TITLE', 'Member approval');

to

define('HEADING_TITLE_MEMBERS', 'Member approval');

 

This only puts this heading in the Waiting for Approval section not all over the place....

Link to comment
Share on other sites

  • 4 months later...

Hi,

 

I have installed Member Approval v1.0 and added Member Approval v 1.3

I seem to have successfully installed everything, but I dont can't see how it all works.

When a new customer opens a new account should those details go to the Waiting Approval page as well as Customers? I only have a blank table with just headers.

no action button (button_activate.gif) to approve or reject.

At the moment it would appear I have to go into the phpMyadmin to activate the customers account.

 

When the customer attempts to log in without any warning he is returned to the log in page.

 

Has any one got this module working?

 

James

Link to comment
Share on other sites

Hi,

 

I've managed to get the module Member Approval v1.3 working better now. The new customer details appear in the Waiting Approval window and the activate buttons are present and function correctly. However when the new customer attempts to log in he still receives no error messages at all but is simply returned to the login.

 

Here are the changes I made to login.php and below it is the original login php.

 

<?php
/*
 $Id: login.php,v 1.80 2003/06/05 23:28:24 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
 if ($session_started == false) {
   tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
 }



 $error = false;
 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {
   $email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);
   $password = tep_db_prepare_input($HTTP_POST_VARS['password']);

// Check if email exists
   //$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
     $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id, member_level  from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");    

if (!tep_db_num_rows($check_customer_query)) {
     $HTTP_GET_VARS['login'] = 'fail';
   } else {
$check_customer = tep_db_fetch_array($check_customer_query);

// Check that password is good
     if (!tep_validate_password($password, $check_customer['customers_password'])) {
        $HTTP_GET_VARS['login'] = 'fail';
} else {
if ($check_customer['member_level'] == 0 ) {
         $HTTP_GET_VARS['login'] = 'invalid';
       } else {
       if (SESSION_RECREATE == 'True') {
         tep_session_recreate();
       }

 

<?php
/*
 $Id: login.php,v 1.80 2003/06/05 23:28:24 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
 if ($session_started == false) {
   tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);

 $error = false;
 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {
   $email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);
   $password = tep_db_prepare_input($HTTP_POST_VARS['password']);

// Check if email exists
   $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
   if (!tep_db_num_rows($check_customer_query)) {
     $error = true;
   } else {
     $check_customer = tep_db_fetch_array($check_customer_query);
// Check that password is good
     if (!tep_validate_password($password, $check_customer['customers_password'])) {
       $error = true;
     } else {
       if (SESSION_RECREATE == 'True') {
         tep_session_recreate();
       }

 

 

Does any one know if I need to change this code as well in some way?

 

$error = false;
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {
  $email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);
  $password = tep_db_prepare_input($HTTP_POST_VARS['password']);

 

James

Link to comment
Share on other sites

  • 10 months later...

Hi all,

 

I'm using the member approval mod by David beck, but I'm having a mare of a time trying to get it working.

 

Basically followed the instructions to the letter, but when a new user tries to sign up it shows a blank page rather than the signup form. The rest of the mod works fine.

 

I've done something wrong here, I just can't figure it out!

 

As well as the approval mod, I also have the login code on all relevant pages, so people can't view any products unless they login.

 

Please help!!

Link to comment
Share on other sites

Hi All;

 

I've tried to install this, but I am getting the following error when I try to log in as a user:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xxxxx/public_html/work/includes/functions/database.php on line 99

 

Then it gives me the log in page, with a warning near the top:

" Error: No match for E-Mail Address and/or Password."

 

when I DO try to log in, it takes me back to the log in page... probably something I've goosed....

 

2.2 ms2; member approval v1.5

 

Any ideas?

 

Cheers.

Edited by audioc
Link to comment
Share on other sites

  • 1 month later...

After Install Member Approval 1.5:

 

1. New Customer Account Can Be Create

2. Both Customer and Admin can receive an email about the New User Create.

3. In Administrator Page, Box "Customer" can see the "new Customer"

4. But there is no any "new customer" in the field of "Waiting Approval"

5. in "Waiting Approval" , it's show the following message:

"No Right Permission Access "

Please contact your Web Administrator to request

more access or if you found any problem.

 

Can any body tell me what was happen? Why I can't Approve the "new customer"?

Why it's show me the messaage "No Right Permission Access"

 

Please give me a hand

Thanks

 

Elbert

Link to comment
Share on other sites

I solve the problem now....

 

After you follow all the procedure to install the module of "Member Approval v1.5", you need to "Activate" this module in:

 

Adminstrator Panel > Under Administrator Box > File Access > Customer > choose the module "member.php" > Save

 

 

Elbert

Link to comment
Share on other sites

  • 1 month later...

I just installed this, and I am not sure it's doing what it is supposed to.

 

I wanted something that would only allow access to someone whose account had been approved. My vision was the visitor, upon arrival (unless logged in) would be greeted with the login/create account page. They would then wait for approval, then be allowed access to the catalog. Only upon activation would they be allowed to see categories, products, etc...

 

It appears that all this mod does is allow approval of the account, but not the permissions. Am I right on this? Does anyone have a further mod which does as I have described?

 

Thanks.

Link to comment
Share on other sites

I just installed this, and I am not sure it's doing what it is supposed to.

 

I wanted something that would only allow access to someone whose account had been approved.  My vision was the visitor, upon arrival (unless logged in) would be greeted with the login/create account page.  They would then wait for approval, then be allowed access to the catalog.  Only upon activation would they be allowed to see categories, products, etc...

 

It appears that all this mod does is allow approval of the account, but not the permissions.  Am I right on this?  Does anyone have a further mod which does as I have described?

 

Thanks.

 

Search for Membership in the contributionsection, and you will find what you want.

Link to comment
Share on other sites

This is what I did to resolve my issue. I put the following code in the <head> of index.php. I'm sure there is a better way, but this works.

 

<?
if (tep_session_is_registered('customer_id')) { 
echo "";
} else {
echo "<meta http-equiv=\"refresh\" content=\"0;url=login.php\">";
}
?>

 

And by the way, another GREAT contrib!! Love it!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...