Magento: How do I display the mail address in the OPC progress bar? - email

I am using Magento 1.9 and with older version, I was able to display the customers mail address in the onepage checkout progress bar using the following format:
{{depend email}}Mail: {{var email}}{{/depend}}
Suddenly, after updating to 1.9, this is not working anymore. Whats wrong with that? All other address parts still work the same.

For Guest
{{var order.getBillingAddress().getEmail()}}
and for member
{{var order.getCustomerEmail()}}

Related

How to fix a Paypal CRYPTOSERV_SERVER_ERROR

I've been using Paypal's payment standard with dynamically encrypted buttons for successfully for several years. It suddenly stopped working on 19/05/2022.
When a customer clicks on the payment button they're taken to Paypal and are shown the error page with the 'helpful' message "Things don't appear to be working at the moment. Please try again later.". The headers served by Paypal along with this page include code=CRYPTOSERV_SERVER_ERROR, which I've googled and there are no results. All certificates are still valid.
Does anyone have a clue what this error means?
The May 19th mysterious PayPal error solved by a combination of trimming white space and removing line breaks worked for me. No thanks to PayPal CS who never got back to me after a week of shop being down!
$encryptedButton = str_replace("\n", "", $encryptedButton);
$encryptedButton = trim($encryptedButton);
Same problem here. Still no resolution from PayPal after I reported that 5 days ago.
What I found in my page source is that the encrypted field's value was "split" with new lines, for better readability, like this:
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----
MIIIoQYJKoZIhvcNAQcDoIIIkjCCCI4CAQAxggEwMIIBLAIBADCBlDCBjjELMAkG
A1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQw
EgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UE
...
I removed the new lines with this simple step:
$encryptedButton = str_replace("\n", "", $encryptedButton);
And now the button seems to work again.
<input type="hidden" name="encrypted" value="$encryptedText" />
Make sure to add: $encryptedText = str_replace("\n", "", $encryptedText); so that extra spaces are removed.

Order confirm email translation issue Magento 2

Our Magento 2.1.5 site is ready to translate all email templates.
But, when a customer creates order, he got non-translated order confirm email immediately. To check this issue, when we click "send email" tab on order view page on admin, we get the correctly translated email.
Send order
What was wrong?
We found this email template which was just order_new.html on theme folder.
app\design\frontend\[vendor]\[theme]\Magento_Sales\email\order_new.html
Also, this template was assigned on vendor.
vendor\magento\module-sales\etc\email_templates.xml
<template id="sales_email_order_template" label="New Order" file="order_new.html" type="html" module="Magento_Sales" area="frontend"/>
Is there any solution?
I solved this issue successfully.
This is solution.
Original:
#subject Your {{var store.getFrontendName()}} order confirmation #
My Solution:
#subject {{trans "Your %store_name order confirmation" store_name=$store.getFrontendName() }}#

I use magento 2, when submit contact form then issue on mail

I use magento 2, when submit contact form then issue on mail, when receive successfully but problem is apostrophe character.
Suppose any Customer write comment like: Can't able to login then in mail
display like: Can &#039 ; t able to login
I use 4-5 latest version all version this common issue,
Please help to resolve if you know
Go to this path "/vendor/magento/module-contact/view/adminhtml/email" and open "submitted_form.html" and replace 19th line code with the below-mentioned code
{{trans "Comment: %comment" comment=$data.comment|raw}}
Adding to the comment of Abhinav Kumar Singh, there's another way for those who are working with copies of the default e-mail templates in admin backend: MARKETING > COMMUNICATIONS > E-MAIL TEMPLATES.
No need to override original Magento files.
After you have imported the Contact-Form Template, you will find the same syntax in the Template Content field. Just add the "|raw" tag there.
{{trans "Comment: %comment" comment=$data.comment|raw}}
or
{{var data.comment|raw}}

Google Analytics Pixel doen't work in email

I have some email message with pixel
<img src="http://www.google-analytics.com/collect?v=1&tid=UA-50173334-3&t=event&cn=test_campaign&cs=email&ec=hellga&ea=open" width=1 height=1 >
This pixel working in browser and sending event data to google analytics correct.
But if i put code to my email template in Mailchimp and send to any email accounts(gmail,outlook,yandex), pixel didn't sent events data .
I tried another way for:
<style>
* [summary=pixel-gmail]:not(.pixel-gmail){
background-image: url(http://www.google-analytics.com/collect?v=1&tid=UA-50173334-3&t=event&cn=test_campaign&cs=email&ec=hellga&ea=open);}
</style>
<div class="pixel-gmail" summary="pixel-gmail"></div>
But it too did not work
Maybe who know how it really work in email?
If you're using 3rd-party services like SendGrid, AmazonAWS, etc. they may cut your HTML so it wouldn't work properly.
Try to send few test messages to your own mailbox and look on the email-letter content. If there would be still any problems with that - change service or talk to support so they can help you to fix your problem.

How to add Payment method title in order email

I have added one Transactional Email for new order in admin. And i want to insert new variable for magento payment method in the bottom of my order email. But i'm not getting how i can achieve this. Can someone help me to solve this?
There is already code for Payment method block {{var payment_html}}
But i want to add only title of Payment method in footer of order email.
{{var order.getPayment().getMethodInstance().getTitle()}} should print out the title.
You should change the template;
which you can do here:
System > Templates > Transactional Emails
For more information you can look this up:
http://www.magentocommerce.com/knowledge-base/entry/customizing-transactional-emails