So I have a really interesting question.
I have a block that depends on
Basically I need to load this block after the collection is generated.
getLoadedProductCollection method to load the collection.
In my layout this block is in the header, so when I call this method in header, I expect the collection to load, but instead it returns an empty collection.
When I call it after the
\Magento\Catalog\Block\Product\ListProduct is loaded, then I get the expected collection.
But then this block is at the end of the page.
I could move this block by using jQuery, but I'm trying to avoid such a workaround.
What's is the best way to generate this block in header and have the collection loaded in