[Skip to main content](#vessel-content)

#   'Upload free download files' setting in configurat

##

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

10 years 11 months ago [\#222739](#222739) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *['Upload free download files' setting in configurat](/forum/32-content-creation/880844-upload-free-download-files-setting-in-configurat#222739 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.45 -- PHP version -- : 5.4.38  Is there such an option for HikaShop like it is in HikaMarket?  I was not able to find it.")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.45
-- PHP version -- : 5.4.38

Is there such an option for HikaShop like it is in HikaMarket?

I was not able to find it.

[ ![Captura&#95;de&#95;pantalla&#95;2015-12-02&#95;a&#95;les&#95;0&#95;49&#95;27.png](/forum/attachment/28116) ](/forum/attachment/28116 "...es&#95;0&#95;49&#95;27.png")

- [ ![Captura&#95;de&#95;pantalla&#95;2015-12-02&#95;a&#95;les&#95;0&#95;49&#95;27.png](/forum/attachment/28116) ](/forum/attachment/28116 "...es&#95;0&#95;49&#95;27.png") [ ](/forum/attachment/28116?download=1 "...es&#95;0&#95;49&#95;27.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODQ0LXVwbG9hZC1mcmVlLWRvd25sb2FkLWZpbGVzLXNldHRpbmctaW4tY29uZmlndXJhdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

10 years 11 months ago [\#222741](#222741) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *['Upload free download files' setting in configurat](/forum/32-content-creation/880844-upload-free-download-files-setting-in-configurat#222741 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.45 -- PHP version -- : 5.4.38  Is there such an option for HikaShop like it is in HikaMarket?  I was not able to find it.")*

Hi,

The setting exists in HikaShop but it is still an hidden setting.
So for the moment you need to add the entry in the hikashop_config table.
The namekey is the same than in HikaMarket Code:

upload_file_free_download

I'll see with the rest of the HikaShop dev team if we can add the setting available in the configuration interface.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODQ0LXVwbG9hZC1mcmVlLWRvd25sb2FkLWZpbGVzLXNldHRpbmctaW4tY29uZmlndXJhdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

10 years 11 months ago -  10 years 11 months ago [\#222772](#222772) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *['Upload free download files' setting in configurat](/forum/32-content-creation/880844-upload-free-download-files-setting-in-configurat#222772 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.45 -- PHP version -- : 5.4.38  Is there such an option for HikaShop like it is in HikaMarket?  I was not able to find it.")*

Thank I did and effectively it works, the file gets uploaded as Free download: Yes

Sadly this leads me to discover that also from the backend now the file turns to Free download: No after saving or applying the same way it happens in frontend as stated in this other post:

[ www.hikashop.com/support/forum/22-market...r-saving.html#222769](http://www.hikashop.com/support/forum/22-market-bug-report/880843-dropped-file-status-changes-after-saving.html#222769)

So now I don't think the template has nothing to do with this problem.

UPDATE:

I tried this both in remote server at Rochenhost and in my localhost with MAMP, the behavior is the same. It simply turns to off after saving.

With fresh component, neutral templates, different standard setup PHPs.

I'm really astonished that this is not happening in your side. Any idea what any other factor can break this?

Last edit: 10 years 11 months ago by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODQ0LXVwbG9hZC1mcmVlLWRvd25sb2FkLWZpbGVzLXNldHRpbmctaW4tY29uZmlndXJhdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

10 years 11 months ago [\#222828](#222828) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *['Upload free download files' setting in configurat](/forum/32-content-creation/880844-upload-free-download-files-setting-in-configurat#222828 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.45 -- PHP version -- : 5.4.38  Is there such an option for HikaShop like it is in HikaMarket?  I was not able to find it.")*

Hi,

You can change the code: Code:

$fileClass = hikashop_get('class.file'); $status = $fileClass-&gt;save($file, $file_type); $ret-&gt;file_id = $status; $ret-&gt;params-&gt;file_id = $status; if($file_type != 'product') { $ret-&gt;params-&gt;file_free_download = $config-&gt;get('upload_file_free_download', false); $ret-&gt;params-&gt;file_limit = -1; $ret-&gt;params-&gt;file_size = @filesize($uploadConfig['upload_dir'] . @$uploadConfig['options']['sub_folder'] . $file-&gt;file_name); }

to: Code:

if($file_type != 'product') { $file-&gt;file_free_download = $config-&gt;get('upload_file_free_download', false); $file-&gt;file_limit = 0; } $fileClass = hikashop_get('class.file'); $status = $fileClass-&gt;save($file, $file_type); $ret-&gt;file_id = $status; $ret-&gt;params-&gt;file_id = $status; if($file_type != 'product') { $ret-&gt;params-&gt;file_free_download = $file-&gt;file_free_download; $ret-&gt;params-&gt;file_limit = $file-&gt;file_limit; $ret-&gt;params-&gt;file_size = @filesize($uploadConfig['upload_dir'] . @$uploadConfig['options']['sub_folder'] . $file-&gt;file_name); }

in the file administrator/components/com_hikashop/controllers/product.php in order to fix that.
A similar change can be do in components/com_hikamarket/controllers/product.php

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODQ0LXVwbG9hZC1mcmVlLWRvd25sb2FkLWZpbGVzLXNldHRpbmctaW4tY29uZmlndXJhdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

10 years 8 months ago [\#230856](#230856) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *['Upload free download files' setting in configurat](/forum/32-content-creation/880844-upload-free-download-files-setting-in-configurat#230856 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.45 -- PHP version -- : 5.4.38  Is there such an option for HikaShop like it is in HikaMarket?  I was not able to find it.")*

While the hack works, it would be very nice to have this as on option under the files configuration. Could you possibly add this to the next release please?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODQ0LXVwbG9hZC1mcmVlLWRvd25sb2FkLWZpbGVzLXNldHRpbmctaW4tY29uZmlndXJhdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

10 years 8 months ago [\#230912](#230912) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *['Upload free download files' setting in configurat](/forum/32-content-creation/880844-upload-free-download-files-setting-in-configurat#230912 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.45 -- PHP version -- : 5.4.38  Is there such an option for HikaShop like it is in HikaMarket?  I was not able to find it.")*

If any one wants to add to the possibility to change this in the file config add the following code: Code:

&lt;tr&gt; &lt;td class="key"&gt;&lt;?php echo JText::_('UPLOAD_FILE_FREE_DOWNLOAD'); ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo JHtml::_('dacshopselect.booleanlist', 'config[upload_file_free_download]','',$this-&gt;config-&gt;get('upload_file_free_download')); ?&gt;&lt;/td&gt; &lt;/tr&gt;

in the file administrator/components/com_hikashop/views/config/main.php in the &lt;!-- FILES --&gt; and add the string
UPLOAD_FILE_FREE_DOWNLOAD="Upload file as free download"
in the file /language/en-GB/en-GB.com_hikashop.ini file

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODQ0LXVwbG9hZC1mcmVlLWRvd25sb2FkLWZpbGVzLXNldHRpbmctaW4tY29uZmlndXJhdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 8 months ago [\#230869](#230869) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *['Upload free download files' setting in configurat](/forum/32-content-creation/880844-upload-free-download-files-setting-in-configurat#230869 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.45 -- PHP version -- : 5.4.38  Is there such an option for HikaShop like it is in HikaMarket?  I was not able to find it.")*

Hi,

This patch is already included in the latest version of HikaShop.
What is your version, 2.6.1 ?

The following user(s) said Thank You: [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODQ0LXVwbG9hZC1mcmVlLWRvd25sb2FkLWZpbGVzLXNldHRpbmctaW4tY29uZmlndXJhdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

10 years 8 months ago [\#231799](#231799) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *['Upload free download files' setting in configurat](/forum/32-content-creation/880844-upload-free-download-files-setting-in-configurat#231799 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.45 -- PHP version -- : 5.4.38  Is there such an option for HikaShop like it is in HikaMarket?  I was not able to find it.")*

Ah yes. Downloaded 2.6.1 and all is good. Very efficient as usual

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODQ0LXVwbG9hZC1mcmVlLWRvd25sb2FkLWZpbGVzLXNldHRpbmctaW4tY29uZmlndXJhdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.084 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
