Create a clone of the Fedex shipping plugin

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 7 months ago #236278

-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.5.34

Nicolas, I've created a custom modification of the Fedex shipping plugin that deals with custom-specified boxes and packing products in those boxes. I need to install this plugin WITH the standard Fedex shipping plugin so that both may be used to create shipping methods for separate warehouses.

I know the modified plugin works since initially it was to replace the standard plugin. So it is tested and working.

So I've updated the customized plugin via:
- renamed all the files from fedex* to fedexcb* (.php, .xml, .wsdl, configuration and my own helper.php file)
- modified the xml manifest to change the necessary names
- modified the class name in the fedexcb.php file from plgHikashopshippingFedex to plgHikashopshippingFedexCB
- modified the path to my helper file to fedexcb_Helper.php
- modified the path to the wsdl file in fedexcb.php
- modified the '$name' variable in fedexcb.php from 'fedex' to 'fedexcb'
- modified the '$doc_form' variable in fedexcb.php from 'fedex' to fedexcb'

Yet I'm still running into a conflict with the two fedex plugins installed and enabled simultaneously. If I disable either one things seem to work. Any obvious suggestions as to what part of the plugin or configuration might still be conflicting?

Thanks,
Paul


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

  • Posts: 12953
  • Thank you received: 1778
8 years 7 months ago #236330

Hello Paul,

Your changes seem to be enough to do what you want, can you give me more information on the issue that you are having through some screenshots, an error message will probably help us.

Thanks.

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 7 months ago #236370

FYI, I've requested the client send me a dump of the PHP error log or provide me access to it. Hopefully I'll get that this morning and it will provide some answers.

When I enable my custom box Fedex plugin (fedexcb) and enable it, the HikaShop shipping methods configuration page just displays a menu with NO styling.

Two screen shots attached. One is 'normal' with only one of the Fedex or Fedexcb plugins enabled (doesn't matter which one). The second is what happens on the same shipping methods configuration page with both are enabled.




3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
8 years 7 months ago #236374

Hello,

1. You should probably :
- Activate the Joomla debug mode ("Administration->Global configuration->System->Debug System/Language")
- Set the "error reporting" option of the Joomla configuration to "maximum"
- Test it again so that you can see if it display an error message which will help you to understand from what your issue is coming.

2. I only see 1 type of FedEx plugin, so you should make sure that you changed the name ("Hikashop FedEx Shipping Plugin") of your plugin through the xml file.

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 7 months ago #236555

Embarrassing! Finally got a php error log. Found that the helper file I created for this is what was getting in the way. It is still active in the original Fedex plugin (having not yet replaced that one with the standard one). So the class in that plugin was being declared a second time with the cloned plugin. Just FYI.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
The following user(s) said Thank You: Mohamed Thelji

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

Time to create page: 0.084 seconds
Powered by Kunena Forum