Change filename for every prod. on download list

  • Posts: 177
  • Thank you received: 1
10 years 3 months ago #167802

-- 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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 3 months ago #167839

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.

  • Posts: 177
  • Thank you received: 1
10 years 3 months ago #167881

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.

  • Posts: 177
  • Thank you received: 1
10 years 3 months ago #168073

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 3 months ago #168083

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.

  • Posts: 177
  • Thank you received: 1
10 years 3 months ago #168156

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 3 months ago #168165

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.

  • Posts: 177
  • Thank you received: 1
10 years 3 months ago #168238

Thank you nicolas - Works perfectly.

And

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

Time to create page: 0.043 seconds
Powered by Kunena Forum