1

I want to dynamic order id pass in anchor tag

<table>
<tr>
    <td>
        {{trans 'To make changes to your order, you can  <a href="https://api.whatsapp.com/send?phone=xxxxxxxxxx&text=Order %23%increment_id%0AHello, Magento. I have an order and would need some assistance with it.">whatsapp us</a>' with your order number
        increment_id=| raw after 123}}
    </td>
</tr>
</table>

and whatsapp link text like

Order ###### ​
​Hello, Magento. I have an order and would need some assistance with it

how can achieve that?

Any help would be appreciated.

Thanks.

3
  • Your src link in <a> tag has whitespaces, did you tried to Url encode? – Piyush Dec 16 '19 at 6:46
  • @Piyush yes i have try that – Rakesh Donga Dec 16 '19 at 6:49
  • Then I would suggest to divide your text in separate {{trans "" }}, Or you can set this text as var before sending to email template – Piyush Dec 16 '19 at 6:51
1

Try this

<tr>
    <td>
        {{trans 'To make changes to your order, you can  <a href="https://api.whatsapp.com/send?phone=xxxxxxxxxxxx&text=My order:%increment_id and i want to change">whatsapp us</a>' increment_id=$order.increment_id |raw}}
    </td>
</tr>
3
  • not working Man!! prnt.sc/q9ndss also link is not working – Rakesh Donga Dec 12 '19 at 5:04
  • Which link generates on "whatsapp us" if you click? – Kishor Thummar Dec 12 '19 at 5:07
  • Yes correct but i have same code yesterday try that still problem is coming %increment_id – Rakesh Donga Dec 12 '19 at 5:12
0

You can use $order.increment_id for order id.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.