-- HikaShop version -- : 2.2.3
-- Joomla version -- : 2.5.18
-- PHP version -- : 5
Hi,
I need to write a custom plugin for coupons. I have seen the "developer documentation" describing how to create a custom plugin and indeed i have written a custom plugin for hikashop before (albeit a long time ago). Ok so what i want to do is write a custom plugin for coupons - so im thinking of adding that custom plugin as follows:-
/plugins/hikashop/coupon/coupon.php
(for the above: is this the correct folder/file path for adding a coupon plugin?)
and then im thinking of adding code like so (to the coupon.php plugin file):-
class plgHikashopCoupon extends JPlugin {
function plgHikashopCoupon(&$subject, $config) {
parent::__construct($subject, $config);
}
function onBeforeCouponLoad(&$coupon,&$do) {
}
}
(for the above: am i extending the right class? or should i be extending a more specific coupon class? Also is my constructor function correct?)
Thanks for the help in advance!