Hi
I want to get the sum of findTaxonomy, then I try this, but it won’t work.
{% set count = taxonomy.findTaxonomy({'status':'sold'}).maxCount() %}
How is the right way to do the counting?
Thanks
Ray
Hi
I want to get the sum of findTaxonomy, then I try this, but it won’t work.
{% set count = taxonomy.findTaxonomy({'status':'sold'}).maxCount() %}
How is the right way to do the counting?
Thanks
Ray
The best way to resolve these sort of issues is to break them down into small steps.
{{ dump(taxonomy.findTaxonomy({'status':'sold'})) }}
Look in your messages tab of the debugger (enable it first) to examine the results. If all is good, continue to step 2:
{{ dump(taxonomy.findTaxonomy({'status':'sold'})|length) }}
That should give you the number of found items.
Big thanks! It works now
Just get start with GRAV yesterday and I’m loving it