Zen Cart Logo
Forums / Managing Customers and Orders / Admin order confirmation email based on shipping cost

Admin order confirmation email based on shipping cost

Views: 1,604

Results 1 to 10 of 10
18 Jul 2011, 9:57 PM
#1
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Admin order confirmation email based on shipping cost

Hi,

I have spent most of the day combing through the forums looking for an answer to this question. So far, no dice.

I have a site running Zen-Cart that has been running well for over a year. We sell books, both electronic (which are set up as downloadable products) and print (which add a shipping cost during checkout).

Given that the bulk of our products are downloads, I don't want to receive admin order confirmation emails after each order. However, I don't want to miss the few orders we receive for print books. These books are in specific categories, force the shipping rules during checkout, and each have the word [Print] in the product title.

What I am wondering is how I could set up the system to send out admin order confirmation emails ONLY for print products?

Thank you in advance!

18 Jul 2011, 10:15 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Admin order confirmation email based on shipping cost

The last 20 lines of the order.php class are what send the emails. You could add your own custom conditional logic around the sending of the "additional" emails to guide when it should send or not send.

18 Jul 2011, 10:40 PM
#3
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Admin order confirmation email based on shipping cost

Thanks. I'm not really sure what I'm looking at or how I'd change it.

18 Jul 2011, 10:55 PM
#4
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Admin order confirmation email based on shipping cost

I think I've fiddled around and got it ... but I'm not sure. Have to wait for someone to order something that includes a shipping cost :)

If it works, I'll post the code here. Otherwise, it's back to scratch!

Thanks for all your help!

21 Jul 2011, 1:45 PM
#5
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Admin order confirmation email based on shipping cost

Nope, can't get it to work. At this point I'd pay someone for a snippet of code!

21 Jul 2011, 3:13 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Admin order confirmation email based on shipping cost

I suppose a very simplified way would be to change this line:// send additional emails if (SEND_EXTRA_ORDER_EMAILS_TO != '') {to this:```
if (SEND_EXTRA_ORDER_EMAILS_TO != ''[B] && $this->content_type != 'virtual'[/B]) {



<https://www.zen-cart.com/donate>
21 Jul 2011, 10:26 PM
#7
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Admin order confirmation email based on shipping cost

Woohoo! It worked!

I was trying it based on shipping and that didn't play out.

How much would you like and where should I send it? :)

22 Jul 2011, 7:44 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Admin order confirmation email based on shipping cost

You can send whatever's fair at: https://www.zen-cart.com/donate

22 Jul 2011, 11:29 AM
#9
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Admin order confirmation email based on shipping cost

Done! Thank you again for all your help!

2 Jan 2015, 1:35 AM
#10
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Admin order confirmation email based on shipping cost

I hate to come back to this after a long time, but is there a way to change this from physical vs virtual products to something else?

I would like to get the emails ONLY if the attributes for the product have a 1 in the free words section. Is this possible?

If not, then I would like to at least suppress emails containing only free products.

Any help would be appreciated. I fiddled with the code but have been unsuccessful because, so far, I'm receiving all emails.

Thanks in advance!