LazyCircles Posted April 27, 2016 Share Posted April 27, 2016 Hello everyone, Im kinda stuck finding a way to get all the images of a product. I know I need to create static function with a SQL query... all good.... I followed this topic (I think the query is ok, I can't test it) "https://www.prestashop.com/forums/topic/266568-how-to-get-all-product-images-to-show-on-product-listtpl/" My problem is how to assign this "SQL query" to a variable and then loop trough it in the .tpl file. Do you know how to do this? Already have a loop for products and categories just missing the one for product images. Thanks in advance! (sorry for my english) Best Regards, Bruno Link to comment Share on other sites More sharing options...
LazyCircles Posted May 3, 2016 Author Share Posted May 3, 2016 Anyone? pls Best regards, Bruno Link to comment Share on other sites More sharing options...
ernexus Posted May 4, 2016 Share Posted May 4, 2016 It's hard to tell without looking at your code. Assign your variable to smarty: $this->context->smarty->assign(array( 'your_variable' => $your_variable, )); Sample loop in tpl files: {foreach from=$invoices_collection item=invoice} {$invoice->id} {/foreach} 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