- Posts: 282
- Thank you received: 42
Developping a plugin that extend custom field Ajax File field.
8 years 7 months ago #289148
by oxido
-- 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?
?
-- 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(&$subject, $config){
parent::__construct($subject, $config);
}
Please Log in or Create an account to join the conversation.
8 years 7 months ago #289149
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Developping a plugin that extend custom field Ajax File field.
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,
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 & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Time to create page: 0.118 seconds