Developping a plugin that extend custom field Ajax File field.

  • Posts: 231
  • Thank you received: 28
  • Hikashop Business
6 years 8 months ago #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?

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

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 8 months ago #289149

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 & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum