Forums / Bug Reports / [Done v1.3.8] Email footer of payment modules not working in HTML email

[Done v1.3.8] Email footer of payment modules not working in HTML email

Locked

Views: 3,346

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
27 Mar 2007, 8:30 PM
#1
duwane avatar

duwane

Zen Follower

Join Date:
Aug 2004
Location:
Auckland, New Zealand
Posts:
120
Plugin Contributions:
0

[Done v1.3.8] Email footer of payment modules not working in HTML email

The data put into the $email_footer variable by payment modules never gets into the final HTML email that is sent to the customer if they have their email pref set to HTML. If they use the Plain text option the footer appears in the email as it should.

I have traced the problem down to line 956 in includes/classes/order.php line. The line currently reads as follows:

$html_msg['PAYMENT_METHOD_FOOTER'] = (is_object($GLOBALS[$_SESSION['payment']] && $GLOBALS[$payment_class]->email_footer != '') ? $GLOBALS[$payment_class]->email_footer : $this->info['cc_type'] );

I have changed the line as follows:

$html_msg['PAYMENT_METHOD_FOOTER'] = (is_object($GLOBALS[$_SESSION['payment']]) && $GLOBALS[$payment_class]->email_footer != '' ? $GLOBALS[$payment_class]->email_footer : $this->info['cc_type'] );

Notice that the end bracket for the call to is_object has moved.

After making this change the extra info now appears in the HTML emails.

The problem only seems to have starter since 1.3.7 as I never had problems with 1.3.6.

Could someone please confirm if this is how the code was intended to look?

Thanks.

27 Mar 2007, 8:38 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.8] Email footer of payment modules not working in HTML email

Correct.
Similar discussion here:
http://www.zen-cart.com/forum/showthread.php?p=317535#post317535

Fix is included in the upcoming v1.3.8

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

27 Mar 2007, 8:46 PM
#3
duwane avatar

duwane

Zen Follower

Join Date:
Aug 2004
Location:
Auckland, New Zealand
Posts:
120
Plugin Contributions:
0

Re: [Done v1.3.8] Email footer of payment modules not working in HTML email

Thanks DrByte. Sorry for posting it again but that thread didn't come up in my search results before I posted.

28 Mar 2007, 1:39 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.8] Email footer of payment modules not working in HTML email

No worries. It was a tough one to find, wasn't it. Not just the post, but the fix to the syntax error too :blush:

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

2 Apr 2007, 12:39 PM
#5
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: [Done v1.3.8] Email footer of payment modules not working in HTML email

duwane:

I have changed the line as follows:

$html_msg['PAYMENT_METHOD_FOOTER'] = (is_object($GLOBALS[$_SESSION['payment']]) && $GLOBALS[$payment_class]->email_footer != '' ? $GLOBALS[$payment_class]->email_footer : $this->info['cc_type'] )


Just to point out - in case anyone copies and pastes the above fix - there's a semicolon missing at the end of the above line of code that will give a parse error on checkout.

The line should be:

```php
    $html_msg['PAYMENT_METHOD_FOOTER'] = (is_object($GLOBALS[$_SESSION['payment']]) && $GLOBALS[$payment_class]->email_footer != '' ? $GLOBALS[$payment_class]->email_footer : $this->info['cc_type'] );