سؤال

I'm trying to make a shipping module for Itella SmartPOST and Post24, it's unlikely you've heard of them as they only exist in Estonia, Finland and maybe somewhere else. Here they give a short overview on how to communicate with their servers in English http://www.smartpost.ee/automaatne-vaikepaki-andmete-saatmine, I guess for a experienced developer it should be enough, but I could use more directions, I really don't want to pay money for the shipping module if I can make it myself.

I've read through couple of tutorials on how to make shipping modules, but none of them cover how to communicate with external sources.

So I guess I need to build something that at the checkout would give the costumer option to choose wich parcel terminal they want the package to come and then send that information with other mandatory fields(http://eteenindus.smartpost.ee/data/_tables.db.html#orders) to Itella and then get some info back from them. I hope I understood this correctly...

So how would I go about doing this? I pretty much understand how to make custom shipping methods, but the part of sending information between mine and their database gets confusing.

هل كانت مفيدة؟

المحلول

Their documentation says they can accept a JSON Post or an XML post request, which means you would have to generate these requests and send them from Magento.

I suggest looking into tutorials on creating API based shipment and payment extensions.

Here is a tutorial for an API based payment extension. You can adapt the sending/receiving principles to your shipment extension: http://www.excellencemagentoblog.com/magento-create-custom-payment-method-api-based

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top