问题
$array = [
"low_price_low_stock_goods" => []
]
In my mailjet template
{% for item in var:low_price_low_stock_goods %}
<tr>
<td>{{ item.good_name }}</td>
<td>{{ item.value }}</td>
<td>{{ item.count }}</td>
</tr>
{% endfor %}
error is now No value for "var:low_price_low_stock_goods"
回答1:
As I answered you on Github Ricky: it's a known issue on Mailjet's templating language side, sorry for that. To avoid it, just pass a valid object in the API call for the low_price_low_stock_goods value
. This will work:
{
item.good_name: "",
item.value: "",
item.count: ""
}
来源:https://stackoverflow.com/questions/43996715/mailjet-vars-blank-array-throws-error