thelia/canada-post-module 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thelia/canada-post-module

Composer 安装命令:

composer require thelia/canada-post-module

包简介

README 文档

README

Delivery module for Canada Post

The module is compatible with Thelia 2.1 and greater. You can use this module if you shipped your parcel from Canada.
You should have an account on Canada Post and register to the Developper Program to get your API keys.

For now, the module is not fully complete and only the Rating web service is integrated. It allows you to display a list of possible Canada Post service that a customer can select if the destination is available. The shipping costs is automatically retrieve from the Canada Post API.

Installation

Manually

  • Copy the module into <thelia_root>/local/modules/ directory and be sure that the name of the module is CanadaPost.
  • Activate it in your thelia administration panel

Composer

Add it in your main thelia composer.json file

composer require thelia/canada-post-module:~1.0

Configuration

You need to configure the module. There is a dedicated page for the configuration that you can display from the main modules page in the back office.

You should register on the Canada Post website to get your credentials to access the Canada Post API : https://sso.epost.ca/sso/pfe/ui/registration

Once you have received yous parameters, you can fill up the configuration form. A form is available to test your configuration.

You should also configure the shipping zones that the module could handled. The link to this page is also on the modules page.

Finally, you have to get the list of the services available from Canada Post and select which one is available on your website. The page is accessible from the configuration page of the module. On the configuration page of the services, you have to first get the list of services from Canada Post. A button at the top right of the page will import this list. Once the list is imported, you can customize the title of the service and select if it will be available for the customer with the visible attribute.

Loop

canada-post-rate

This loop is used to get a list of all available services and rates for a specific destination.

Input arguments

Argument Description
country The country code. eg: fr, ca required
postal_code the postal code of the destination. It's required for Canada and USA
weight The weight in kg of the order. required

Output arguments

Variable Description
$NAME The name of the service
$CODE The code of the service
$PRICE Total cost of the shipment
$TAXES Taxes charged for this shipment
$TRANSIT_TIME The number of days from drop-off or pickup to 1st delivery attempt.
$DELIVERY_DATE The estimated date of delivery, starting from the expected mailing-date.

canada-post-service

This loop is used to get a list of all available services. It doesn't directly talk to the Canada Post web service but use the list imported in the back office.

Input arguments

Argument Description
id The id of the service
visible Visible service : on, off or *. default: on
code The code of the service
title The title of the service
order The order : id, id-reverse, visible, visible-reverse, code, code-reverse, title, title-reverse, chapo, chapo-reverse

Output arguments

Variable Description
$ID The service id
$VISIBLE The service visibility
$CODE The service code
$TITLE The service name
$CHAPO The service summary

canada-post-order

This loop is used to get the detail of the service used for an order.

Input arguments

Argument Description
id The id
address_id The id of the address. This can be used when the order is not placed (cart)
order_address_id The id of the order address. When the order is placed
service_id The id of the Canada Post service

Output arguments

Variable Description
$ID The id
$ADDRESS_ID The address id of the customer (cart)
$ORDER_ADDRESS_ID The order address id of the customer (order)
$SERVICE_ID The Canada Post service id

thelia/canada-post-module 适用场景与选型建议

thelia/canada-post-module 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 31 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 04 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 thelia/canada-post-module 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 thelia/canada-post-module 我们能提供哪些服务?
定制开发 / 二次开发

基于 thelia/canada-post-module 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 31
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 22
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 5
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2015-04-08