jondrew Posted June 6, 2011 Share Posted June 6, 2011 Hi,I would like to display an attachment on a product on the category page. I've tried to take the code found on product.tpl and add it in to product-list.tpl file but this doesn't seem to work, I've alaso tried adding the following to the code to try and get it to pull the attachments into the product list file but with no luck: <!-- product's features --> {php} global $cookie; $product=$this->get_template_vars('product'); // nb $this IS smarty $myprod = new Product($product['id_product']); $features = $myprod->getAttachments(intval($cookie->id_lang)); $this->assign('attachments',$attachments); {/php} {if $attachments} {foreach from=$attachments item=attachment} {$attachment.name|escape:'htmlall':'UTF-8'} {$attachment.description|escape:'htmlall':'UTF-8'} {/foreach} {/if} I used the above to pull in product features but won't seem tot work fro attachments. I'm using version 1.3.Any help is much appreciated.ThanksJon Link to comment Share on other sites More sharing options...
Daniel - PrestaBR Posted December 6, 2011 Share Posted December 6, 2011 Did you manage to solve that? I'm wondering if there is something already done. Link to comment Share on other sites More sharing options...
Presta FABRIQUE Posted February 21, 2013 Share Posted February 21, 2013 Heyy Here's a fix / how-to for ya How to display attachments in product list or category page http://www.presta-shop-modules.com/prestatips/9-show-attachments-in-product-list 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