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

#   Developping a plugin that extend custom field Ajax File field.

##

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

Less More

- Posts: 282
- Thank you received: 42
-
-

8 years 7 months ago [\#289148](#289148) by [oxido](/forum/user/29793-oxido "View oxido's Profile")  *[Developping a plugin that extend custom field Ajax File field.](/forum/31-development/894026-developping-a-plugin-that-extend-custom-field-ajax-file-field#289148 "-- HikaShop version -- : 3.3.0 -- Joomla version -- : 3.8.5  Guys, I ask you for guidance, please explain to me how can i extend and use class hikashopFieldAjaxfile in my own custom field plugin. I tried to understand how the datepicker plugin is working, but without much success. I want only to add some restriction to the files that can be uploaded through this custom field. Iknow that Hikashop has already implemented a restriction system for files, but i want to allow users to upload many types of files. But when a user sell an audio file, i want to allow him to upload 1 demo file that should be an mp3 file, or wav. I can not add these restrictions to Hikashop's main settings,because the users can also upload images.  How can i use this: class plgHikashopMyclass extends hikashopFieldAjaxfile { } ? I want this field to be visible in frontend, cuz i'm using hikamarket. This is necessary in every plugin? ?")* was created by *[oxido](/forum/user/29793-oxido "View oxido's Profile")*

-- HikaShop version -- : 3.3.0
-- Joomla version -- : 3.8.5

Guys, I ask you for guidance, please explain to me how can i extend and use class hikashopFieldAjaxfile in my own custom field plugin.
I tried to understand how the datepicker plugin is working, but without much success.
I want only to add some restriction to the files that can be uploaded through this custom field. Iknow that Hikashop has already implemented a restriction system for files, but i want to allow users to upload many types of files. But when a user sell an audio file, i want to allow him to upload 1 demo file that should be an mp3 file, or wav.
I can not add these restrictions to Hikashop's main settings,because the users can also upload images.

How can i use this:
class plgHikashopMyclass extends hikashopFieldAjaxfile { } ?
I want this field to be visible in frontend, cuz i'm using hikamarket.
This is necessary in every plugin? Code:

function plgHikashopName(&amp;$subject, $config){ parent::__construct($subject, $config); }

?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50Lzg5NDAyNi1kZXZlbG9wcGluZy1hLXBsdWdpbi10aGF0LWV4dGVuZC1jdXN0b20tZmllbGQtYWpheC1maWxlLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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)
-

8 years 7 months ago [\#289149](#289149) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Developping a plugin that extend custom field Ajax File field.](/forum/31-development/894026-developping-a-plugin-that-extend-custom-field-ajax-file-field#289149 "-- HikaShop version -- : 3.3.0 -- Joomla version -- : 3.8.5  Guys, I ask you for guidance, please explain to me how can i extend and use class hikashopFieldAjaxfile in my own custom field plugin. I tried to understand how the datepicker plugin is working, but without much success. I want only to add some restriction to the files that can be uploaded through this custom field. Iknow that Hikashop has already implemented a restriction system for files, but i want to allow users to upload many types of files. But when a user sell an audio file, i want to allow him to upload 1 demo file that should be an mp3 file, or wav. I can not add these restrictions to Hikashop's main settings,because the users can also upload images.  How can i use this: class plgHikashopMyclass extends hikashopFieldAjaxfile { } ? I want this field to be visible in frontend, cuz i'm using hikamarket. This is necessary in every plugin? ?")*

Hello,

1 - No you don't need to declare an override function if you don't want to override that function.
2 - We don't use constructors based on the class name for a very long time ; it's deprecated in PHP 5 and even refused by PHP 7 !
3 - If you do not have the required PHP skills ; we would recommend you to contact someone to help you.
4 - Feel free to submit a feature request if you have an idea which can be interesting for the all community.
5 - But if you need that new feature to be implemented into the HikaShop core class in a short delay ; it might be faster to contact some of the HikaShop partners.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2RldmVsb3BtZW50Lzg5NDAyNi1kZXZlbG9wcGluZy1hLXBsdWdpbi10aGF0LWV4dGVuZC1jdXN0b20tZmllbGQtYWpheC1maWxlLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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.150 seconds

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

[](#top)
