what3words/module-what3words-magento1
Composer 安装命令:
composer require what3words/module-what3words-magento1
包简介
What3Words Magento1 Integration
README 文档
README
What3Words Magento1 Integration
Installation
To install follow the instructions on https://developer.what3words.com/tools/e-commerce/magento1.
The Magento 1 Extension can be installed using Packagist or alternatively installed manually by downloading from Github and adding to your server via FTP or by performing a manual extension installation.
We recommend using Composer and Packagist to install the Extension to ensure that all dependencies are installed along with the Extension.
To add the what3words Magento 1 Extension to a store using Packagist, first connect to your server and start the command line interface.
From the CLI run the command 'composer require what3words/module-what3words-magento1' to install the files and dependencies required by the extension.
Next, run 'php bin/magento setup:upgrade' to compile the site to ensure it includes the new extension We then recommend running 'php bin/magento cache:clean' and 'php bin/magento cache:flush' to ensure the site’s cache is cleared.
Overview
The what3words Magento integration (developed by Gene Commerce http://gene.co.uk/) allows Magento merchants to add an option to their checkout that will let customers use a what3words address for shipping.
When enabled, the module adds a configurable and customisable what3words input field to both the billing and shipping address forms in the checkout. This lets customers save a what3words address to their address book to be easily reused in future orders.
The extension implements the official what3words jQuery plugin (https://github.com/what3words/jquery-plugin-w3w-autosuggest).
Configuration
Enable in the what3words section of the system config and add your API key,
To display on shipping labels, please update the following config setting:
Customers -> Customer Configuration -> Address Templates -> PDF to the following:
{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}| {{depend company}}{{var company}}|{{/depend}} {{if street1}}{{var street1}} {{/if}} {{depend street2}}{{var street2}}|{{/depend}} {{depend street3}}{{var street3}}|{{/depend}} {{depend street4}}{{var street4}}|{{/depend}} {{if city}}{{var city}},|{{/if}} {{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}| {{var country}}|{{if w3w}}{{var w3w}}, {{/if}}| {{depend telephone}}T: {{var telephone}}{{/depend}}| {{depend fax}}<br/>F: {{var fax}}{{/depend}}| {{depend vat_id}}<br/>VAT: {{var vat_id}}{{/depend}}|
Data flow
The system handles the 3 word address in the following steps:
- From the billing / shipping address save actions, an Observer (
What3Words_What3Words_Model_Observer) saves the 3 word address to thesales_quote_w3wtable.
See What3Words/What3Words/etc/config.xml for exact events being observed.
-
If the customer selects the 'Save in Address Book' option, the 3 word address is also recorded in the
customer_address_w3wtable and as well as being saved to the customer address attribute 'w3w'. -
The same observer class watches the
sales_order_place_afterevent and saves the 3 word address tosales_order_w3w, after retrieving this from thesales_quote_w3wtable.
Modification with custom checkouts
The
fields.js file appends the html scripts in
frontend/base/default/template/what3words/checkout
to the billing and shipping forms in the
initBillingField and initShippingField methods.
These can be adapted to work with whatever markup has been changed, by altering the jQuery selectors.
what3words/module-what3words-magento1 适用场景与选型建议
what3words/module-what3words-magento1 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 10 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 what3words/module-what3words-magento1 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 what3words/module-what3words-magento1 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-10-21