- Posts: 177
- Thank you received: 1
Change filename for every prod. on download list
- andreasuriani
-
Topic Author
- Offline
Less
More
12 years 1 month ago #167802
by andreasuriani
Change filename for every prod. on download list was created 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
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.
12 years 1 month ago #167839
by nicolas
Replied by nicolas on topic Change filename for every prod. on download list
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.
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.
- andreasuriani
-
Topic Author
- Offline
Less
More
- Posts: 177
- Thank you received: 1
12 years 1 month ago #167881
by andreasuriani
Replied by andreasuriani on topic Change filename for every prod. on download list
Ciao Nicolas,
yes, i mean this!
I didn't find the string to replace:
Thanks a lot!
Andrea
yes, i mean this!
I didn't find the string to replace:
Thanks a lot!
Andrea
Please Log in or Create an account to join the conversation.
- andreasuriani
-
Topic Author
- Offline
Less
More
- Posts: 177
- Thank you received: 1
12 years 1 month ago #168073
by andreasuriani
Replied by andreasuriani on topic Change filename for every prod. on download list
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!
I tried but it dosn't work!
Please Log in or Create an account to join the conversation.
12 years 1 month ago #168083
by nicolas
Replied by nicolas on topic Change filename for every prod. on download list
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.
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.
- andreasuriani
-
Topic Author
- Offline
Less
More
- Posts: 177
- Thank you received: 1
12 years 1 month ago #168156
by andreasuriani
It doesn't work.
made i some mistake?
Andrea
Replied by andreasuriani on topic Change filename for every prod. on download list
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';
made i some mistake?
Andrea
Please Log in or Create an account to join the conversation.
12 years 1 month ago #168165
by nicolas
Replied by nicolas on topic Change filename for every prod. on download list
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.
- andreasuriani
-
Topic Author
- Offline
Less
More
- Posts: 177
- Thank you received: 1
12 years 1 month ago #168238
by andreasuriani
Replied by andreasuriani on topic Change filename for every prod. on download list
Thank you nicolas - Works perfectly.
And
And
Please Log in or Create an account to join the conversation.
Time to create page: 0.398 seconds