spryker / tax-app-vertex
Vertex应用程序的TaxApp扩展
0.1.0
2024-08-15 16:12 UTC
Requires
- php: >=8.0
- spryker/tax-app-extension: ^1.0.0
This package is auto-updated.
Last update: 2024-09-17 18:15:21 UTC
README
这是Spryker和ACP Vertex应用程序项目侧集成的示例。此代码可以用作起点或用于演示。
如果您想为特定产品等添加特定的Vertex代码,您必须添加路径为 {projectRootDir}/data/import/vertex_codes.json
的JSON文件,内容如下
{ "customerCodes": { "DE--1": "VC1", "DE--2": "VC2", "DE--3": "VC3" }, "productCodes": { "001_25904006": "VP1", "002_25904004": "VP2", "003_26138343": "VP3" }, "productOptionCodes": { "OP_1_year_warranty": "VP1", "OP_2_year_warranty": "VP2", "OP_3_year_warranty": "VP3", "OP_insurance": "VP4" }, "expenseCodes": { "TYPE|NAME|MERCHANT_REFERENCE": "VE", "TYPE1|NAME|MERCHANT_REFERENCE1": "VE1" }, "exemptionsCertificates": { "DE--1": "VES1", "DE--2": "VES2", "DE--3": "VES3" } }
在这种情况下,该文件中指定的值将覆盖包中的原始默认值。逻辑将以两种方式工作
- 如果您已提供自定义映射。例如,在customerCodes部分中指定了
"DE--1": "VC1"
(这意味着具有客户引用DE--1
的客户应具有vertex代码VC1
)。如果客户在购物车或订单中找到,它将填充此代码。如果没有找到,它将填充您提供的随机Vertex代码。 - 如果您未提供自定义映射。它将按相同方式工作,但将使用您可以在
Spryker/Zed/TaxAppVertex/Communication/VertexCodeMapper.php
中找到的内部映射。