Custom Price Plugin

  • Posts: 118
  • Thank you received: 3
11 years 1 month ago #125916

-- HikaShop version -- : Business 2.2.2

Hello, I have created a 'custom price plugin' by modifying the 'Donation' plugin. Currently this plugin is in the 'plugins/system/custom_price' folder and it is called 'custom_price'. Since this is a core plugin to the Hikashop install, each time I upgrade Hikashop, this plugin gets overwritten and I have to manually restore it from a backup copy stored in another folder.

Obviously this is not the ideal solution, could you please let me know what I need to change to alter its name to 'custom_price_qcp' to ensure the calculations are maintained through updates?

Thanks

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 1 month ago #125968

Hi,

You have to retrieve the XML and the PHP files and rename them.
After that, you have to modify both files. In the xml file, you have to change this particular line:

<filename plugin="custom_price">custom_price.php</filename>
using the new name for the plugin and the new name (without removing the ".php" for the filename).

In the php file, you will have the chance the classname
class plgSystemCustom_price extends JPlugin{
and the line which load the parameters
$plugin = JPluginHelper::getPlugin('system', 'custom_price');

Finally, you can put the two files into a zip file and install the plugin in your joomla.
Unpublish the old plugin and publish the new one. That's it !

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.

  • Posts: 118
  • Thank you received: 3
11 years 1 month ago #125975

Perfect info, I'll go try it soon

Thanks again!

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

  • Posts: 64
  • Thank you received: 7
  • Hikashop Business
6 years 11 months ago #284993

Hi ahcopyart,

I have been trying to do the same, but unfortunately my knowledge of php is not good enough. So I can't get it to work. I have Hikashop 2.6.4. Business edition. I haven't had the time to update to Hikashop 3** yet. Anyway Would you mind sharing your custom price plugin that you have created?

Any help would be so much appreciated. Thanks in advance.
Justin

Last edit: 6 years 11 months ago by justme.

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

  • Posts: 64
  • Thank you received: 7
  • Hikashop Business
6 years 11 months ago #284994

Just an extra note, I have bought the custom price plugin for the order custom field. But I can't implement this because I would have to alter my whole site and also our connected filemaker database. Our product pages are very slow because of the many variations. So I am looking for a temporary quick fix with the price change. So I can focus in the future how to change this and also upgrade to 3.2 version. This is just an extra explanation for me asking for your plugin.

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

Time to create page: 0.045 seconds
Powered by Kunena Forum