I am getting this error when trying to send a confirmation email to the user.
Template error: “Variable "option" does not exist
If I remove every bit of markup from my email template, and literally only have <p>Hello World</p> I get an email.
I am able to click the "Download Receipt" link, and everything works great.
When I output the option variable: {{ option }}:
When I click on the "Download" link, I see receipt.
I am using the default template that ships with commerce, with the addition of a jpg header image. At the bottom of the template is this:
...
{% endset %}
{# Use the option param passed into the pdf template to show different
order pdf's depending on the context #}
{% switch option %}
{% case "receipt" %}
<h1>Receipt for Order #{{ order.number[:7] }}</h1>
{{ orderTable }}
{% case "ajax" %}
<h1>NA</h1>
{% default %}
{{ orderTable }}
{% endswitch %}
</body>
So clearly it has something to do with option not getting set. I'm not sure where I might have un-done setting that variable.
Any suggestions are greatly appreciated!