So I am trying to make heads or tails of the whole Hook (both TH and CH) infrastructure, and after reading through numerous posts, I think I am making some headway (thanks to everyone’s diligent efforts). I am now comfortable using pre/override/post Template hooks, and I have no problem adding my own /addons/my_changes/blocks - for the most part.
Here is where I am running into an issue. I want to display my product filters using an entirely separate code. What I originally did was to place a new file titled “product_filters_custom.tpl” in the skins/electro/blocks folder. In the blocks manager I can go to Block Content: List Objects > Product Filters and then Product Filters: Dynamic and voila, in Appearance Type I see “Custom” and it works perfectly. But I do not want to keep ANY code in the regular blocks folder, I want everything to be in addons/my_changes so that I won’t run into upgrade problems.
When I move the IDENTICAL file to addons/my_changes/blocks two things happen:
#1 - The custom addon is no longer available under the Block Content: List Objects > Product Filter, but rather as a Standard Sidebox > Custom. That is okay to me; however,
#2 - now the $items variable is not usable I guess because this is no longer a List Object. Strangely though, I cannot find where the $items variable is set - using Smarty Debug it doesn’t appear to be passed even to the regular Product Filters.
So I guess my question can lead down many different avenues that may contain an answer/solution:
- Am I trying to add this block improperly? If so, what is the proper way?
- If not, how can I add a block in addons/my_changes so that it is a list object?
- If I can’t, where is the the $items smarty variable set (I honestly grepped and couldn’t find it) and how can I best pass this to my new block?
Thanks in advance, if it weren’t for these forums I don’t know how I would be even this far along.