Skip to main content

Use a button for free downloads

More
11 years 11 months ago #174328 by aran-rad
-- HikaShop version -- : 2.3.3

Hello.I want to use button at hikashop,for free download.but I dont know it.

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

More
11 years 11 months ago #174396 by nicolas
Hi,

To add a free download file to you products, simply check the "free download" checkbox, when you upload your files in your product edition screen under the "Files" area.
If you want to change the link so that it is a button instead of a link, as our tutorial explains, you need to edit the file "show_block_product_files" via the menu Display>Views and change the code there.
The modification is actually quite easy.
Change the line:
$fileHtml = '<a class="hikashop_product_file_link" href="' . hikashop_completeLink('product&task=download&file_id=' . $file->file_id.$url_itemid) . '">' . $file->file_name . '</a><br/>';
to:
$fileHtml = '<input type="button" onclick="window.location=\'' . hikashop_completeLink('product&task=download&file_id=' . $file->file_id.$url_itemid) . '\'" value="' . $file->file_name . '"/><br/>';
and that should do it.
The following user(s) said Thank You: aran-rad

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

More
11 years 11 months ago #174708 by aran-rad
Thanks to nice cooperation. :cheer:

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

Time to create page: 0.171 seconds
Powered by Kunena Forum