SUGGESTION : in 'manage customers' make customer email address mailto

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 年 前
when we search for customers in admin, we get a grid of customer details :

Email : Name : Active : Registration date : Edit


i suggest making the Email addresses here either simply

a     mailto:       protocol

to use your own e-mail software or link it to the carts own e-mail functionality

this would make it very quick and easy to contact a customer.



EDIT

v1.5 an 'email customer' function is now included in the customer details page (email tab)   :)
14 年 前
Thanks
13 年 前
haydie wrote:
when we search for customers in admin, we get a grid of customer details :

Email : Name : Active : Registration date : Edit


i suggest making the Email addresses here either simply

a     mailto:       protocol

to use your own e-mail software or link it to the carts own e-mail functionality

this would make it very quick and easy to contact a customer.


First of all, Thank for you very much for your contribution for this great solution ;) Nice job.

In the same page for searching custumers in Admin. I like to add a text box that we can search custumers by name.

Many of our custumers have mail like [email protected] or [email protected] so it will be more efficient if we can search by name.  

I found that changes must be done in Administration>Modules>Custumurs.ascx but i'dont knoe how to do it.
Thanks for you help.
13 年 前
krimos,

I have a hack for adding the customer name to the search, if you are interested. Everything is done with SQL through SQL Server Management Studio (or whatever SQL tool you use).

First run this:

Update Nop_LocaleStringResource
SET ResourceValue = 'Name/Email: '
WHERE LocaleStringResourceID = '8222'

Update Nop_LocaleStringResource
SET ResourceValue = 'The name or email of the customer.'
WHERE LocaleStringResourceID = '8223'

You can set the "ResourceValue" to whatever you would like and you should probably make sure that the LocaleStringResourceIDs for the email label and tooltip are correct for you.

This will change the label and tooltop for "email" on /administration/customers.aspx.

Next run this:

USE [*YOURDATABASENAME*]
GO
/****** Object:  StoredProcedure [dbo].[Nop_CustomerLoadAll]    Script Date: 09/09/2010 08:59:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[Nop_CustomerLoadAll]
(
  @StartTime        datetime = NULL,
  @EndTime        datetime = NULL,
  @Email          nvarchar(200),
  @Username        nvarchar(200),
  @DontLoadGuestCustomers  bit = 0,
  @PageSize        int = 2147483644,
  @PageIndex        int = 0,
  @TotalRecords      int = null OUTPUT
)
AS
BEGIN

  SET @Email = isnull(@Email, '')
  SET @Email = '%' + rtrim(ltrim(@Email)) + '%'
  
  SET @Username = isnull(@Username, '')
  SET @Username = '%' + rtrim(ltrim(@Username)) + '%'

  --paging
  DECLARE @PageLowerBound int
  DECLARE @PageUpperBound int
  DECLARE @RowsToReturn int
  DECLARE @TotalThreads int
  
  SET @RowsToReturn = @PageSize * (@PageIndex + 1)  
  SET @PageLowerBound = @PageSize * @PageIndex
  SET @PageUpperBound = @PageLowerBound + @PageSize + 1

  CREATE TABLE #PageIndex
  (
    IndexID int IDENTITY (1, 1) NOT NULL,
    CustomerID int NOT NULL,
    RegistrationDate datetime NOT NULL,
    Name nvarchar(200),
  )
  
  INSERT INTO #PageIndex (CustomerID, RegistrationDate, Name)
  SELECT DISTINCT  c.CustomerID, c.RegistrationDate, c3.Name
  FROM [Nop_Customer] c with (NOLOCK)
  LEFT OUTER JOIN (SELECT c1.CustomerId as CustomerId, (c1.Value + ' ' + c2.Value) as Name
  FROM (SELECT customerid, value FROM Nop_CustomerAttribute with (NOLOCK) where "Key" = 'FirstName') as c1
  LEFT OUTER JOIN (SELECT customerid, value FROM Nop_CustomerAttribute with (NOLOCK) where "Key" = 'LastName') as c2
  ON c1.CustomerID = c2.CustomerID) as c3
  ON c.CustomerID = c3.CustomerId
  WHERE
    (@StartTime is NULL or @StartTime <= c.RegistrationDate) and
    (@EndTime is NULL or @EndTime >= c.RegistrationDate) and
    (patindex(@Email, isnull(c.Email, '')) > 0) and
    (patindex(@Username, isnull(c.Username, '')) > 0) and
    (@DontLoadGuestCustomers = 0 or (c.IsGuest=0)) and
    c.deleted=0 OR
    (@StartTime is NULL or @StartTime <= c.RegistrationDate) and
    (@EndTime is NULL or @EndTime >= c.RegistrationDate) and
    (@DontLoadGuestCustomers = 0 or (c.IsGuest=0)) and
    (patindex(@Username, isnull(c.Username, '')) > 0) and    
    c3.Name LIKE '%'+@Email+'%'
  order by c.RegistrationDate desc

  
  SET @TotalRecords = @@rowcount  
  SET ROWCOUNT @RowsToReturn
  
  SELECT  
    c.CustomerId,
    c.CustomerGuid,
    c.Email,
    c.Username,
    c.PasswordHash,
    c.SaltKey,
    c.AffiliateId,
    c.BillingAddressId,
    c.ShippingAddressId,
    c.LastPaymentMethodId,
    c.LastAppliedCouponCode,
    c.GiftCardCouponCodes,
    c.CheckoutAttributes,
    c.LanguageId,
    c.CurrencyId,
    c.TaxDisplayTypeId,
    c.IsTaxExempt,
    c.IsAdmin,
    c.IsGuest,
    c.IsForumModerator,
    c.TotalForumPosts,
    c.Signature,
    c.AdminComment,
    c.Active,
    c.Deleted,
    c.RegistrationDate,
    c.TimeZoneId,
    c.AvatarId
  FROM
    #PageIndex [pi]
    INNER JOIN [Nop_Customer] c on c.CustomerID = [pi].CustomerID
  WHERE
    [pi].IndexID > @PageLowerBound AND
    [pi].IndexID < @PageUpperBound
  ORDER BY
    IndexID
  
  SET ROWCOUNT 0

  DROP TABLE #PageIndex
  
END

Remember to put your database name in the USE part.

This will cause the stored procedure to search for whatever is in the old "email" field, whether it is an email or name, and it will return the customer either way.

I would have liked to add a separate box to search on names, but doing so would require changes to multiple files and possibly rebuilding certain parts. I tried to add an extra box at first but found this way was WAY easier. You don't even need to modify any files, it is all in SQL.

Hope this helps.
13 年 前
haydie,

You can make the customer emails into links pretty easily. All you have to do it edit Customers.ascx (administration/modules) and replace line 90 with this:

<a href="CustomerDetails.aspx?CustomerID=<%#Eval("CustomerId")%>&TabID=8"><%#GetCustomerInfo((Customer)Container.DataItem)%></a>

That will make the customer's email into a link on Customers.aspx that will bring you to CustomerDetails.aspx and have it be open on the tab where you send email from within nopCommerce. Thanks to whoever built-in the TabID :)

You can, of course, just put a mailto reference in the href - but I hate those.
13 年 前
Thank you very much bfranklin825.
Perfect help ;)

For those who use other languages
try to change LocaleStringResourceID and/or ResourceValue

Here is example for Frensh version :

Update Nop_LocaleStringResource
SET ResourceValue = 'Nom/Email: '
WHERE LocaleStringResourceID = '13829'

Update Nop_LocaleStringResource
SET ResourceValue = 'Nom/Email du client'
WHERE LocaleStringResourceID = '13830'
13 年 前
Hey guys !!

Any thing done for Nop 1,90 ?

Thank you for help :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.