- Posts: 118
- Thank you received: 3
Custom Price Plugin
12 years 11 months ago #125916
by ahcopyart
Custom Price Plugin was created by ahcopyart
-- 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
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.
12 years 11 months ago #125968
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom Price Plugin
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:
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
and the line which load the parameters
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,
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:
Code:
<filename plugin="custom_price">custom_price.php</filename>
In the php file, you will have the chance the classname
Code:
class plgSystemCustom_price extends JPlugin{
Code:
$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.
Please Log in or Create an account to join the conversation.
12 years 11 months ago #125975
by ahcopyart
Replied by ahcopyart on topic Custom Price Plugin
Perfect info, I'll go try it soon
Thanks again!
Thanks again!
Please Log in or Create an account to join the conversation.
8 years 9 months ago - 8 years 9 months ago #284993
by justme
Replied by justme on topic Custom Price Plugin
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
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: 8 years 9 months ago by justme.
Please Log in or Create an account to join the conversation.
8 years 9 months ago #284994
by justme
Replied by justme on topic Custom Price Plugin
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.226 seconds