Your software
My Mautic version is: 4.4.8
My PHP version is: 7
My Database type and version is: MySQL 5.7.43
Your problem
My problem is:
I am having an issue evaluating JSON that has been sent in an API request to send an email while using the MTC Extendee TWIG template module.
/api/emails/144/contact/692034/send
I am calling the send email API with a JSON body :
{
“tokens”: {
“cart”: [{“sku”:“A100”,“name”:“Item 1”},{“sku”:“Z200”,“name”:“Item 2”}]
}
}
and on the twig template side:
{% for item in cart %}
Name: {{ item.name }}
SKU: {{ item.sku }}
{% endfor %}
however in my email, it does not evaluate this TWIG and print the items in the array. Could you please tell me if I am doing something incorrect.