[Skip to main content](#vessel-content)

#   Require login for free download

##

- **[dreliance](/forum/user/12587-dreliance "View dreliance's Profile")**
- [![dreliance's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12587-dreliance "View dreliance's Profile") Topic Author
- [ Offline](/forum/user/12587-dreliance)

Less More

- Posts: 2
- Thank you received: 0
-
-

13 years 9 months ago [\#84953](#84953) by [dreliance](/forum/user/12587-dreliance "View dreliance's Profile")  *[Require login for free download](/forum/4-how-to/77351-require-login-for-free-download#84953 "How do I allow free downloads for an ebook product but deny the free download until the user registers or logs in?  Here is my test product, as you can tell- this can be downloaded without first logging in.   www.localsgaming.com/products/product/1-test-ebook  Thanks!")* was created by *[dreliance](/forum/user/12587-dreliance "View dreliance's Profile")*

How do I allow free downloads for an ebook product but deny the free download until the user registers or logs in?

Here is my test product, as you can tell- this can be downloaded without first logging in.
[ www.localsgaming.com/products/product/1-test-ebook](http://www.localsgaming.com/products/product/1-test-ebook)

Thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzUxLXJlcXVpcmUtbG9naW4tZm9yLWZyZWUtZG93bmxvYWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 9 months ago [\#84955](#84955) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Require login for free download](/forum/4-how-to/77351-require-login-for-free-download#84955 "How do I allow free downloads for an ebook product but deny the free download until the user registers or logs in?  Here is my test product, as you can tell- this can be downloaded without first logging in.   www.localsgaming.com/products/product/1-test-ebook  Thanks!")*

Hi,

A free download is a accessible download for every one.
But you can create a private download which would require to buy the product to download the files.
At this moment, the user should be logged.

Otherwise, you should create an HikaShop plugin which would forbidden free downloads for guest users.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzUxLXJlcXVpcmUtbG9naW4tZm9yLWZyZWUtZG93bmxvYWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[dreliance](/forum/user/12587-dreliance "View dreliance's Profile")**
- [![dreliance's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12587-dreliance "View dreliance's Profile") Topic Author
- [ Offline](/forum/user/12587-dreliance)

Less More

- Posts: 2
- Thank you received: 0
-
-

13 years 9 months ago [\#84959](#84959) by [dreliance](/forum/user/12587-dreliance "View dreliance's Profile")  Replied by *[dreliance](/forum/user/12587-dreliance "View dreliance's Profile")* on topic *[Require login for free download](/forum/4-how-to/77351-require-login-for-free-download#84959 "How do I allow free downloads for an ebook product but deny the free download until the user registers or logs in?  Here is my test product, as you can tell- this can be downloaded without first logging in.   www.localsgaming.com/products/product/1-test-ebook  Thanks!")*

Thanks Jerome, so if I am to understand your response correctly...
I should make the download private with a cost $0 and then uncheck free download and this will require them to login to their account?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzUxLXJlcXVpcmUtbG9naW4tZm9yLWZyZWUtZG93bmxvYWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 9 months ago [\#85001](#85001) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Require login for free download](/forum/4-how-to/77351-require-login-for-free-download#85001 "How do I allow free downloads for an ebook product but deny the free download until the user registers or logs in?  Here is my test product, as you can tell- this can be downloaded without first logging in.   www.localsgaming.com/products/product/1-test-ebook  Thanks!")*

Yes, but it will require too that the customer buy the item.
You can try to use this code if you want that the registered customer see the link without buying the item: Code:

if(hikashop_loadUser() != null){ //LAYOUT show_product_product_files $this-&gt;setLayout('show_block_product_files'); echo $this-&gt;loadTemplate(); }

Instead of: Code:

//LAYOUT show_product_product_files $this-&gt;setLayout('show_block_product_files'); echo $this-&gt;loadTemplate();

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzUxLXJlcXVpcmUtbG9naW4tZm9yLWZyZWUtZG93bmxvYWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[reddeer](/forum/user/14988-reddeer "View reddeer's Profile")**
- [![reddeer's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-02.jpg)](/forum/user/14988-reddeer "View reddeer's Profile")
- [ Offline](/forum/user/14988-reddeer)

Less More

- Posts: 29
- Thank you received: 0
-
-

13 years 5 months ago [\#107521](#107521) by [reddeer](/forum/user/14988-reddeer "View reddeer's Profile")  Replied by *[reddeer](/forum/user/14988-reddeer "View reddeer's Profile")* on topic *[Require login for free download](/forum/4-how-to/77351-require-login-for-free-download#107521 "How do I allow free downloads for an ebook product but deny the free download until the user registers or logs in?  Here is my test product, as you can tell- this can be downloaded without first logging in.   www.localsgaming.com/products/product/1-test-ebook  Thanks!")*

Hi,

We also want customers to download a free file, but only after registering. The idea is for them to return later and easily upgrade to a paid version of the same file.

Can you please identify the name of the file in which to substitute the new if(hikashop_loadUser() != null){ code for the original //LAYOUT show_product_product_files code for us HikaShop Business newbies?

Thank you.

Sincerely,
Reddeer

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzUxLXJlcXVpcmUtbG9naW4tZm9yLWZyZWUtZG93bmxvYWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 5 months ago [\#107550](#107550) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Require login for free download](/forum/4-how-to/77351-require-login-for-free-download#107550 "How do I allow free downloads for an ebook product but deny the free download until the user registers or logs in?  Here is my test product, as you can tell- this can be downloaded without first logging in.   www.localsgaming.com/products/product/1-test-ebook  Thanks!")*

Hi,

The view to edit is "product / show_block_product_files".

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzUxLXJlcXVpcmUtbG9naW4tZm9yLWZyZWUtZG93bmxvYWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[reddeer](/forum/user/14988-reddeer "View reddeer's Profile")**
- [![reddeer's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-02.jpg)](/forum/user/14988-reddeer "View reddeer's Profile")
- [ Offline](/forum/user/14988-reddeer)

Less More

- Posts: 29
- Thank you received: 0
-
-

13 years 4 months ago [\#107655](#107655) by [reddeer](/forum/user/14988-reddeer "View reddeer's Profile")  Replied by *[reddeer](/forum/user/14988-reddeer "View reddeer's Profile")* on topic *[Require login for free download](/forum/4-how-to/77351-require-login-for-free-download#107655 "How do I allow free downloads for an ebook product but deny the free download until the user registers or logs in?  Here is my test product, as you can tell- this can be downloaded without first logging in.   www.localsgaming.com/products/product/1-test-ebook  Thanks!")*

Merci.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MzUxLXJlcXVpcmUtbG9naW4tZm9yLWZyZWUtZG93bmxvYWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.104 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
