I tried using {{customer.orders_count}} in my script tag to get the total number of orders placed by a cutomer. But I am getting ‘0’ as an output everytime. Can anyone please help me with this issue?
I tried using {{customer.orders_count}} in my script tag to get the total number of orders placed by a cutomer. But I am getting ‘0’ as an output everytime. Can anyone please help me with this issue?
2
Answers
That is the basic checklist I would use. Answering a question with questions. The only way to go sometimes.
try
{{ customer.orders.size }}