I want YES to be enable by default to IMAGES AND FILE, in the pup-up uppload

  • Posts: 2
  • Thank you received: 0
7 years 9 months ago #270837

Hello
i have the HikaShop Business 3.0.1, i want on section IMAGES AND FILE, in the pup-up upload in the FREE DOWNLOAD to setup the button YES by DEFAULT (green) ???

You can see on the attach file. I want YES to be enable by default ( green) ??? How to do it ???
Thanks

Attachments:

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

  • Posts: 83404
  • Thank you received: 13497
  • MODERATOR
7 years 9 months ago #270844

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

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

  • Posts: 2
  • Thank you received: 0
7 years 9 months ago #270898

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.

  • Posts: 83404
  • Thank you received: 13497
  • MODERATOR
7 years 9 months ago #270900

Then probably some similar modification is necessary somewhere else in that file.

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

  • Posts: 84
  • Thank you received: 13
  • Hikashop Business
3 years 10 months ago #331949

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


Javier Ballester

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

  • Posts: 83404
  • Thank you received: 13497
  • MODERATOR
3 years 10 months ago #331950

Hi,

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.

  • Posts: 84
  • Thank you received: 13
  • Hikashop Business
3 years 10 months ago #331967

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


Javier Ballester
Attachments:
The following user(s) said Thank You: nicolas

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

  • Posts: 84
  • Thank you received: 13
  • Hikashop Business
3 years 9 months ago #333090

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


Javier Ballester

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

  • Posts: 83404
  • Thank you received: 13497
  • MODERATOR
3 years 9 months ago #333093

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.

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

Time to create page: 0.080 seconds
Powered by Kunena Forum
loading