Jump to content

confirmation mails showing {total_products} instead of actual data..


Recommended Posts

I thought i've seen this before, but can not find it on the forum.

I've been thigtening permisions on folders, but now i just noticed that some data is not showing in confirmation emails :(

The funny thing is, that the order number , and total amount shows up ok.

Anyone got a clue? been changing mail dir to 777 again, did not help.

{products} {discounts}
Referenz Produkt Einzelpreis Anzahl Gesamtpreis
Produkte {total_products}
Rabatte {total_discounts}
Versand {total_shipping}
Gesamt 159,00 €

Versand

Spediteur: {carrier}

Lieferadresse Rechnungsadresse
{delivery_firstname} {delivery_lastname}
{delivery_address1}
{delivery_address2}
{delivery_city} {delivery_postal_code}
{delivery_country}
{delivery_phone} {invoice_firstname} {invoice_lastname}
{invoice_address1}
{invoice_address2}
{invoice_city} {invoice_postal_code}
{invoice_country}
{invoice_phone}

4670_jCK90sEtRuBEcWhELsLD_t

Link to comment
Share on other sites

  • 3 months later...

I have the same problem, but the customer recieve two orderconfirmation mails. One correct and one without actual data. I have no idea how to solve that. Someone who can help me?

Link to comment
Share on other sites

If I change the E-mail template for "orderconfimation" in back office >> orders >> orderstatuses to something else and change the status name. For example "payment" the customer recieve one correct orderconfirmation mail and another mail, called "payment"... I still not know how figure it out how to solve the "double mail"

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 1 month later...
  • 2 weeks later...
  • 1 month later...
  • 1 month later...
This is releated to the fact that the e-mails have changed in the last versions of PS.

In order to fix this you need to re-translate the English e-mails to you own native/needed language.

I know this for sure as I did with the Ducth version.


Same problem as all above.

Re-translating didn't work for me, that's what I've done in the first place. I've also tried with the original templates and still the same result.

The first email is the broken one, with the custom name set in admin > statuses as subject.

The second is has "order confirmation" as subject, or the corresponding translation I've set. This is the correct one.

But if I disable the first one, there's no automatic order confirmation.

Any ideas? It's the only thing stopping me to launch the site... Thanks
Link to comment
Share on other sites

  • 3 months later...

Hi

I'm also getting only the Total Paid field showing data and the rest of the fields missing - i.e. {} place-holders.

Anyone have any idea?

This is happening in the Bankwire module that I have modified. I have removed the automatic Confirmation email by modifying classes/PaymentModule.php and commenting out lines 350-351 as follows:

/*
   if ($orderStatus->send_email AND Validate::isEmail($customer->email))
       Mail::Send(intval($order->id_lang), 'order_conf', 'Order confirmation', $data, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment);
*/ 



And I have created a new Status called "Confirmation" in BackOffice>Orders>Statuses and set it up so that the Confirmation Email gets sent to the customer when the order is set to this status. BUT when I set an order to this new status I get what I've described above. I.e. a confirmation email with missing values.

I'm running PS 1.2.5.0 on shared linux host.

Any help is much appreciated.

Thanks

Link to comment
Share on other sites

  • 4 weeks later...

I had the same problem. The mails were sent with placeholders like {firstname} and {lastname} instead of the actual data. Nothing was being replaced.

I tracked it down to the file "classes/Mail.php", where something goes wrong.

The following (at line 96) should take care of those placeholders, putting in the actual data, but somehow it doesn't do
anything:


$swift->attachPlugin(new Swift_Plugin_Decorator(array($to_plugin => $templateVars)), 'decorator');


I wasn't able to figure out what exactly went wrong inside that module, so instead I just
disabled that line, like this:


//$swift->attachPlugin(new Swift_Plugin_Decorator(array($to_plugin => $templateVars)), 'decorator');


and then I added two lines of code after lines 98 and 100 respectively.

So this:


if ($configuration['PS_MAIL_TYPE'] == 3 OR $configuration['PS_MAIL_TYPE'] == 2)


    $message->attach(new Swift_Message_Part($templateTxt, 'text/plain', '8bit', 'utf-8'));



if ($configuration['PS_MAIL_TYPE'] == 3 OR $configuration['PS_MAIL_TYPE'] == 1)



    $message->attach(new Swift_Message_Part($templateHtml, 'text/html', '8bit', 'utf-8'));


became this:


if ($configuration['PS_MAIL_TYPE'] == 3 OR $configuration['PS_MAIL_TYPE'] == 2)



    $templateTxt = str_replace(array_keys($templateVars), array_values($templateVars), $templateTxt);



    $message->attach(new Swift_Message_Part($templateTxt, 'text/plain', '8bit', 'utf-8'));



if ($configuration['PS_MAIL_TYPE'] == 3 OR $configuration['PS_MAIL_TYPE'] == 1)



    $templateHtml = str_replace(array_keys($templateVars), array_values($templateVars), $templateHtml);



    $message->attach(new Swift_Message_Part($templateHtml, 'text/html', '8bit', 'utf-8'));


And that seems to work for me. Two lines of added code does what the complicated
"decorator" module was supposed to do, but didn't.

Maybe my solution fails in some respect that I haven't seen yet (or can't understand).
The Prestashop developers can judge that better than me.

Feel free to try my solution, but there are no guarantees. Maybe your webshop will disintegrate, who knows...

Link to comment
Share on other sites

  • 6 months later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...