Page 1 of 1
Need help (urgently!!!) - PCS plugin
Posted: 06 Dec 2024, 21:35
by EsDeeEm
Help! (please)...
I'm completely stuck with the development of a shipment plugin and I'm quite sure I'm overlooking something.
I know the plugin is correctly loaded into Joomla, namespaces are loaded into the autoloader, params are visible in the shipping method and loaded into the database table _phocacart_shipping_methods... But I cannot get any logging to give me feedback on what my plugin code is doing?
Is this code somehow no longer reporting to the Joomla framework, and running as a part of the Phoca code in total? What can I do to monitor the plugin so I can start working on the correct implementation of all features, instead of guessing and trying to find my way blind...
I'm not the "pushy" guy, but I really hope if someone could give me an answer soon, so I can work on it the rest of the weekend.
Thanks everyone in advance.
Re: Need help (urgently!!!) - PCS plugin
Posted: 07 Dec 2024, 00:10
by christine
Hi,
Which plugin exactly do you mean - Any error message?
Maybe would be useful to enable debug mode and error reporting in Joomla! Configuration.
Error reporting to Maxium. Debug Settings: Yes. To get more information where this problem occurs. So called "Call Stack"
Kind regards
Christine
Re: Need help (urgently!!!) - PCS plugin
Posted: 07 Dec 2024, 11:33
by EsDeeEm
Hey Christine,
That's the whole point: I'm a bit stuck in the way the PCS (Phoca Cart Shipping) plugin is run or activated, as functions like onInitialise won't work: it is labeled as a PCS plugin instead of a system plugin... So I would like to know where and how I can have my logging/debugging activated
Re: Need help (urgently!!!) - PCS plugin
Posted: 08 Dec 2024, 01:28
by Jan
Hi, just see the events in Phoca Cart code.
1) first of all, when you select shipping method, test if the parameters of your plugin are loaded - create shipping method and select your plugin from list and see last tab to check the parameters.
2) To see if the plugin is active, just go to checkout page, to shipping method edit and there your plugin should e.g. give some debug info.
But it all depends on your plugin which which events it will be triggered.
E.g. the standard plugins just trigger event in shipping method edit in checkout - e.g. to add a map of branches, etc. etc.
Jan
Re: Need help (urgently!!!) - PCS plugin
Posted: 08 Dec 2024, 22:55
by EsDeeEm
Thanks Jan,
I've changed strategies: I'm using your Ceska Posta Plugin as a template to build a new one for SendCloud. I hope that's OK.
I've still got some trouble finding all the connections and I probably missed it, but I didn't find much info specifically for shipment handling. Digging my way through the core files I've figured out the different event triggers, which helped me loading the plugin.
The webhook integration for tracking feedback is next on my list, but this is not implemented in your original plugins. There is a separate configuration panel for tracking options in Phoca Cart, but that doesn't provide webhook capability inbound.
Do you have any suggestions or practical information I need to know to get it all up and running?
Re: Need help (urgently!!!) - PCS plugin
Posted: 17 Dec 2024, 21:53
by Jan
Hi, not sure if I correctly understand, what "integration for tracking feedback" means?
Jan
Re: Need help (urgently!!!) - PCS plugin
Posted: 17 Dec 2024, 22:32
by EsDeeEm
Hey Jan,
I mean active tracking information sent back to my server, encrypted and to a specific URL I need to provide. (source:
https://api.sendcloud.dev/docs/sendclou ... 2/webhooks)
Sendcloud is able to actively communicate updates in a parcel (such as updates in the delivery status) to your application using webhooks.
You should specify an JSON API endpoint in which Sendcloud will make requests to, whenever a change occurs. You can set this using the webhook_url field in your integration settings in Sendcloud.
To verify a request is coming from Sendcloud, Sendcloud is signing each request that we send to your endpoint using a HMAC signature (Hash-based Message Authentication Code) with SHA256 algorithm and the Secret Key or the Webhook Signature Key as secret, depending on your integration type.
For your store to validate that the webhook is coming from us, you should hash the message received from us using your secret and compare against the Sendcloud-Signature header received from us.
Re: Need help (urgently!!!) - PCS plugin
Posted: 19 Dec 2024, 01:32
by Jan
Hi, there is such feature for payment methods, where payment method returns some information to server about the payment. So e.g. the payment can be marked as confirmed. What exactly needs does the shipping method from the external server?
Jan