shopgate / cart-integration-shopware6
Shopware 6 的 Shopgate 购物应用插件
Requires
- shopgate/cart-integration-sdk: 2.10.3
- shopware/core: ^6.5.2
- symfony/expression-language: ^6.3.0 | ^7.0.0
Requires (Dev)
- phpunit/phpunit: ^9.5.2
- dev-main
- 3.3.4
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.1
- 3.2.0
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.1
- 3.0.0
- v2.x-dev
- 2.10.2
- 2.10.1
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.6.0-beta.1
- 2.5.2-beta.2
- 2.5.1
- 2.5.0
- 2.4.0
- 2.3.1
- 2.3.0
- 2.2.0
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.0
- 2.0.0-beta.14
- 2.0.0-beta.13
- 2.0.0-beta.12
- 2.0.0-beta.11
- 2.0.0-beta.10
- 2.0.0-beta.9
- 2.0.0-beta.8
- 2.0.0-beta.7
- 2.0.0-beta.6
- 2.0.0-beta.5
- 2.0.0-beta.4
- 2.0.0-beta.3
- 2.0.0-beta.2
- v1.x-dev
- 1.9.0
- 1.8.8
- 1.8.7
- 1.8.6
- 1.8.5
- 1.8.4
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.5
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.13
- 0.0.11
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
This package is auto-updated.
Last update: 2024-09-20 08:10:42 UTC
README
安装
通过 Packagist 安装(推荐)
此插件可在 packagist.org
上找到。要安装,只需将 composer 包添加到 Shopware 的根 composer
cd [shopware6 root folder]
composer require shopgate/cart-integration-shopware6
之后,只需在 root/composer.json
中增加插件版本,然后运行 composer update
以获取最新版本。
文件夹安装
可以通过将插件文件夹复制到 custom/plugins
目录来手动安装。例如 custom/plugins/SgateShopgatePluginSW6
。然后您可以像其他插件一样安装并启用它。对于此安装方法,请确保插件文件夹中有一个 vendor
目录,因为我们有 composer 依赖项。您可以通过运行以下命令来执行此操作
cd [plugin folder] # this is because we do not want to install shopware core files composer remove shopware/core
Composer 符号链接(开发)
将插件放在 custom/plugins
文件夹中。现在您可以通过在根目录中运行此命令将其链接到 composer
cd custom/plugins git clone git@github.com:shopgate/cart-integration-shopware6.git cd ../.. composer require shopgate/cart-integration-shopware6
启用并激活
安装并激活模块
cd [shopware6 root folder]
php bin/console plugin:refresh
php bin/console plugin:install -a SgateShopgatePluginSW6
如果您喜欢,也可以通过 Shopware 管理面板安装和激活。
索引
安装或更新到 3.3.0+ 后需要完全重新索引才能使产品 -> 类别导出工作。可以通过管理员:Admin > 设置 > 系统 > 缓存 > 更新索引
来完成
也可以通过 CLI 完成
bin/console dal:refresh:index
也可以通过 API 完成,有关详细信息,请参阅 tests/Postman/indexer_check.collection.json
已知错误
没有对应的 SaleChannel 域与 SaleChannel 默认语言匹配
- 表明当为域设置默认语言时,但不存在具有该语言的域 URL。简而言之- 转到
SalesChannels
- 选择 Shopgate API 正在查询的 SaleChannel
- 检查
通用设置
默认语言(例如,英语) - 检查
域
列表,确认没有默认语言的域 URL(例如,英语)
- 转到
无法声明接口 XXX,因为该名称已被使用
- 在通过符号链接安装我们的插件后发生。这是因为我们的插件文件夹中有一个vendor
目录。您可以从我们的插件目录中删除vendor
目录 或者 不要通过符号链接安装。这是安装我们的插件的两种不同方式。ConstraintViolationException: 在执行 check_cart 或客户注册期间捕获了 1 个违规错误
。已知错误之一是当 Shopgate 应用不需要设置电话号码时,但 Shopware 需要。所以当check_cart
尝试创建地址时,会发生约束违规。- 导出价格太长(例如
"unit_amount":2.3999999999999999
) - 存在一个服务器设置可以帮助将价格缩小到 3 位小数,简而言之,尝试 php.ini 设置serialize_precision = -1
。有关详细信息,请参阅 stack。
配置
管理
导出
- Flysystem - 使用 Flysystem 编写 SDK 文件导出
电子邮件模板变量使用
用于创建订单电子邮件
{% set shopgateOrder = order.extensions.shopgateOrder|default(false) %} Selected shipping type: {% if shopgateOrder %} {{ shopgateOrder.getShippingMethodName() }} {% else %} {{ delivery.shippingMethod.translated.name }} {% endif %} Payment Type: {% if shopgateOrder %} {{ shopgateOrder.getPaymentMethodName() }} {% endif %}
设置 API
- 服务器 -
live
、pg
或custom
- api_url -
http://my.url.com
- product_types_to_export -
simple,variant
(逗号分隔列表)
自定义字段
这些值可以在Shopgate管理面板或脚本中设置,以传递给Shopware,并将绑定到实体。还可以将不存在的或现有的自定义字段传递给Shopware。如果一个实体(例如订单)存在自定义集,并且它定义了自定义字段,则将其映射。
客户
title
- 客户标题affiliate_code
campaign_code
account_type
-business
或private
vat_ids
- 提供一个 单个 税号,要设置此字段,则accountType
必须为business
客户地址
department
- 公司部门phone_number
- 电话号码可以通过customFields
传递,作为address->phone
的替代
订单
affiliate_code
campaign_code
customer_comment
- 来自客户的注释字符串