Forums / General Questions / Modify Product Details in order confirmation email

Modify Product Details in order confirmation email

Views: 1,110

Results 1 to 4 of 4
6 Jan 2015, 5:16 PM
#1
wilpackpackaging avatar

wilpackpackaging

New Zenner

Join Date:
Aug 2008
Location:
Rockford, IL
Posts:
60
Plugin Contributions:
1

Modify Product Details in order confirmation email

I am using zencart strictly for a catalog and quote request tool. There are no prices shown, but people select items into their cart and upon completion the customer and I get an email with what pieces they want quoted.

I have heavily customized the templates in the template overrides to accomplish this and change everything from saying shopping cart to saying quote request cart.

However, zencart does a lot of price totaling just about everywhere. I have removed most of it or used css display:none to hide the rest. What I cannot figure out is how to remove the line item totals from the product details in the emails that get sent to the customer. See below - the red highlighted portion is what I want to remove.

I have searched the forums and I have searched the FAQ...but most of that is much more general information. Any pointers in the right direction would be greatly appreciated.

Quote Request Confirmation from My Site

First Name Last Name

Thanks for browsing with us today!
The following are the details of your quote request.

Online Quote Request Number: 19
Date Requested: Tuesday 06 January, 2015 Detailed Request Info:
http://mysite.something/catalog/index.php?main_page=account_history_info&order_id=19

Products

1000 x 40mm Holder (4040H) = $0.00

Quoting Address

Test Company
Test Name
1234 This St.
Somewhere, NU 99999
United States

You WilPack in the Profits...
By Not Spilling the Beans!

6 Jan 2015, 6:29 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Modify Product Details in order confirmation email

order.php class ... change the following as per your unique needs:```php
// build output for email notification
$this->products_ordered .= $this->products[$i]['qty'] . ' x ' . $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">' . 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";
}

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

6 Jan 2015, 7:33 PM
#3
wilpackpackaging avatar

wilpackpackaging

New Zenner

Join Date:
Aug 2008
Location:
Rockford, IL
Posts:
60
Plugin Contributions:
1

Re: Modify Product Details in order confirmation email

DrByte:

order.php class ... change the following as per your unique needs:```
// build output for email notification $this->products_ordered .= $this->products[$i]['qty'] . ' x ' . $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">' . 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";
}


Thanks that is just what I was looking for.  
I just put "//" in front of line "$currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) ."
Then I deleted the "=" from the previous line.  

Worked like a charm.  Doesn't work on html emails, but I just won't send mail with html.  Much easier to just send text email anyway.

Thank you again! :D

You WilPack in the Profits...
By Not Spilling the Beans!

6 Jan 2015, 9:57 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Modify Product Details in order confirmation email

DrByte:

order.php class ... change the following as per your unique needs:```
// build output for email notification $this->products_ordered .= $this->products[$i]['qty'] . ' x ' . $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) : '') .
/ "\n" .
$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">' . 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"
/;
}


> **WilpackPackaging:**
>
> Thanks that is just what I was looking for. 
> I just put "//" in front of line "$currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) ."
> Then I deleted the "=" from the previous line. 
> 
> Worked like a charm. Doesn't work on html emails, but I just won't send mail with html. Much easier to just send text email anyway.
> 
> Thank you again! :D

There are two areas in the code quoted by Dr. Byte to control the display of price. I have highlighted the areas to "remove" that feature, as well as inserted comment type characters to prevent processing each section of code. The first addresses standard text email, the second html, so you can resume/start using html emails...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...