Include new order field in eMail to client? (QC + sendOrderToClient)

scrut

No avatar

2007-10-06 13:36

I have edited templates/orders_delivery.tlp and lang/en.php and added the field "Birthday".

<tr>
<th>
$lang[Birthday]:
</th>
<td>
<input type="text" name="sBirthday" value="$aData[sBirthday]" class="input" maxlength="10" onblur="saveUserData( this.name, this.value )" />
</td>
</tr>


In core/orders.php I have edited throwOrder() to include this variable

list( , $aList['iTime'], $aList['iCourier'], $aList['sCourier'], $aList['fCourierPrice'], $aList['sFirstName'], $aList['sLastName'], $aList['sCompanyName'], $aList['sStreet'], $aList['sZipCode'], $aList['sCity'], $aList['sTelephone'], $aList['sEmail'], $aList['sIp'], $aList['sBirthday'], $aList['sComment'] ) = $aList;


Now I want to make sure that this birthday (as well as the chosen Courier) show up in the eMail sent via "sendOrderToClient".

But how do I do that?

If I edit templates/en_sendOrderToClient.tpl and add

Courier: $_POST['sCourier']
Birthday: $_POST['sBirthday']

nothing happens.

How do I fix that?

Thanks

» Quick.Cart v2.x

scrut

No avatar

2007-10-06 14:20

Ok, now I have altered core/orders.php as well:

throwOrder() was altered like this:

list( , $aList['iTime'], $aList['iCourier'], $aList['sCourier'], $aList['fCourierPrice'], $aList['sFirstName'], $aList['sLastName'], $aList['sCompanyName'], $aList['sStreet'], $aList['sZipCode'], $aList['sCity'], $aList['sTelephone'], $aList['sEmail'], $aList['sIp'], $aList['sComment'], $aList['sBirthday'] ) = $aList;


saveOrder() was edited like this:

dbAddOrderExtensions( Array( $aForm['iOrder'], time( ), $aForm['iCourier'], $aCourier['sName'], $aCourier['fPrice'], $aForm['sFirstName'], $aForm['sLastName'], $aForm['sCompanyName'], $aForm['sStreet'], $aForm['sZipCode'], $aForm['sCity'], $aForm['sTelephone'], $aForm['sEmail'], $_SERVER['REMOTE_ADDR'], $aForm['sComment'], $aForm['sBirthday'] ) );


Now the order is saved correctly (except the b-day, but I don't need that) and the Birthday shows up in the eMail. That's good.

But the Courier still doesn't show up.

What do I need to do?

Thanks

treewood (OpenSolution)

Avatar: treewood

2007-10-08 17:36

scrut - but where is not show up? In email? If in email then You must use this variable: $aCourier[sName]

scrut

No avatar

2007-10-18 13:23

Yes, it doesn't show up in the eMail.

The statement Courier: $_POST['sCourier'] in templates/en_sendOrderToClient.tpl leads to an email that says something like

2|8.50

instead of

Express Mail

So instead of saying the name of the courier method, it shows the ID and the price of the courier. How can I make sure it shows the courier name instead?

merci

No avatar

2007-10-19 08:19

scrut - change $_POST['sCourier'] for $aCourier[sName] as treewood wrote in earlier post.

scrut

No avatar

2007-10-19 18:30

I did that but now this portion of the eMail is empty.
While it said "Courier: 2|8.50" with $_POST['sCourier']
it now says "Courier: " with $aCourier[sName]

Any suggestion?

Thanks

Back to top
about us | contact