Zen Cart Logo
Forums / General Questions / Adding Manufacture to Order Confirmation Email

Adding Manufacture to Order Confirmation Email

Views: 2,166

Results 1 to 14 of 14
21 Oct 2009, 6:57 PM
#1
beau91324 avatar

beau91324

Zen Follower

Join Date:
Jul 2009
Posts:
149
Plugin Contributions:
0

Adding Manufacture to Order Confirmation Email

I my a ZenNiewbie and I need to add the Manufactures Name of each item ordered in the Order Confirmation eMail. Can someone tell me where to find out to do this?

21 Oct 2009, 7:27 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Adding Manufacture to Order Confirmation Email

The order.php class builds the line-item output during the create-add-products() method. You'll have to lookup the manufacturer for each product and then add it as part of that output. Then the send-order-email() method will include that info when it sends the actual emails. You'll definitely need to put on your programmer's hat to do it.

21 Oct 2009, 8:09 PM
#3
beau91324 avatar

beau91324

Zen Follower

Join Date:
Jul 2009
Posts:
149
Plugin Contributions:
0

Re: Adding Manufacture to Order Confirmation Email

Any chance you know the names of the methods or the file names they're in?

23 Oct 2009, 10:02 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Adding Manufacture to Order Confirmation Email

Yes, I included them in my previous post.

24 Oct 2009, 11:58 PM
#5
beau91324 avatar

beau91324

Zen Follower

Join Date:
Jul 2009
Posts:
149
Plugin Contributions:
0

Re: Adding Manufacture to Order Confirmation Email

Found what I need to change but as a newbie to all this how do I get the products Manufactures name? I'm attempting to change the method create_add_products at the "// build output for email notification" section.

Can anyone help?

25 Oct 2009, 4:39 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: Adding Manufacture to Order Confirmation Email

You could use the zen_get_products_manufacturers_name($product_id) function to look it up.

25 Oct 2009, 3:43 PM
#7
beau91324 avatar

beau91324

Zen Follower

Join Date:
Jul 2009
Posts:
149
Plugin Contributions:
0

Re: Adding Manufacture to Order Confirmation Email

Thanks for the help, that was just what I needed. For those who come later here is what I had to add

zen_get_products_manufacturers_name($this->products[$i]['id'])

:clap:

14 Feb 2010, 12:11 AM
#8
rsdesigns avatar

rsdesigns

New Zenner

Join Date:
Aug 2008
Posts:
1
Plugin Contributions:
0

Re: Adding Manufacture to Order Confirmation Email

Could you tell me exactly where you are putting this and everything you put in to make this work. I have several customers who would like this in their store, but for some reason I can't get it to work.

Thank you very much for your help

16 May 2010, 9:49 AM
#9
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: Adding Manufacture to Order Confirmation Email

I'd like to do this too...any chance of some kind soul giving a step-by-step? My programmer's hat is missing a few top levels LOL :P

11 Jun 2010, 2:41 AM
#10
bhadz08 avatar

bhadz08

New Zenner

Join Date:
Jun 2009
Posts:
41
Plugin Contributions:
0

Re: Adding Manufacture to Order Confirmation Email

hello.. hope somebody can help me with this..
see attached file..

thanks!!

8 Apr 2011, 4:19 AM
#11
pmartin avatar

pmartin

New Zenner

Join Date:
May 2006
Posts:
9
Plugin Contributions:
0

Re: Adding Manufacture to Order Confirmation Email

After much playing around, (I am very much an amateur programmer), I found that putting the function from Beau91324 (thanks Beau!) in: includes/classes/order.php here worked -

$this->notify('NOTIFY_ORDER_PROCESSING_ONE_TIME_CHARGES_BEGIN');

  // build output for email notification
  $this->products_ordered .=  $this->products[$i]['qty'] . ' x ' . zen_get_products_manufacturers_name($this->products[$i]['id']) . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' .
  $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .
  ($this->products[$i]['onetime_charges'] !=0 ? "\n" . TEXT_ONETIME_CHARGES_EMAIL . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') .
  $this->products_ordered_attributes . "\n";
  $this->products_ordered_html .=
8 Apr 2011, 5:00 AM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Adding Manufacture to Order Confirmation Email

Thanks for the update that you have this working and for posting the solution that worked for you ... :smile:

8 Apr 2011, 5:15 AM
#13
pmartin avatar

pmartin

New Zenner

Join Date:
May 2006
Posts:
9
Plugin Contributions:
0

Re: Adding Manufacture to Order Confirmation Email

Hi Ajeh,
I have used this forum extensively over the years so it's great to be able to give a tiny bit back:smile:
Should add that the function mentioned needed a space:
.' '
at the end. (Us novices need that basic info!)

27 Jun 2013, 10:28 AM
#14
gohealth avatar

gohealth

New Zenner

Join Date:
Nov 2011
Location:
Brisbane, Australia
Posts:
35
Plugin Contributions:
0

Re: Adding Manufacture to Order Confirmation Email

For those running 1.5.x, the following code worked a treat for me in bold below for the text message as well as HTML message. It puts the manufacturer first, followed by a hyphen, then the product name as per normal. This is done in the /httpdocs/includes/classes/order.php file around line 900:

  // build output for email notification
  $this->products_ordered .=  $this->products[$i]['qty'] . ' x ' **. zen_get_products_manufacturers_name($this->products[$i]['id']) . '-' . ** $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' .
  $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .
  ($this->products[$i]['onetime_charges'] !=0 ? "\n" . TEXT_ONETIME_CHARGES_EMAIL . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') .
  $this->products_ordered_attributes . "\n";
  $this->products_ordered_html .=
  '<tr>' . "\n" .
  '<td class="product-details" align="right" valign="top" width="30">' . $this->products[$i]['qty'] . ' x</td>' . "\n" .
  '<td class="product-details" valign="top">' **. zen_get_products_manufacturers_name($this->products[$i]['id']) . ' - ' .** nl2br($this->products[$i]['name']) . ($this->products[$i]['model'] != '' ? ' (' . nl2br($this->products[$i]['model']) . ') ' : '') . "\n" .
  '<nobr>' .
  '<small><em> '. nl2br($this->products_ordered_attributes) .'</em></small>' .
  '</nobr>' .
  '</td>' . "\n" .
  '<td class="product-details-num" valign="top" align="right">' .
  $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .
  ($this->products[$i]['onetime_charges'] !=0 ?
  '</td></tr>' . "\n" . '<tr><td class="product-details">' . nl2br(TEXT_ONETIME_CHARGES_EMAIL) . '</td>' . "\n" .
  '<td>' . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') .
  '</td></tr>' . "\n";