$fSummary var problem in email

shadow

No avatar

2010-05-02 22:53

Hello,

Does anyone can help me with this? :)

I've QC 1.3, and in a effort of send a order confirmation by e-mail (without the use of plugins which doesn't work for me) i did this:

In core/orders.php:



//e-mail admin when new order arrives

if( $GLOBALS['config']['mail_informing'] === true )

      @
mail$GLOBALS['config']['email'], $GLOBALS['lang']['mail_title'], $GLOBALS['lang']['mail_txt'], 'FROM: '.$GLOBALS['config']['email'] );









function 
sendHTMLemail($HTML,$from,$to,$subject)
{

// long code here!

    
mail($to,$subject,"",$headers);
    
}

//def vars

$who $aForm[sFirstName];
$how $aForm[sPayment_option];
$much $aData[fSummary];




// send e-mail ok

$HTML         "Dear $who,<br><br>Thanks for your order. Payment by: <b> $how </b><br>Total Amount: <b> $much Euros</b><br><br> Thank you.";
$from         "me@me.com";
$to $aForm['sEmail'];
$subject     "Order ok nr. $iOrder";

sendHTMLemail($HTML,$from,$to,$subject);




Ok, everything works OK (mail is sent with order id, client name etc), except the var $aData[fSummary] returns nothing. I'm not expert in Php, so please anyone give me a hand. :)

Thanks,
Artur

» Quick.Cart v1.x

beholder

Avatar: beholder

2010-05-03 13:33

shouldn't $aData[fSummary] in code be with apostrophes, like for example $aForm['sEmail'] ?

..this goes for other array variables in the code above ($aForm[sFirstName], $aForm[sPayment_option],...) as well.

shadow

No avatar

2010-05-03 19:07

hello beholder,

I've already tryed with '' but the result is the same, returns nothing.....

beholder

Avatar: beholder

2010-05-04 01:49

well, it's difficult to help you since you are using an outdated version with God-knows-what installed along (plugins), and no one really has that installed.
You may want to use following line to see what $aData array contains and continue from there:
print_r ($aData);

You should see a listing on top of the page. Checking out source of the generated page should show you the listing in a nice structured way.

Back to top
about us | contact