Skip to main content

Change filename for every prod. on download list

More
12 years 1 month ago #167802 by andreasuriani
-- HikaShop version -- : latest

Hi All,
i'd like that in Download list, the filename for download product is the same for all products (something like "Download File".

How can i do this?

Thanks
Andrea

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

More
12 years 1 month ago #167839 by nicolas
Hi,

You mean in the "My downloads" list of downloads that you can access via the user control panel on the frontend ?
In that case, you can edit the file "downloads" of the view "user" via the menu Display>views and change the code:
$downloadFile->file_name

to:
'Download File'

Note that this code is several times in there and you need to replace all of them.

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

More
12 years 1 month ago #167881 by andreasuriani
Ciao Nicolas,
yes, i mean this!

I didn't find the string to replace: :P

Thanks a lot!

Andrea

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

More
12 years 1 month ago #168073 by andreasuriani
Exactly, where i have to change into the "downloads" of the view "user" via the menu Display>views?

I tried but it dosn't work!
:(

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

More
12 years 1 month ago #168083 by nicolas
Here is where you need to do the change in that view file :
take.ms/1aW4j
It's not possible that you don't have that code in that file. If you don't see it, it means that you're not editing the correct file.

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

More
12 years 1 month ago #168156 by andreasuriani
Code:
if(in_array(substr($downloadFile->file_path, 0, 1), array('@', '#')) && (int)$downloadFile->file_quantity > 1) { for($i = 1; $i <= (int)$downloadFile->file_quantity; $i++) { echo '<a href="'.hikashop_completeLink('order&task=download&file_id='.$downloadFile->file_id.'&order_id='.$order_id.'&file_pos='.$i.$url_itemid).'">'Download File'</a><br/>'; } $fileHtml = ''; } else { $fileHtml = '<a href="'.hikashop_completeLink('order&task=download&file_id='.$downloadFile->file_id.'&order_id='.$order_id.$file_pos.$url_itemid).'">'Download File'</a>'; } } else { $fileHtml = 'Download File';
It doesn't work.
made i some mistake?
Andrea

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

More
12 years 1 month ago #168165 by nicolas
Yes. You didn't change $downloadFile->file_name to 'Download File' but you changed '.$downloadFile->file_name.' to 'Download File' and thus you broke the PHP code of the file.

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

More
12 years 1 month ago #168238 by andreasuriani
Thank you nicolas - Works perfectly.

And

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

Time to create page: 0.398 seconds
Powered by Kunena Forum