Forums / General Questions / confirmation emails only for physical products?

confirmation emails only for physical products?

Locked

Views: 1,064

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
10 May 2008, 2:13 PM
#1
talisman_studios avatar

talisman_studios

New Zenner

Join Date:
Jul 2007
Posts:
42
Plugin Contributions:
0

confirmation emails only for physical products?

Hi folks, here is what I'd like to achieve in my store - I only want to recieve order confirmation emails on some orders. My store sells download pdfs and has just added physical product to the mix. It'd be really handy if we only got a copy of the confirmation emails for those products that have a physical component and therefore need a persons attention.

I figure this should be fairly simple to achieve, all I need is to test if any of the products are from our physcial goods category. Or better yet check the weight / delivery address of the order, if there is one then part of the order is physical product and we want the email.

So could someone help me out with a little code fix for that? I'm not sure on two things - which test would be the most reliable - the last thing we want to have happen is not recieve an email and end up ignoring a customer, and where the confirmation mails are sent? Is it part of the Zen cart framework or is it part of the payment modules or even somewhere else?

I'm on Zen cart 1.3.8a, using paypal to take monies.

Cheerio for now,

Alan

12 May 2008, 11:20 AM
#2
talisman_studios avatar

talisman_studios

New Zenner

Join Date:
Jul 2007
Posts:
42
Plugin Contributions:
0

Re: confirmation emails only for physical products?

alright so I had a dig and found what looks like my solution. In:

<shop>/includes/classes/order.php

There is a function 'send_order_email', in the section of that commented as send addtiional emails, I added and if/check:

	$total_weight = $_SESSION['cart']->show_weight();
	if ($total_weight > 0){
	      zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id,
	      $email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->attachArray);
	}

And that seems to be doing the trick nicely. Of course if that is setting off alarm bells to any folks who know better around these parts I'd appreciate a heads up :smile: