- Posts: 2
- Thank you received: 0
I want YES to be enable by default to IMAGES AND FILE, in the pup-up uppload
9 years 3 months ago #270844
by nicolas
Replied by nicolas on topic I want YES to be enable by default to IMAGES AND FILE, in the pup-up uppload
Hi,
Before the line:
$status = $fileClass->save($file, $file_type);
you can add the code:
$file->file_free_download = 1;
in the file administrator/components/com_hikashop/controllers/product.php
Before the line:
$status = $fileClass->save($file, $file_type);
you can add the code:
$file->file_free_download = 1;
in the file administrator/components/com_hikashop/controllers/product.php
Please Log in or Create an account to join the conversation.
9 years 3 months ago #270898
by wawa
Replied by wawa on topic I want YES to be enable by default to IMAGES AND FILE, in the pup-up uppload
Hello i apply the instructions, but the default button is still the right one (no) .thanjs
Please Log in or Create an account to join the conversation.
9 years 3 months ago #270900
by nicolas
Replied by nicolas on topic I want YES to be enable by default to IMAGES AND FILE, in the pup-up uppload
Then probably some similar modification is necessary somewhere else in that file.
Please Log in or Create an account to join the conversation.
5 years 5 months ago #331949
by Jabatec
Javier Ballester
Replied by Jabatec on topic I want YES to be enable by default to IMAGES AND FILE, in the pup-up uppload
Hi,
I am trying to solve the same problem, but the following line does not exist in the file product.php
$status = $fileClass->save($file, $file_type);
Thank you
Javier
I am trying to solve the same problem, but the following line does not exist in the file product.php
$status = $fileClass->save($file, $file_type);
Thank you
Javier
Javier Ballester
Please Log in or Create an account to join the conversation.
5 years 5 months ago #331950
by nicolas
Replied by nicolas on topic I want YES to be enable by default to IMAGES AND FILE, in the pup-up uppload
Hi,
Please double check. I still see that line in the manageUpload function of that file with the latest version of HikaShop.
Please double check. I still see that line in the manageUpload function of that file with the latest version of HikaShop.
Please Log in or Create an account to join the conversation.
5 years 5 months ago #331967
by Jabatec
Javier Ballester
Replied by Jabatec on topic I want YES to be enable by default to IMAGES AND FILE, in the pup-up uppload
Hi, sorry, yes line 746
When importing files the default value is also "no",
but after reviewing the forum, I have been doing tests and hikashop allows access via csv import, to all the important fields of image registration and files that are linked to a product. Imports, i haven't tried all of them, but filename and files_free_download work fine.
These fields are:
files | files_name | files_description | files_limit | files_ordering | files_free_download | images | images_name | images_description | images_limit | images_ordering | images_free_download |
Thanks for the job.
Javier
When importing files the default value is also "no",
but after reviewing the forum, I have been doing tests and hikashop allows access via csv import, to all the important fields of image registration and files that are linked to a product. Imports, i haven't tried all of them, but filename and files_free_download work fine.
These fields are:
files | files_name | files_description | files_limit | files_ordering | files_free_download | images | images_name | images_description | images_limit | images_ordering | images_free_download |
Thanks for the job.
Javier
Javier Ballester
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
5 years 3 months ago #333090
by Jabatec
Javier Ballester
Replied by Jabatec on topic I want YES to be enable by default to IMAGES AND FILE, in the pup-up uppload
Hi Nicolas,
I think that with the last update this file has been modified.
In again include the following line to be able to activate by default the option "downloads yes" but I think it does not work
$ file-> free_download_file = 1;
Thanks
Javier
I think that with the last update this file has been modified.
In again include the following line to be able to activate by default the option "downloads yes" but I think it does not work
$ file-> free_download_file = 1;
Thanks
Javier
Javier Ballester
Please Log in or Create an account to join the conversation.
5 years 3 months ago #333093
by nicolas
Replied by nicolas on topic I want YES to be enable by default to IMAGES AND FILE, in the pup-up uppload
Hi,
Of course, all the core files of HikaShop are overwritten on each update.
That change being in a core file, it's normal that you loose it when you update your HikaShop.
Note however that we've added instead the line below instead, thinking about you :
$file->file_free_download = (int)$config->get('default_file_free_download_on_upload', 0);
That way, you don't need to modify that file anymore.
Instead, you can open the table hikashop_config via your PHPMyAdmin and add an entry with the config_namekey default_file_free_download_on_upload and the value 1 and then it will work like you want and that change will be permanent, even when you update in the future.
Of course, all the core files of HikaShop are overwritten on each update.
That change being in a core file, it's normal that you loose it when you update your HikaShop.
Note however that we've added instead the line below instead, thinking about you :
$file->file_free_download = (int)$config->get('default_file_free_download_on_upload', 0);
That way, you don't need to modify that file anymore.
Instead, you can open the table hikashop_config via your PHPMyAdmin and add an entry with the config_namekey default_file_free_download_on_upload and the value 1 and then it will work like you want and that change will be permanent, even when you update in the future.
Please Log in or Create an account to join the conversation.
Time to create page: 0.192 seconds