Send_Email does not take variables

boboo

Avatar: boboo

2010-01-07 11:57

Hi,
I've changed a little the QC, so the products have additional property "weigth".
Adding them to basket, you can see their weigth in the basket-list and in the "foot", near the price summary, you can see the "weigth-summary". Depending on the package-weigth, the delivery cost changes its value.
It works without problems on the basket-page, on the order-page and on the "after-order-confirmation-page". Buying products, I see the weigth, the delivery cost, the summary - just all I wanted.
But the problem is with e-mail.
I put the same variables into the e-mail-template (orders_print.tpl), which are showing the values in order-form & post-order-form (as I wrote - in this 2 forms it works fine), but they don't appear in the incoming e-mail. Only the products-list, their prices and comment (if written).
My question is: why does not the e-mail template take these values?

» Quick.Cart v3.x

boboo

Makaron

Avatar: Makaron

2010-01-07 15:41

Maybe You used for example variable $aOrder[sVariable] instead of $aData[sVariable] in block with email template?

boboo

Avatar: boboo

2010-01-07 19:16

In the /core/orders.php in the function: listProducts
I declared:
if( $aData[fMassSumm] <= 5 ){
$aData['fCenaPoczty'] = normalizePrice( 12 );
$aData['sCenaPoczty'] = displayPrice( $aData['fCenaPoczty'] );}
if( $aData[fMassSumm] <= 2 ){
$aData['fCenaPoczty'] = normalizePrice( 9 );
$aData['sCenaPoczty'] = displayPrice( $aData['fCenaPoczty'] );}
if( $aData[fMassSumm] <= 1 ){
$aData['fCenaPoczty'] = normalizePrice( 7 );
$aData['sCenaPoczty'] = displayPrice( $aData['fCenaPoczty'] );}
if( $aData[fMassSumm] <= 0.5 ){
$aData['fCenaPoczty'] = normalizePrice( 5 );
$aData['sCenaPoczty'] = displayPrice( $aData['fCenaPoczty'] );

(Info: MassSumm is summ of weights and it works).
And if I set this "sCenaPoczty" (with $aData before, of course) to the orders_print.tpl, so I can, as said, see it on the basket-, order- and after-order-form. But not in e-mail (in its "block" it is set as well.
ORDER_PRINT_HEAD
<td id="carrierCost">$aData[sCenaPoczty]</td>
(works fine)
ORDER_EMAIL_BODY
Wysylka = $aData[sCenaPoczty] $config[currency_symbol]
(does not work).
Hmmm, where is the bug I've built in?
Makaron, if You can polish, so don't hesitate ;-)

boboo

boboo

Avatar: boboo

2010-01-08 09:49

Ufff, solved :-)
Very dirty solution, not what I could wish, but works.
What have I done?
in: /core/orders.php - function: addOrder
I have forced the "fCarrierPrice"
with "IF-statements" to take a value depending on MassSumm.
And the CarrierPrice is "a standard-entry" in e-mail body.
I don't like it, but for this time important for me is: it works!
Additionally positiv: the delivery price will be saved with order.

Thanks to all, who read this topic and started to think how to help :-)

boboo

Back to top
about us | contact