Post by thbor83 » Fri Nov 04, 2011 5:27 pm

Hi everyone,

I have an question about the confirmation email that gets sent out to the customer after creating an order.
We have changed the catalog/model/checkout/order.php to include this line (around line 436):
$mail->addAttachment(DIR_IMAGE.'pdf/test.pdf');

After completing an order we get the pdf document attached in the confirmation email, but we want to only include this if say someone from country id 161 buys product from us otherwise it shouldn't be inlucded in the email.

Does anyone know how we can do this, I have searched the forum but didn't find anything about this in here.

Regards,
Thomas
Last edited by thbor83 on Sat Nov 05, 2011 4:32 am, edited 1 time in total.

Newbie

Posts

Joined
Fri Nov 04, 2011 4:00 pm

Post by uksitebuilder » Fri Nov 04, 2011 6:56 pm

Well, you can surround it with a conditional like this

Code: Select all

if($order_info['payment_country']=='Oman'){
    $mail->addAttachment(DIR_IMAGE.'pdf/test.pdf');
}
you can change payment_country to shipping_country if you wish

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by thbor83 » Sat Nov 05, 2011 4:32 am

Thanks that did it :)

Newbie

Posts

Joined
Fri Nov 04, 2011 4:00 pm
Who is online

Users browsing this forum: No registered users and 98 guests