View more context

 

r3v3rb

in fact that should be year -> month -> items

r3v3rb

for an accordion of previously ordered items

r3v3rb

@brett.tasker yep, I need to split the created dates first into year and month arraylists then I'll add all the orderitems and then group by month -> year

brett.tasker

I would probably do the splitting / grouping in PHP so that you are only requesting the raw data from Database once (As I am assuming you will be displaying all items within an accordian that is grouped).

I did something similar a few weeks ago but had to add additional information to the grouping so essentially had to loop results and create my own GroupedList manually.

NOTE: yield can be useful in helping to manage memory with this.

nightjarnz

GroupedList caveat: that'll be a lot of PHP side processing.

taoceanz

Is it possible to use PHP functions in a .ss file? I'm rendering a view file and passing an array of data but want to check whether certain values exist within the array before displaying a section in that view file. I thought using in_array() or isset() would be sufficient but it's behaving like the function isn't being run.