Natanaël Posted June 24, 2018 Share Posted June 24, 2018 (edited) I try to display the data of a single product (selection by its id 32) on my homepage. I already managed to display the title and the short description via the FrontController: Public static function getProductName ($ id) { $ langID = Context :: getContext () -> language-> id; $ product = new Product ($ id, false, $ langID); echo ($ product-> name); } public static function getProductDescription ($ id) { $ langID = Context :: getContext () -> language-> id; $ product = new Product ($ id, false, $ langID); echo ($ product-> description_short); } and calling the variables like that in my tpl: {FrontController :: getProductName (32)} {FrontController :: getProductDescription (32)} It works, but I don't know how to display the image (cover) and features. Is it possible in the same way? Thanks for help :) Edited June 24, 2018 by Natanaël Font bug (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