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

ACP-2128: Updated Vertex documentation #2430

Merged
merged 9 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Disconnect Vertex
description: Find out how you can disconnect Vertex from your Spryker shop
last_updated: Jan 10, 2024
template: howto-guide-template
---
Disconnecting Vertex permanently deletes all the existing Vertex tax rates.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Install Vertex
description: Find out how you can install Vertex in your Spryker shop
draft: true
last_updated: Sep 13, 2023
last_updated: Jan 10, 2024
template: howto-guide-template
related:
- title: Vertex
Expand Down Expand Up @@ -140,18 +140,22 @@ use Spryker\Zed\TaxApp\Communication\Plugin\Calculation\TaxAppCalculationPlugin;
// ...
```

{% info_block infoBox "Updating from previous version" %}
{% info_block infoBox "Updating from TaxApp module version <=0.2.3" %}

Please pay attention to the position of TaxAppCalculationPlugin in the list of plugins.
Please pay attention to the position of TaxAppCalculationPlugin in the list of plugins: it should be placed after `ItemDiscountAmountFullAggregatorPlugin` and before `PriceToPayAggregatorPlugin`.

{% endinfo_block %}

Update `src/Pyz/Zed/TaxApp/TaxAppDependencyProvider.php` as follows:
Create or update `src/Pyz/Zed/TaxApp/TaxAppDependencyProvider.php` as follows:

```php
// ...

use ;
use Spryker\Zed\Calculation\Communication\Plugin\Calculator\ItemTaxAmountFullAggregatorPlugin;
use Spryker\Zed\Calculation\Communication\Plugin\Calculator\PriceToPayAggregatorPlugin;
use Spryker\Zed\Tax\Communication\Plugin\Calculator\TaxAmountAfterCancellationCalculatorPlugin;
use Spryker\Zed\Tax\Communication\Plugin\Calculator\TaxAmountCalculatorPlugin;
use Spryker\Zed\Tax\Communication\Plugin\Calculator\TaxRateAverageAggregatorPlugin;

// ...

Expand Down Expand Up @@ -192,15 +196,16 @@ use ;
// ...
```

In general, `getFallback<Quote|Order>CalculationPlugins` methods should contain the tax calculation plugins and all required plugins which are replaced by TaxAppCalculationPlugin in `\Pyz\Zed\Calculation\CalculationDependencyProvider`.
In general, `getFallbackQuoteCalculationPlugins` and `getFallbackOrderCalculationPlugins` methods should contain the tax calculation plugins which are replaced by TaxAppCalculationPlugin in `\Pyz\Zed\Calculation\CalculationDependencyProvider`.
The code snipped above is an example fo such configuration based on Spryker OOTB tax calculation plugins stack. If you are using any other tax-related plugins consider moving it into `getFallbackQuoteCalculationPlugins` and `getFallbackOrderCalculationPlugins` methods correspondingly; otherwise they might get in conflict with TaxAppCalculationPlugin.
matweew marked this conversation as resolved.
Show resolved Hide resolved

{% info_block infoBox "Fallback behavior" %}

There are 3 different failure scenarios where TaxAppCalculationPlugin might need to use a fallback logic:

1. TaxApp is not connected: fallback plugins defined in `getFallback<Quote|Order>CalculationPlugins` will be used.
2. TaxApp is disabled: fallback plugins defined in `getFallback<Quote|Order>CalculationPlugins` will be used.
3. TaxApp is not responding or is responding with an error: tax value will be set to zero and the customer will be able to proceed with the checkout.
1. Vertex App is not connected: fallback plugins defined in `getFallback<Quote|Order>CalculationPlugins` will be used.
2. Vertex App is disabled: fallback plugins defined in `getFallback<Quote|Order>CalculationPlugins` will be used.
matweew marked this conversation as resolved.
Show resolved Hide resolved
3. Vertex App is not responding or is responding with an error: tax value will be set to zero and the customer will be able to proceed with the checkout.

{% endinfo_block %}

Expand Down Expand Up @@ -309,6 +314,16 @@ class OmsDependencyProvider extends SprykerOmsDependencyProvider

```

This configuration is required to make sure that the correct tax amount will be used during refund process.

{% info_block infoBox "OMS configuration requirement" %}

This functionality will only work if the OMS event is called `refund`.

{% endinfo_block %}



### 6. Optional: To send invoices to Vertex through OMS, configure your Payment OMS

Configure payment `config/Zed/oms/{your_payment_oms}.xml`as in the following example:
Expand Down
Loading