jcandco Posted October 11, 2010 Share Posted October 11, 2010 Hello,I would like to allow visitors to download a file identified but not to other visitors. And so if they are not, display the login page and then return to the download page (when they are identified)Thank you for your help.JC Link to comment Share on other sites More sharing options...
rocky Posted October 11, 2010 Share Posted October 11, 2010 So you want customers to only be able to download from the "Download" tab on the product page if they are logged in? You could change lines 354-356 (in PrestaShop v1.3.2) of product.tpl in your theme's directory from: {foreach from=$attachments item=attachment} {$attachment.name|escape:'htmlall':'UTF-8'} {$attachment.description|escape:'htmlall':'UTF-8'} {/foreach} to: {if $logged} {foreach from=$attachments item=attachment} {$attachment.name|escape:'htmlall':'UTF-8'} {$attachment.description|escape:'htmlall':'UTF-8'} {/foreach} {else} Please log in before downloading. {/if} Link to comment Share on other sites More sharing options...
shacker Posted November 17, 2010 Share Posted November 17, 2010 So you want customers to only be able to download from the "Download" tab on the product page if they are logged in? You could change lines 354-356 (in PrestaShop v1.3.2) of product.tpl in your theme's directory from: {foreach from=$attachments item=attachment} {$attachment.name|escape:'htmlall':'UTF-8'} {$attachment.description|escape:'htmlall':'UTF-8'} {/foreach} to: {if $logged} {foreach from=$attachments item=attachment} {$attachment.name|escape:'htmlall':'UTF-8'} {$attachment.description|escape:'htmlall':'UTF-8'} {/foreach} {else} Please log in before downloading. {/if} HI rocky. Do you have a trick for this:i need that guest can download the free products without register. A downlaod buton in product page Link to comment Share on other sites More sharing options...
rocky Posted November 18, 2010 Share Posted November 18, 2010 PrestaShop already lets guests download from the "Download" tab on the product page. Do you want to know how I changed the "Add to cart" button to a "Download" button on free modules on my website? Link to comment Share on other sites More sharing options...
shacker Posted November 18, 2010 Share Posted November 18, 2010 Thanks for reply. yes, but this action (download) dont add data of the product downloaded (like add to cart and purchase). I need these data. Its more complicated Link to comment Share on other sites More sharing options...
Recommended Posts