zencart注册审核二次开发

2010-06-03 23:45 来源:www.chinab4c.com 作者:admin

        zencart注册功能其实和ecshop注册功能一样。我们可以通过zencart二次开发,对zencart进行登陆审核。注册的时候,默认未审核.当后台审核的时候,才能让zencart会员正常登陆。这个有利于将zencart用来做批发等功能.

1:
alter table zen_customers add column status int(1) default 0;


2:

 elseif($check_customer->fields['status']=='0'){
    $messageStack->add('login', '没被审核通过');
 }

3:includes/modules/create_account.php

unset($_SESSION['customer_id']);


4:admin/customers.php
 <tr>
            <td class="main">审核</td>
            <td class="main">
   <input type="radio" value="1" name="status"  <? if($cInfo->status == 1){ echo 'checked="checked"';}?>>通过
   <input type="radio" value="0" name="status"  <? if($cInfo->status == 0){ echo 'checked="checked"';}?> >未通过
            </td>
          </tr>

case 'update':
$status = zen_db_prepare_input($_POST['status']);

  'status'   => $status,


$customers = $db->Execute("select c.customers_id,c.status, c.customers_gender, c.customers_firstname,
                                          c.customers_lastname, c.customers_dob, c.customers_email_address,
                                          a.entry_company, a.entry_street_address, a.entry_suburb,
                                          a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id,
                                          a.entry_country_id, c.customers_telephone, c.customers_fax,
                                          c.customers_newsletter, c.customers_default_address_id,
                                          c.customers_email_format, c.customers_group_pricing,
                                          c.customers_authorization, c.customers_referral
                                  from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a
                                  on c.customers_default_address_id = a.address_book_id
                                  where a.customers_id = c.customers_id
                                  and c.customers_id = '" . (int)$customers_id . "'");

                   来源:http:www.chinab4c.com

来源于香港公司注册管理专家