Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Working with customer orders


Guest

Recommended Posts

When a customer places an order on our osCommerce site we receive an email receipt from Authorize.Net.

 

It contains name,email address and products ordered. We receive that email and process it and send the use their "unlock codes" to them.

 

However, Authorize.Net has been a target of DoS attacks and the email receipts are not as reliable.

 

I enabled the "Send Extra Order emails to .." feature. However, the users email address is not included in the copy.

 

How hard would it be to add the email address to the receipt? Which file generates this email? Thanks a million!

 

Thanks,

 

Jason Collier

http://www.CertFX.com

Link to comment
Share on other sites

  • 1 month later...

In checkout_process.php find this code:

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

...and change it to this:

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, $order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address']);

 

What that will do is the extra emails that are generated to the defined list via the admin control panel will be addressed FROM the customer. So, you will simply have to hit "reply" and it will be sent directly to the customer.

 

As an example, if John Doe orders something you will get the extra email addressed FROM John Doe [[email protected]]. Once you receive the email simply hit reply and it'll already be addressed to John Doe.

 

Bobby

Link to comment
Share on other sites

Bobby,

 

Let me follow this scenario.

 

You order from our site. You use email address [email protected]

 

The receipt email will be sent to you and appear as though it was from you? I would think that mail systems would consider that spam. ie: Mail from a local recipeint but coming from the Internet.

 

what about change it to this:

 

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT. ' ' . $order->customer['email_address'], $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

Would that add the email address to the end of the subject?

Link to comment
Share on other sites

Joel is correct...it only affects the "send extra emails" portion of the code. The customer's email will not be affected. They will still receive the same email invoice addressed FROM the store owner / store owner's email address.

 

Here is what it changes:

 

Normally, the invoice dispatched to the send extra email list will arrive addressed FROM the store owner/store owner's email address.just like the customer receives. The code above merely modifies who the email is addressed FROM. So, instead of the admins receiving an email from store owner / store owner's email address they receive one addressed FROM the customer.

 

If you still don't understand just change the code and do a test order. It will be clear what I'm trying to get across.

 

Bobby

Link to comment
Share on other sites

  • 8 months later...

Hi sorry for resurrecting an old thread, but just wanted to know if this could be modified to send an email to a dropshipper supplier if a certain category item was sold ?

Link to comment
Share on other sites

see if you can extract some code from this contrib:

 

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

 

where it says

+ added possibility to select for each item a supplier via admin interface. Added supplier admin screen.

 

and then add another sql field for the email address to the supplier sql table

 

Then in checkout_process.php you add an extra tep_mail function to send an email to the supplier.

 

just watch for compatibility issues.

Link to comment
Share on other sites

thanks for the pointer enigma

Its such a pity that contrib has been discontinued as it would be a worthy addition to our site.

 

I'll have a dig around and see if my coding is up to it :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...