Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can you display new customers by date not name ??


WiseWombat

Recommended Posts

Posted

Hi I'm curious as if you can display all new customers in your admin from the latest customer to the oldest customer in your data base by date rather then name.

This would save time looking through your new customer list from A to Z ???

Thanks .Martin :blink:

( WARNING )

I think I know what Im talking about.

BACK UP BACK UP BACK UP BACK UP

Posted
Hi I'm curious as if you can display all new customers in your admin from the latest customer to the oldest customer in your data base by date rather then name.

This would save time looking through your new customer list from A to Z ???

Thanks .Martin  :blink:

 

yes, but not easy as you need to join the normal customers table with the customers_info table because there the create date is stored.

Treasurer MFC

  • 1 month later...
Posted
I was wondering was this possible?

 

Hey thanks Martin!

 

 

replace this query in customers.php :

 

$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";

 

 

with this one :

 

$customers_query_raw = "

select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id, ci.customers_info_date_account_created from

" . TABLE_CUSTOMERS . " c,

" . TABLE_ADDRESS_BOOK . " a,

" . TABLE_CUSTOMERS_INFO . " ci

where c.customers_id = a.customers_id and

c.customers_default_address_id = a.address_book_id and

c.customers_id = ci.customers_info_id

" . $search . "

order by ci.customers_info_date_account_created desc,

c.customers_lastname,

c.customers_firstname";

Treasurer MFC

Posted

There's really no need to look up the new table...you can get the same functionality by;

 

$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_id DESC";

 

This assumes of course that you don't want/need to actually do anything with the "date account created".

Posted

there is contribution for this .. it works .. i have tested it .. but you cannot do search for Customers with this contribution !

 

i already posted this in Contribution section, but there was no reply

Posted

Martin has a link in his signature:

 

In catalog/admin/customers.php

Find this (around line 719):

$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";

Replace with this (comments out exissting code and adds new code with new sort order):

  //<!--- $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";--->
         $customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id, ci.customers_info_date_account_created from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " a, " . TABLE_CUSTOMERS_INFO . " ci where c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id and c.customers_id = ci.customers_info_id " . $search . " order by ci.customers_info_date_account_created desc, c.customers_lastname, c.customers_firstname";

Posted
there is contribution for this .. it works .. i have tested it .. but you cannot do search for Customers with this contribution !

 

i already posted this in Contribution section, but there was no reply

 

 

Ahh Man! Your right! You must be talking about Martin's Contribution. I just tried to do a search and it gave me an error....

 

...Maybe Burt or Amanda's code.....hmmmmmm

Posted
Ahh Man!  Your right!  You must be talking about Martin's Contribution.  I just tried to do a search and it gave me an error....

 

...Maybe Burt or Amanda's code.....hmmmmmm

 

here you go click

Posted

Tried Boxtel's code and got error when I tried to do a search.

 

Tried Burt's code and NO Error when I tried to do a search for a customer.

 

Hey Burt I think many people would like to have this type of functionality in their admin>>customers

 

...maybe post in Tips&Tricks....or upload your code fixing Martin's contribution....

 

Thanks Burt! And Thanks Amanda!

 

:::Edited:::

 

I thought thats what you thought I meant. I had a small laugh... Use Burts code Greg..works without any problems.

Posted
Tried Boxtel's code and got error when I tried to do a search.

 

Tried Burt's code and NO Error when I tried to do a search for a customer.

 

Hey Burt I think many people would like to have this type of functionality in their admin>>customers

 

...maybe post in Tips&Tricks....or upload your code fixing Martin's contribution....

 

Thanks Burt!  And Thanks Amanda!

 

:::Edited:::

 

I thought thats what you thought I meant.  I had a small laugh...  Use Burts code Greg..works without any problems.

 

yeahh .. it really works .. thanx a lot.

Posted
No worries.  Glad it helped.

 

I did make a larger contribution a long time ago (since updated by others):

http://www.oscommerce.com/community/contributions,223

 

;)

 

Thanks Burt! And Thanks Amanda!

The original contribution was made be amanda I just thought I would post is as I thought it was a good idea to use this feature.

I didnt release that there was an error in the customers search bar?

I have tried burts code and it tests fine.

I will up load the fix..

 

Thanks.

( WARNING )

I think I know what Im talking about.

BACK UP BACK UP BACK UP BACK UP

Archived

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

×
×
  • Create New...