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.
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 VATgross
: Calculates gross prices from net prices and VAT
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