Slowbr Posted February 25, 2020 Share Posted February 25, 2020 Hello, i'm making a theme and need a name of parent of category of product in miniature of product in search result, category listing etc. I have added a variable to smarty assign array in assignCategory() method in ProductController to hold it and it works with templates on product page, but not with product miniature template on listing pages where i actually need it. I looked through other controllers, but cant see a proper one Link to comment Share on other sites More sharing options...
tdsoft Posted February 27, 2020 Share Posted February 27, 2020 What is template (*.tpl) file you want use it? Link to comment Share on other sites More sharing options...
fbenoist.com Posted February 27, 2020 Share Posted February 27, 2020 Hi, You must not modify the controller. Product information is normally sent to smarty after being processed by class ProductPresenter. This class will always send the same information about a product to smarty no matter which controller is active. The parent category name must be in {$product.category_name} 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