This plugin is available on packagist.org
. To install simply add the composer package to the shopware's root composer:
cd [shopware6 root folder]
composer require shopgate/cart-integration-shopware6
Afterward just increment the plugin version inside root/composer.json
, and run composer update
to get the latest
version.
It can be installed manually by copying the plugin folder to custom/plugins
directory. Like
so custom/plugins/SgateShopgatePluginSW6
. Then you can install & enable like any other plugin. For this install method,
please make sure that there is a vendor
directory inside the plugin folder as we have composer dependencies. You could
do it yourself by running:
cd [plugin folder]
# this is because we do not want to install shopware core files
composer remove shopware/core
Place the plugin in the custom/plugins
folder. You can now link it to
composer by running this command in the root directory:
cd custom/plugins
git clone [email protected]:shopgate/cart-integration-shopware6.git
cd ../..
composer require shopgate/cart-integration-shopware6
Install and activate the module:
cd [shopware6 root folder]
php bin/console plugin:refresh
php bin/console plugin:install -a SgateShopgatePluginSW6
You may install and activate via the Shopware administration panel instead, if you prefer.
A full re-index is required after installation or update to 3.3.0+ for product->category export to work.
Can be done via Admin:
Admin > Settings > System > Cache & Indexes > Update Indexes
Can be done via CLI:
bin/console dal:refresh:index
Can also be done with the API as well, see tests/Postman/indexer_check.collection.json
for details
No SaleChannel domain exists corresponding to the SaleChannel default language
- indicates an issue when there is a default language set for a domain, but no domain URL exists that has that language. In short:- go to
SalesChannels
- select SaleChannel that is being queried by Shopgate API
- Check
General Settings
default language (e.g., English) - Check
Domains
list, see that there is no domain URL with default language (e.g., English)
- go to
Cannot declare interface XXX, because the name is already in use
- happens after installing of our plugin via symlink. This is because there is avendor
directory inside our plugin folder. Either removevendor
directory from our plugin directory or do not install via symlink. These are two different ways of installing our plugin.ConstraintViolationException: Caught 1 violation errors
during acheck_cart
or customerregistration
. One of the known errors is when the Shopgate App does not require the phone number to be set, but the Shopware does. So when thecheck_cart
attempts to create the address a constraint violation occurs.- Export prices are too long (e.g.
"unit_amount":2.3999999999999999
) - there is a server setting that should help narrow down prices to 3 decimals, in short try php.ini settingserialize_precision = -1
. Link to issue on stack.
- Flysystem - uses Flysystem to write SDK file export
- Type of writing for the indexer - performant selection will be ignored if deletion is not set to "always" because the performant writer cannot handle duplicate entries in the DB. Performant should be slightly faster than the safe one.
- Type of deletion for the indexer. Always means that category/product map is generated every time a product or category gets updated or a full index is ran. The "Full" type only runs when all indexers are being indexed. None just means it never deletes mappings. Only updates them & leaves mappings hanging. Can be problematic after a while as it will degrade export performance over time.
For create order emails:
{% 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 %}
- server -
live
,pg
orcustom
- api_url -
http://my.url.com
- product_types_to_export -
simple,variant
(a comma separated list)
These values can be set inside Shopgate admin panel or script to pass to Shopware & will bind to the Entities. One can also pass non-existing or existing customFields to Shopware. If a Custom Set exists for an entity (e.g. Order), and it has a customField defined, it will map.
title
- customer titleaffiliate_code
campaign_code
account_type
-business
orprivate
vat_ids
- provide a single VAT ID,accountType
must bebusiness
for this to be set
department
- department of a companyphone_number
- phone number can be passed viacustomFields
as an alternative toaddress->phone
affiliate_code
campaign_code
customer_comment
- a comment string from the customer