Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Login with customers number 1.0


John Doswell

Recommended Posts

if you would like to search for customer numbers from admin/customers open

admin/customers.php

search for

$search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%' or a.entry_company like '%" . $keywords . "%'";

 

change it to

      $search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%' or c.customers_additional_customers_number like '%" . $keywords . "%' or a.entry_company like '%" . $keywords . "%'";

 

you will have to have the mod http://www.oscommerce.com/community/contributions,2242 installed or it will not work and dont forget to backup!!!

Link to comment
Share on other sites

i did not like the code to display the customer number in account_edit.php since the customer canot edit the number it is better to display it in account.php so i have moded the code and added it after

 

                    <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL') . '">' . EMAIL_NOTIFICATIONS_NEWSLETTERS . '</a>'; ?></td>
                 </tr>
                 <tr>
                   <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') . '">' . EMAIL_NOTIFICATIONS_PRODUCTS . '</a>'; ?></td>
                 </tr>
               </table></td>
               <td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>

<?php     
if (IQ_ADDITIONAL_CUSTOMERS_NUMBER == 'enable'){  ?>
</td>
               </table></td>
        </table></td>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><br><b><?php echo ENTRY_ADDITIONAL_CUSTOMERS_NUMBER; ?></b></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                 <tr>
                   <td class="main"><?php
 $account_query = tep_db_query("select c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, c.customers_telephone, c.customers_fax, c.customers_additional_customers_number, a.entry_cf 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)$customer_id . "'");
 $account = tep_db_fetch_array($account_query);

 echo '                       ' . tep_image(DIR_WS_IMAGES . 'arrow_green.gif', ''), ' ' . ENTRY_ADDITIONAL_CUSTOMERS_NUMBER . ' ' . '';
 echo $account['customers_additional_customers_number']; 
              
 }
?>

Link to comment
Share on other sites

to show the customer number in the overview from admin/customers

i have changed in admin/customers.php

 

<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><?php echo ENTRY_COMPANY; ?></td>

to

<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><?php echo ENTRY_COMPANY; ?></td>
<td class="dataTableHeadingContent"><?php echo ENTRY_ADDITIONAL_CUSTOMERS_NUMBER; ?></td>

 

then i have changed

 

<td class="dataTableContent"><?php echo $customers['entry_company']; ?></td>

to

<td class="dataTableContent"><?php echo $customers['entry_company']; ?></td>
<td class="dataTableContent" align="center"><?php echo $customers['customers_additional_customers_number']; ?></td>

 

then i have added the table to the query

$search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%' or c.customers_additional_customers_number like '%" . $keywords . "%' or a.entry_company like '%" . $keywords . "%'";
? ?}
? ?$customers_query_raw = "select distinct c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_group_id, a.entry_company, 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";

to

$search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%' or c.customers_additional_customers_number like '%" . $keywords . "%' or a.entry_company like '%" . $keywords . "%'";
? ?}
? ?$customers_query_raw = "select distinct c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_group_id, a.entry_company, c.customers_email_address, c.customers_additional_customers_number, 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";

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...
  • 1 month later...

hi,

looks like my contribution doesnt work! i looked in my customers database, all customers_additional_customers_number fields are empty!

 

maybe its because of this

<code>

if (IQ_ADDITIONAL_CUSTOMERS_NUMBER == 'enable') {

</code>

 

can s.o. please tell me how to activate this contribution?

 

thanks

mat

Link to comment
Share on other sites

I don't understand why there have been no solution posts for this contribution.....

 

 

This is the problem(s) I'm having so I"m HOPING someone out there will be able to help, even the developer of the Contribution!

 

 

 

When I installed "Login with customers number 1.0", everything worked fine except for the following:

 

1. Twelve Customers (BLANK) added to my Customers List

And when i go into the admin panel to Customers and try to edit or delete them, the following error would appear at the top of the page, and i wasn't able to edit or delete these 12 blank customer records:

Warning: reset(): Passed variable is not an array or object in C:\Inetpub\vhosts\abod-e.com\subdomains\store\httpdocs\portal\admin\includes\classes\object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in C:\Inetpub\vhosts\abod-e.com\subdomains\store\httpdocs\portal\admin\includes\classes\object_info.php on line 18

 

The only way I've been able to delete these records was by going into the DB directly and deleting from there - but shouldn't have to do that and I want/need to know if this is going to affect my store in any way by doing this.

 

 

2. I cannot find anywhere in the Admin Control Panel a new section etc where I can switch the module on or off.

 

3. How can I set it up so that when Admin assigns a customer number to a new customer, that an email can be sent out to the customer advising them of their new customer number?

 

Finally...

 

4. The customer number doesn't generate automatically... I have to set it manually in admin>customers>edit... is this normal?

 

 

Thanks for anyone's help :)

Link to comment
Share on other sites

  • 5 months later...
hi,

looks like my contribution doesnt work! i looked in my customers database, all customers_additional_customers_number fields are empty!

 

maybe its because of this

<code>

if (IQ_ADDITIONAL_CUSTOMERS_NUMBER == 'enable') {

</code>

 

can s.o. please tell me how to activate this contribution?

 

thanks

mat

 

I have the same problems al fields are empty it will not show de additional customers number

 

Anyone knows how to solve this

Link to comment
Share on other sites

  • 3 years later...

I also want to put the Customer Number on the Order Email... any ideas?

 

Thanks again!

Hi yours,

did you get the customers number in your Order mail ?

I am trying since hours to do that, but it wont work !

Everything works with the customers number but not in the order mail.

Please help me, I am getting sick and crazy....

 

Thx a lot

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...