Forums / Managing Customers and Orders / Adding Customer email address to order listing page

Adding Customer email address to order listing page

Locked

Started by totalsam on 4 Feb 2010, 2:19 PM · Views: 1,593

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
4 Feb 2010, 2:19 PM
#1
totalsam avatar

totalsam

Zen Follower

Join Date:
Jan 2009
Posts:
126
Plugin Contributions:
0

Adding Customer email address to order listing page

HI,

I am trying to code in an additional link on the orders listing page to email a customer.

Everything so far is working fine, I have produced the mailto coding which includes a set subject and signature for the message and have included the order ID and various other things in.

Unfortunately I am struggling to draw the customers email address from the database in order to send the email (obviously a major flaw!)

I have attempted the following so far with no luck:

$customers->fields['customers_email_address']
$orders->fields['customers_email_address']
$orders->fields['orders_id']
$order->customer['email_address']

I feel it should be obvious but I'm not managing it.

Any help would be much appreciated!

Thanks
Sam

4 Feb 2010, 5:07 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Adding Customer email address to order listing page

Um ... if you click on a given order, then there will be an "Email" button in the sidebox ... making it easy to send an email to them.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Feb 2010, 5:28 PM
#3
totalsam avatar

totalsam

Zen Follower

Join Date:
Jan 2009
Posts:
126
Plugin Contributions:
0

Re: Adding Customer email address to order listing page

Thanks,

Unfortunately I don't have this option in the sidebox for some reason. I have Details, Invoice, Shipping Label, Packing Slip and delete, even so it would still be an extra click for every message which I am trying to avoid.

I can go through to the order details page and click email from there but it would be a million times easier if i could do it off the orders listing page. Just need to know what part of the database its in so I can use that little bit of code to pull up the customers address.

Sam

4 Feb 2010, 5:37 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Adding Customer email address to order listing page

Oh, my bad. The email button does only appear when viewing the order.

As to your custom coding, the information is in the customers_email_address field of the orders table. You'll have to retrieve that field data in your query and then use it for preparing your link.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Feb 2010, 5:39 PM
#5
totalsam avatar

totalsam

Zen Follower

Join Date:
Jan 2009
Posts:
126
Plugin Contributions:
0

Re: Adding Customer email address to order listing page

So $orders->fields['customers_email_address'] should work? or am I missing something equally as obvious?

4 Feb 2010, 6:00 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Adding Customer email address to order listing page

I would expect that to work, provided you're dealing with the code in the listing, and not sideboxes or the currently-clicked-on order.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Feb 2010, 6:04 PM
#7
totalsam avatar

totalsam

Zen Follower

Join Date:
Jan 2009
Posts:
126
Plugin Contributions:
0

Re: Adding Customer email address to order listing page

Unfortunately thats not working. Not producing and error but not bringing up the email address either!