StepOne Posted January 28, 2021 Share Posted January 28, 2021 Hi, I would like to display available Carriers in a product. So, I did it with override ProductController.php for Product detail : $this->product->getCarriers(); But I need it in the list of products too (in each product miniature). But I don't know how to override because CategoryController seems not have the possibility to change each product in the list. Could you help me on how to do this? Thanks ! Link to comment Share on other sites More sharing options...
Prestachamps Posted January 28, 2021 Share Posted January 28, 2021 Hi, Since you need it on product page and also for each product in category listing, then in this case you should add this to the Product class override. Kind regards, Leo Link to comment Share on other sites More sharing options...
StepOne Posted January 28, 2021 Author Share Posted January 28, 2021 (edited) Thanks a lot for your answer. I didn't success with this so I've created a module directly (I Thought it was quicker with override). I passed the product parameters in the hook and then get the Carriers and finally displayed the result in the hook. Edited January 28, 2021 by StepOne (see edit history) 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