Price by Country, Shop & Currency
Install, create rules, understand price computation, recalculate in bulk and automate with cron.
Price by Country, Shop & Currency applies a margin coefficient and psychological rounding per market, then materializes the result as native PrestaShop specific prices. This guide covers installation, rule creation, how the price is computed, bulk recalculation and cron automation.
Installation
The module is compatible with PrestaShop 8.0 to 9.x, in single-store as well as multistore.
- In the back office, go to Modules > Module Manager, click Upload a module and select the ZIP file.
- On install, the module creates its two tables, a DF Multi Price tab under Catalog, and automatically generates a cron token.
- Open the module configuration to set auto-apply, the batch size and to retrieve the cron URL.
Create a price rule
Go to Catalog > DF Multi Price, then click Add a rule. A rule targets a combination of dimensions and describes how to build the final price.
Targeting
- Shop: a specific shop or “All”. With “All”, base prices are read from the default shop.
- Country: the country whose VAT is used to compute the tax-included rounding.
- Currency: the currency in which the psychological rounding is applied.
- Category: restricts the rule to a category and its subcategories, or “Whole catalog”.
Calculation
- Price base: retail price (tax excl.) or cost price (products without a cost price are skipped in this mode).
- Margin coefficient: multiplier applied to the base. For example 1.20 for +20%. Use 1.00 to only apply the rounding.
- Rounding mode: nearest, always up, always down, or none.
- Psychological ending: x.90, x.95, x.99, x.50 or x.00.
- Round on tax-included price: recommended, because the customer sees the tax-included price. The rule country VAT is used.
- Price floor: minimum tax-included price in the rule currency. 0 means no minimum.
- Priority: the lowest values are processed first during a global recalculation.
How the final price is computed
Psychological rounding only makes sense on the amount displayed to the customer, that is the tax-included price. The engine therefore follows this sequence:
- Base price (tax excl.) multiplied by the margin coefficient.
- Conversion into the rule currency according to its exchange rate.
- Switch to tax-included by adding the rule country VAT.
- Rounding to the chosen ending according to the selected mode.
- Application of the optional price floor.
- Return to the tax-excluded price, then to the default currency, for storage.
Example: a base price of 69.99 € excl. tax, a 1.20 coefficient, a 19% VAT and an x.99 ending yield a displayed price of 99.99 € incl. tax. The price is stored tax-excluded in the default currency, but the storefront display respects the intended ending.
Generated prices are written as native PrestaShop specific prices. They are read by the core like any other specific price: no dynamic computation at display time, therefore no impact on front-office performance.
Bulk recalculation
After creating or editing a rule, apply it to the whole catalog.
- From the rules list, the Recalculate action processes a specific rule.
- The Recalculate all active rules button in the toolbar chains every rule, in priority order.
Processing runs in AJAX batches with a progress bar. Each pass shows the number of prices created, updated and skipped. The batch size (10 to 500 products) is set in the module configuration.
On a very large catalog, increase the batch size to reduce round-trips, or reduce it if your server limits per-request execution time.
Automate with cron
A cron controller automatically replays every active rule. The URL, protected by a token, is shown in the module configuration and looks like this:
https://yourshop.com/index.php?fc=module&module=dfmultiprice&controller=cron&token=YOUR_TOKEN
Schedule this URL with your host’s cron task, for example once a night. The controller returns a JSON summary per rule (total, created, updated, skipped). If the token leaks, regenerate it from the configuration: the old URL then stops working.
Auto-apply
When the option is enabled, each product creation or update triggers the application of the matching active rules to that product. Useful to keep prices up to date without a global recalculation, particularly during regular imports.
Deletion and uninstall
The module tracks every specific price it generates. As a result:
- Deleting a rule automatically removes all the specific prices it had created.
- Uninstalling the module purges all the prices it generated, leaving no residue.
The module never overwrites a manual specific price that does not share the same dimensions. However, if a specific price with identical dimensions already exists (same shop, country, currency, with no reduction or date range), it adopts it to avoid duplicates.
Troubleshooting
A product is not updated
Check that it is active on the rule shop, that it belongs to the targeted category, and — in “cost price” base — that it has a cost price filled in.
The displayed price does not have the right ending
Make sure the “Round on tax-included price” option is enabled and that the rule country matches the expected VAT. The ending is applied on the tax-included price, not the tax-excluded one.
The cron returns “Invalid token”
The URL token no longer matches the stored one. Get the up-to-date URL from the configuration, or regenerate the token.