简体   繁体   English

定制的Magento运输模块

[英]Custom Magento shipping module

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. 我正在尝试为Itella SmartPOST和Post24创建一个运输模块,您不太可能听说过它们,因为它们仅存在于爱沙尼亚,芬兰以及其他地方。 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. 在这里,他们以英文http://www.smartpost.ee/automaatne-vaikepaki-andmete-saatmine简要概述了如何与服务器通信,我想对于有经验的开发人员来说应该足够了,但是我可以使用更多的指导方法,如果可以自己制作,我真的不想为运输模块付费。

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. 因此,我想我需要构建一些东西,以便在结帐时让客户选择他们希望包裹进入的包裹终端,然后将其与其他必填字段一起发送( http://eteenindus.smartpost.ee/data/ _tables.db.html#orders )发送给Itella,然后从中获取一些信息。 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. 他们的文档说他们可以接受JSON Post或XML post请求,这意味着您必须生成这些请求并从Magento发送它们。

I suggest looking into tutorials on creating API based shipment and payment extensions. 我建议您阅读有关创建基于API的货运和付款扩展的教程。

Here is a tutorial for an API based payment extension. 这是有关基于API的付款扩展的教程。 You can adapt the sending/receiving principles to your shipment extension: http://www.excellencemagentoblog.com/magento-create-custom-payment-method-api-based 您可以将发送/接收原则应用于您的货件扩展名: http : //www.excellencemagentoblog.com/magento-create-custom-payment-method-api-based

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM