Please note that this documentation is for the most recent version of this extension. It may not be relevant for older versions. Related documentation can be found in the documentation directory of the extension.
Automatic calculation of gross / net product prices
When creating or editing a product in the backend, prices (gross price using net and VAT
or net price using gross and VAT) are calculated automatically. Use the symfony command shop: computeProductPrices
to recalculate product prices.
Please check before calling the script whether your store is a b2b or a b2c store. You can find this setting in the TypoScript constants for your store under:
themes.configuration.extension.shop.basket.displayType = b2c
Arguments
The symfony command shop:computeProductPrices
is called using two arguments:
- pageUid the page ID where the product entries are stored.
- direction calculation path. The argument can take 2 possible values:
net
: Calculates net prices from gross prices and VAT. Choose this mode if your store is a b2b store.gross
: Calculates gross prices from net prices and VAT. Choose this mode if your store is a b2c store.
Call
The Symfony command can be called in 2 ways:
Call in TYPO3 scheduler:
- In the
Scheduler
backend module click onAdd Task
(the+
symbol) - In the
Class
selectbox select theExecute Console commands
class - Select
Single
in theType
selectbox - Select
shop:computeProductPrices
in theSchedulable Command
selectbox - Click on the
Save
button - Fill out the argument fields and save the scheduler task again
- Now you can execute the command as a task in the scheduler module
- In the
Call in the console:
./vendor/bin/typo3 shop:computeProductPrices <pageUid> <direction>
- Example:
./vendor/bin/typo3 shop:computeProductPrices 2 gross