Forum
Conditional within perch:orderitems
I'm trying to create a shop email that only displays an item if the product's e-ticket field checkbox is checked.
So I have
<perch:orderitems>
<perch:if exists="eticket">
...show the record
</perch:if>
</perch:orderitems>
But when I add the conditional around the output, no items appear in the email even though some of the order items are checked as e-tickets. Should I be able to use a conditional like that in shop's emails?
Monty. Try the perch showall as I have above... is the “eticket” field present?
Yes it’s there.
Can you post your diagnostic report?
sure, here is the diagnostic report:
Is the item there but with no value? Or does it have a value? What is the value?
Yes, when viewing show all, I see
eticket true
andperch_eticket true
(the 2nd of these two records shown has the value).Shoot, I'm sorry. Reuploading from dev works as expected now. Sorry.
Is there a better way to test email layouts?
Thank you, Monty
How are you testing them at the moment?