Override user points plugin

  • Posts: 1119
  • Thank you received: 114
6 years 2 months ago #297276

Hi,

Is there a way to override hikashop user points plugin so no changes would be made after update??
Same question would apply to cart notify plugin.
Or only way is to copy plugin, rename it and make it as my own?

Tried to copy userpoints_checkout.php into "my_template/hikashop/" folder but it takes no effect.

Thanks

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

  • Posts: 12953
  • Thank you received: 1778
6 years 2 months ago #297289

Hello,

Yes the only way will probably be to directly copy the plugin, apply your modification and use. That way, your modification won't be reverted after every update.

Best regards,
Mohamed Thelji.

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

  • Posts: 1119
  • Thank you received: 114
6 years 2 months ago #297308

Hi,

Thanks for replay. Then why some of the plugins can be overridden and some not?

As example this topic: www.hikashop.com/forum/product-category-...n-plugin.html#297211

Thanks

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
6 years 2 months ago #297312

Hi,

This is a system implemented in the plugin itself because the plugin outputs HTML and we want to allow merchants to change that HTML without having to make a copy of the plugin, which is more complex than a "view" override.
But if you want to change some code directly in the plugins/system/hikashopproductinsert/hikashopproductinsert.php file of the plugin of that other thread, I would tell you the exact same thing Mohamed told you. You have to make a copy of the plugin with another name.

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

  • Posts: 103
  • Thank you received: 5
5 years 9 months ago #303558

beside the renaming of the copy of the plugin, is there something else to do?
because i did that and do not find the plugin in the plugin section of hikashop/joomla

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
5 years 9 months ago #303573

Hi,

Renaming a plugin is not just about changing the folder name. You need to change the files name, you need to edit the files and change the code in them to correspond to the new name. And you need to zip the files and install the zip so that it is added to the database with the new name.
So you need some PHP knowledge and know how plugins can be developed for Joomla:
docs.joomla.org/J3.x:Creating_a_Plugin_for_Joomla

The following user(s) said Thank You: n00bster

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

Time to create page: 0.082 seconds
Powered by Kunena Forum