Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation to zone-based configuration for payments and shippings #597

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 25 additions & 11 deletions Documentation/Administrator/Configuration/PaymentMethods/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Payment methods

The payment methods are defined via TypoScript for each shopping cart.
The standard template already includes a payment method (prepayment) as
shown below.
shown below. In case the payment method(s) for several countries shall
be configured, please also check the possibility to use a 'zone' based
configuration. This reduces the amount of configuration necessary.

With the definition `plugin.tx_cart.settings.allowedCountries` the output of
the selector in the shopping cart is defined. The options can also be
Expand Down Expand Up @@ -198,19 +200,28 @@ Zone configuration
plugin.tx_cart.payments.zones
-----------------------------

If no individual country configuration can be found, it is also possible to
work with zones in the TypoScript.
This saves a lot of configuration work if you want to deliver to many
countries.
The configuration of payment zones can be used to ease the configuration
of payments for multiple countries. Their usage saves a lot of configuration
work, if you want to deliver to many countries.
In case both country configuration as well as zone configuration are valid for
a dedicated country, the country configuration has precedence over the zone configuration.

.. NOTE::
* The system first searches for a suitable configuration in the list of country configurations.
* The list of zone configurations is then looked through. The first matching configuration is used.
* The country-based payment configuration coming with the extension can interfere with your zone configuration for payments.
Therefore, check if you need to remove the country-based configuration when using zones as shown below.

.. code-block:: typoscript
:caption: Can be set in e.g. EXT:sitepackage/Configuration/TypoScript/setup.typoscript

plugin.tx_cart {
payments {
// this removes any previous country based payment configuration
countries >
zones {
1 {
preset = 1
preset = 2
countries = de,at,ch
options {
1 {
Expand All @@ -219,7 +230,14 @@ countries.
taxClassId = 1
status = open
}
}
2 {
provider = PAYPAL
title = Paypal
extra = 0.50
taxClassId = 1
status = open
}
}
}
}
}
Expand All @@ -237,10 +255,6 @@ countries.

List of countries for which this configuration is valid.

.. NOTE::
* The system first searches for a suitable configuration in the list of country configurations.
* The list of zone configurations is then looked through. The first matching configuration is used.

Deactivate payment methods
==========================

Expand Down
89 changes: 70 additions & 19 deletions Documentation/Administrator/Configuration/ShippingMethods/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Shipping methods

The shipping methods are defined via TypoScript for each shopping cart.
The standard template already comes with a shipping method (standard)
as shown below.
as shown below. In case the shipping method(s) for several countries shall
be configured, please also check the possibility to use a 'zone' based
configuration. This reduces the amount of configuration necessary.

With the definition `plugin.tx_cart.settings.allowedCountries` the output of
the selector in the shopping cart is defined. The options can also be
Expand Down Expand Up @@ -210,32 +212,85 @@ Zone configuration
plugin.tx_cart.shippings.zones
------------------------------

If no individual country configuration can be found, it is also possible to
work with zones in the TypoScript.
This saves a lot of configuration work if you want to deliver to many
countries.
The configuration of shipping zones can be used to ease the configuration
of shippings for multiple countries. Their usage saves a lot of configuration
work, if you want to deliver to many countries.
In case both country configuration as well as zone configuration are valid for
a dedicated country, the country configuration has precedence over the zone configuration.

.. NOTE::
* The system first searches for a suitable configuration in the list of country configurations.
* The list of zone configurations is then looked through. The first matching configuration is used.
* The country-based shipping configuration coming with the extension can interfere with your zone configuration for shippings.
Therefore, check if you need to remove the country-based configuration when using zones as shown below.

.. code-block:: typoscript
:caption: Can be set in e.g. EXT:sitepackage/Configuration/TypoScript/setup.typoscript

plugin.tx_cart {
shippings {
// this removes any previous country based shipping configuration
countries >
zones {
1 {
preset = 1
countries = de,at,ch
options {
1 {
title = Standard
preset = 1
countries = de
options {
1 {
title = Shipment Germany
extra = by_price
extra {
1 {
value = 0.00
extra = 3.70
}
2 {
value = 100.00
extra = 0.00
}
}
taxClassId = 1
status = open
}
2 {
title = Collect at shop
extra = 0.00
taxClassId = 1
status = open
}
}
}
}
}
}
2 {
preset = 1
countries = at,ch
options {
1 {
title = International Shipment
extra = by_price
extra {
1 {
value = 0.00
extra = 5.90
}
2 {
value = 100.00
extra = 0.00
}
}
taxClassId = 1
status = open
}
2 {
title = Collect at shop
extra = 0.00
taxClassId = 1
status = open
}
}
}
}
}
}
}

|

.. confval:: shippings.zones.<n>
Expand All @@ -250,10 +305,6 @@ countries.

List of countries for which this configuration is valid.

.. NOTE::
* The system first searches for a suitable configuration in the list of country configurations.
* The list of zone configurations is then looked through. The first matching configuration is used.

Deactivate shipping methods
===========================

Expand Down
Loading