Alexander.X Posted September 9, 2016 Share Posted September 9, 2016 (edited) Hello everybody! I'm working on frontend of my store, and I need to pass the extra product info to the product_list template. When I'm on Category page - there are good hooks in the CategoryController (actionProductListOverride and actionProductListModifier) that allows me to modify product list and each product info any way I want. But when product_list template is rendered at index page - the data is passed into template from HomeFeatured and BlockNewProducts modules, not from CategoryController, and theese modules dont have any hooks to help me modify product list. In theese modules product list is retrived via Product::getNewProduct and Category::getProducts methods. I've checked all the callstack from theese methods to the ObjectModel::__construct if there are some hooks inside, and I've found nothing. Is there any way to modify product list in this situation, other than modify core files or use override? Thanks in advance. Edited September 9, 2016 by Alexander.X (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted September 12, 2016 Share Posted September 12, 2016 Nope, there isn't, I always had to use override for those, unfortunately (which sucks if you only have to add a small functionality to the product list there) Link to comment Share on other sites More sharing options...
Alexander.X Posted September 30, 2016 Author Share Posted September 30, 2016 well, thanks for your answer. but that makes me worry about extra overhead when I override a lot of classes for every string of code... are those overrides cached someway to reduce overhead? (for example I know the cache/class_index.php stores such information, but i have not seen into it to understand how it works yet). Link to comment Share on other sites More sharing options...
NemoPS Posted October 3, 2016 Share Posted October 3, 2016 The only way is to hardcode modifications, which is what I do when performance is a must Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now