Jump to content

Archived

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

multimixer

Email issues

Recommended Posts

Just wanted to say THANK YOU

 

I needed to include a heading into the order email and reading through I figured it out (and I am no PHP guru!)

 

Great to have so much help

 

Thanks again :)

Share this post


Link to post
Share on other sites

Hi there,

 

thanks for this cool list of things, i've been installing some of them and they are working great.

 

i just have one question;

 

on the thing for adding a greeting to the customer order update email, i have it set up now and its working cool.

 

but it puts their whole name, so it says Dear Bob Smith, what i would like to do is just have it say Dear Bob.

 

i had a look in the database and the orders table has the full name, so i have passed my level of knowledge.

 

any ideas how to do this?

 

cheers,

 

AL

Share this post


Link to post
Share on other sites

This query takes the customer name from "table_orders" of your DB

		$check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");
	$check_status = tep_db_fetch_array($check_status_query);

 

To get just the first name, you need to change this, to get the first name from "table_customers" ie

c.customers_firstname (look at other queries about how they separate what data from what table, and how they connect different id's (ie the order_id and customers_id)

 

and then just do a

$customers_firstname = $check_status ['customers_firstname'];

, place it before the tep mail function and then replace there the $customers_name with $customers_firstname

 

I'm sorry that I do not post the complete lines of code, it's because of lack of time, maybe later I will do and post. If you succeed to do, then it would be great to post it here

Share this post


Link to post
Share on other sites

hi there,

 

thanks for that, i gave it a go, and could not make it work. if you have time, would you be able to post the full code?

 

Cheers,

 

AL

Share this post


Link to post
Share on other sites

Hi multimixer,

 

I want to put a greeting into the order confirmation email, and a few extra lines of text to make it a bit more personal. However, I find that the changes I make don't seem to take effect. Even when I comment out EMAIL_SEPARATOR . "\n", the separator lines still appear. This is all I really want to add:

 

$email_order = EMAIL_TEXT_GREETING . ' ' . $order->customer['firstname'] . "\n\n" .

//STORE_NAME . "\n" .

//EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

 

But like I say, the text_greeting doesn't appear and the separator lines still appear even thought they're commented out.

 

Given that you've dont such a great job here with the email mods, I wondered if this was a problem you've come accross or know why it's happening.

 

Cheers,

Col

Share this post


Link to post
Share on other sites
I want to put a greeting into the order confirmation email, and a few extra lines of text to make it a bit more personal.

 

I don't know why this happens. Maybe you try this

$email_order .= EMAIL_TEXT_GREETING  .  '  '  .  $order->customer['firstname'] . "\n\n" .
			   //STORE_NAME . "\n" . 
							 //EMAIL_SEPARATOR . "\n" . 
							EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
							EMAIL_TEXT_INVOICE_URL .  '  '  . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
			 EMAIL_TEXT_DATE_ORDERED .  '  '  . strftime(DATE_FORMAT_LONG) . "\n\n";

 

and also don't forget to upload the file and make the text definition in your language file.

 

What is if you delete the email separator and the store name? Are you sure that the separator that you see appear at this part of the mail and not lower?

Share this post


Link to post
Share on other sites
I don't know why this happens. Maybe you try this

$email_order .= EMAIL_TEXT_GREETING  .  '  '  .  $order->customer['firstname'] . "\n\n" .
			   //STORE_NAME . "\n" . 
							 //EMAIL_SEPARATOR . "\n" . 
							EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
							EMAIL_TEXT_INVOICE_URL .  '  '  . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
			 EMAIL_TEXT_DATE_ORDERED .  '  '  . strftime(DATE_FORMAT_LONG) . "\n\n";

 

and also don't forget to upload the file and make the text definition in your language file.

 

What is if you delete the email separator and the store name? Are you sure that the separator that you see appear at this part of the mail and not lower?

 

multimixer,

 

If I comment out the separator and the store name, they still appear in the email. I haven't tried deleting them outright. I wondered is it possible to send this email without purchasing anything, i.e. to test it to see how things look, without going thru the procedure og actually placing an order.

 

Cheers,

Col

Share this post


Link to post
Share on other sites

Hello,

 

I have been using and learning osc commerce version 2.2 RC2 for some months now.

 

I have just found that when a new customer joins the welcome email does not send?

 

I can send emails from the send email page in tools fine, I have checked several different addresses but I cannot find a reason why they won't send from the registration page.

 

I have had a good hunt round the forum and there is some great stuf that I will come back to and use but I can't find an answer to this problem.

 

Any ideas would be most welcome.

 

Tom

Share this post


Link to post
Share on other sites
I have just found that when a new customer joins the welcome email does not send?

 

Osc does not send new registration emails to the store owner by default.

 

I described in post #1 of this topic what to do if you want to have this

Share this post


Link to post
Share on other sites

Sorry I should have been more specific.

 

The new customer does not recieve the welcome email.

 

I have registered various test accounts and I cannot make the welcome email send from my store to the new accounts.

 

Hope that explains the problem a bit better.

 

Tom

Share this post


Link to post
Share on other sites
The new customer does not recieve the welcome email.

 

Ok, it's clear now what the problem is.

 

Does the customer receive the order confirmation mail? If YES then can you post the relevant content of your create_account.php?

 

The relavant lines are

// build the message content
.
.
.
.
.
.
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));

Share this post


Link to post
Share on other sites

No I have just done some tests and an order confirmation is not recieved by the customer iether.

 

I was sent one to my admin account.

 

What other tests should I run to give you a clue what the problem might be?

 

Thanks

 

Tom

Share this post


Link to post
Share on other sites
No I have just done some tests and an order confirmation is not recieved by the customer iether.

 

I was sent one to my admin account.

 

What do you mean? Does the store owner received an email? And the customer not? You need to be specific please

Share this post


Link to post
Share on other sites

Sorry for the confusion.

 

I have set up a test customer with a yahoo email adress.

 

When I registered the test customer no email was sent to the yahoo adress.

 

I made a test purchase and no confirmation email was sent to yahoo.

 

My admin email adress recieved a copy of the confirmation.

 

I have set up other test customers with hotmail and google mail accounts and both of these recieved emails.

 

I am now very confused.

 

I will try again tomorrow.

 

If anyone would care to try the registration for me the site is

 

http://studulike.turnerclan.co.uk

 

Thanks again

 

Tom

Share this post


Link to post
Share on other sites
I have set up a test customer with a yahoo email adress.

I made a test purchase and no confirmation email was sent to yahoo.

My admin email adress recieved a copy of the confirmation.

I have set up other test customers with hotmail and google mail accounts and both of these recieved emails.

 

I also got your registration mail just after registration.

 

It looks like all mail works fine, except for yahoo. How does the contact us form work? Is there a difference for yahoo and non yahoo senders?

Share this post


Link to post
Share on other sites
I also got your registration mail just after registration.

 

It looks like all mail works fine, except for yahoo. How does the contact us form work? Is there a difference for yahoo and non yahoo senders?

 

 

The contact form seems to work ok. I filled it in with a yahoo email adress and my admin email recieved the queary.

 

I think that the yahoo email problem was on the yahoo side. I sent an email from my yahoo account to my store admin adress and added my admin adress as a contact on my yahoo account.

Now yahoo account recievs emails from my store.

 

I will need to put some warnings on my regisration and contact pages to let people with yahoo accounts knwo this.

 

Thanks again for all your help..

 

Tom

Share this post


Link to post
Share on other sites

Hello,

 

Having the same problem with the contact us page as before (noLanguage string failed to load: recipients_failedwebmaster@xxxx.com). The funny thing is that I had this problem a month ago and it mysteriously solved itself. Now it is the same issue all over again. My host, GISOL, claims it is none of their problem, and I have nothing more to try. I have changed antispam settings, edited the contact_us page as explained in this topic, emptied the mailbox, etc.

 

Please, ANY help as to why this is happening.

Share this post


Link to post
Share on other sites
multimixer,

 

If I comment out the separator and the store name, they still appear in the email. I haven't tried deleting them outright. I wondered is it possible to send this email without purchasing anything, i.e. to test it to see how things look, without going thru the procedure og actually placing an order.

 

Cheers,

Col

 

**BUMP**

 

Anyone any ideas on this? It's the strangest thing!

 

Cheers,

Col

Share this post


Link to post
Share on other sites

I really enjoyed reading the first couple of posts. Kudos to the original poster. Seems this thread has now turned into a help thread now though :(

 

Can't these be posted as separate topics and clean up this useful help guide?

 

Yahoo is not an easy mail store to work with for a number of reasons. Unaware if this is affecting your problem, Yahoo uses domain keys for it's spam filter. You need to include an SPF record for your OScommerce stores', info which your server admin should be able to tell you. This will ensure that mail gets to the right place, with the right header information.

Share this post


Link to post
Share on other sites
Yahoo is not an easy mail store to work with for a number of reasons. Unaware if this is affecting your problem, Yahoo uses domain keys for it's spam filter. You need to include an SPF record for your OScommerce stores', info which your server admin should be able to tell you. This will ensure that mail gets to the right place, with the right header information.

 

I was pulling my hair trying to get mail working and found this topic....sure enough when I sent some test mails to other domains besides Yahoo....email is working, I even checked spam folder in Yahoo and nothing. Welcome email, contact us and i was able to send a general email to the non Yahoo domain. This is great however, sooo many people use Yahoo mail, that I would hate to lose business just because Yahoo email is so picky. What is an SPF record, where do we find it and then where do we put it?

Sorry I am not very good with shopping carts, especially OSC (use to use Zen Cart with no probs) yet and I am getting tired from spending so much time working out the kinks in this cart...lol. Thanks!

Share this post


Link to post
Share on other sites

Is it possible to make contact us to send to extra email as well?

Pls help….. Thx

 

Yes, possible. If you want to receive exactly the same email as the store owner then:

 

1) fill out the "send extra order emails field" in your admin panel

 

2) in file catalog/contact_us.php

 

Find the code

if (tep_validate_email($email_address)) {
         tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);

add under it a second tep mail function as follows

// send the contact us form to other people (mm 13 10 2009)
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
       tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_SUBJECT, $enquiry, $name, $email_address);
        }

 

If you did the changes like described in post #2 of this topic, then the function should look like this

// send the contact us form to other people (mm 13 10 2009)
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
       tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_SUBJECT, $email_body, $name, $from_email);
        }

 

hope it helps :)

Share this post


Link to post
Share on other sites

Great ..... Thx alot multimixer

 

Yes, possible. If you want to receive exactly the same email as the store owner then:

 

hope it helps :)

Share this post


Link to post
Share on other sites

×