Forums / General Questions / Customizing the Order Confirmation email

Customizing the Order Confirmation email

Locked

Started by beau91324 on 2 Jul 2010, 10:58 PM · Views: 755

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
2 Jul 2010, 10:58 PM
#1
beau91324 avatar

beau91324

Zen Follower

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

Customizing the Order Confirmation email

I need to add to the email sent when an order is made lines with Model # of the products, the CC Exp date, and the Card Holder Name. I've found several posting on how to modify the orders.php file but I'm not clear on just what needs to be done as all of the info I want seems to be already in the function.

Beau

3 Jul 2010, 12:00 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Customizing the Order Confirmation email

It is VERY UNWISE to put credit-card details in email. You should NOT be relying on emails for processing your orders. You should be logging into your store Admin area to collect that sensitive information so that it is protected and cannot be mistakenly processed by unauthorized persons.

Actually you should never be using a manual card module at all. You will have problems with PCI-DSS compliance if your bank finds out you're processing cards without authentication.

.
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.

3 Jul 2010, 12:22 AM
#3
beau91324 avatar

beau91324

Zen Follower

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

Re: Customizing the Order Confirmation email

I agree about the cc info, but how can I get the model number to show?

Beau

3 Jul 2010, 12:30 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: Customizing the Order Confirmation email

You'll have to hack up the create_add_products() method in the orders class to add the extra content into the output list.

.
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.

3 Jul 2010, 1:36 AM
#5
beau91324 avatar

beau91324

Zen Follower

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

Re: Customizing the Order Confirmation email

Ok, I've looked into the create_add_products() function in order.php and found this code snippet. My question is this "Why isn't the model showing up? (first line of executable code ) the product has a model number. I've checked twice. :frusty:

    
 // 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";
    }

Beau