Require login for free download

  • Posts: 2
  • Thank you received: 0
11 years 9 months ago #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!

Please Log in or Create an account to join the conversation.

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
11 years 9 months ago #84955

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 & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0
11 years 9 months ago #84959

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 or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #85001

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:

	if(hikashop_loadUser() != null){
	//LAYOUT show_product_product_files
	$this->setLayout('show_block_product_files');
	echo $this->loadTemplate();
	}
Instead of:
	//LAYOUT show_product_product_files
	$this->setLayout('show_block_product_files');
	echo $this->loadTemplate();

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 0
11 years 5 months ago #107521

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 or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #107550

Hi,

The view to edit is "product / show_block_product_files".

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 0
11 years 5 months ago #107655

Merci.

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum