VibeFox PostNord for PrestaShop — Help
Requirements
PrestaShop: 8.0 to 9.x.
PHP: 8.0 or later. The module refuses to install on older PHP versions.
PostNord API key (for the service point picker): create a free account on developer.postnord.com, add an application and copy its API key. Without a key the carriers still work, but customers cannot pick a service point.
PostNord agreement: to send parcels you need your usual PostNord customer agreement, for example MyPack Collect or MyPack Home.
VibeFox license key: bought on vibefox.net. One key works on one domain.
Installation
1. In the back office go to Modules > Module Manager and click Upload a module. Choose the module ZIP file.
2. When the upload finishes, click Configure, or find VibeFox PostNord in the module list later and click Configure.
3. Paste your VibeFox license key into License key in the license block at the top of the Configure page and click Activate (see License key).
4. Paste the PostNord API key, choose your Agreement country, fill in the Country prices (see Configuration) and click Save.
On install the module creates two carriers. PostNord delivers to a service point, with the delivery time text Delivery to a PostNord service point. It is switched on. PostNord Home delivery delivers to the address, with the text PostNord home delivery. It is switched off until you turn on Home delivery. Both carriers are assigned to the zones of Sweden, Denmark, Norway and Finland and to all customer groups. You can change zones, customer groups, delivery time, logo and size limits in Shipping > Carriers. Do not set prices there: the price always comes from the module.
Configuration
All settings are on the module page: Modules > Module Manager > VibeFox PostNord > Configure. Each section has its own Save button, which saves the whole page. Every save also clears the cached service point lists.
Above the settings the page warns when there is no API key yet, when there is no price yet, when a PostNord carrier was deleted, or when the shop weight unit is not known to the module. Product weights are then taken as kg. Use kg, g, lb or oz in International > Localization (Local units).
General
Enable/Disable: turns the service point carrier on or off. This is the same switch as the carrier status in Shipping > Carriers.
Name: the name of the service point carrier at checkout, for example "PostNord MyPack Collect". Default: PostNord. Required.
Home delivery: also offer PostNord home delivery. This is the second carrier, without a service point. Off by default.
Home delivery name: the name of the home delivery carrier at checkout, for example "PostNord MyPack Home". Default: PostNord Home delivery. Required.
Tax status: None means the prices below are final. Taxable: followed by a tax rule means PrestaShop adds the shipping tax of that rule on top of the prices. It applies to both carriers.
PostNord API (service point picker)
API key: the API key of your application on developer.postnord.com. It is sent to PostNord only from your server, never to the browser, and is never written to the log. After saving, the field stays empty and shows Saved - leave empty to keep it. Type a new value only to change it.
Remove the saved API key: tick it and click Save to delete the saved key.
Test mode: uses the PostNord test environment (atapi2.postnord.com). Only for keys issued for the test environment.
Agreement country: the country of your PostNord customer agreement: Sweden, Denmark, Norway or Finland. It decides which service points are offered. Same as the delivery country (default) uses the customer's country.
Prices
The section title shows your shop default currency. Prices are in that currency, tax excluded, and the same for both carriers. PostNord has no public price API, so you set your own prices, typically your PostNord agreement prices. The order is: free shipping threshold, then the country table, then the fallback cost.
Calculation type: Per order charges the price once. Per item (price x number of items) multiplies it by the number of items in the cart.
Country prices: a price by destination country and cart weight. Click Add country to add a row and the trash icon to remove one. Each row has a Price and weight columns: XS up to 1 kg, S up to 2 kg, M up to 3 kg, L up to 5 kg and XL above 5 kg. A weight column with 0 uses the Price column, and a Price of 0 means free shipping. Country * All other countries covers every country without its own row. Decimals with a comma or a dot (9,99 or 9.99). A new row starts as * All other countries with all prices at 0. Choose the country and enter the prices before you save, or remove the row. An empty cell is saved as 0. A cell that is not a number is saved as 0, with a message.
Fallback cost: used when the country table has no row for the destination and no * row. Leave it empty to hide the carriers for such countries.
Free shipping from: the cart subtotal (products that need shipping, after discounts, excluding tax) from which PostNord is free. It is checked before the country table, so it also applies to a country without a price row. Leave it empty to never offer free shipping.
Availability
Min weight (kg): hide the carriers when the cart weighs less. Product weights are converted from your shop weight unit. 0 means no limit.
Max weight (kg): hide the carriers when the cart weighs more. Default: 30. 0 means no limit. Check the weight limit of your PostNord service: parcel lockers accept less than service points. A Min weight (kg) greater than Max weight (kg) is refused with an error, and nothing is saved.
Minimum subtotal: show the carriers only if the cart subtotal (products that need shipping, after discounts, excluding tax) is at least this amount. Leave it empty to always show them.
Ignore shipping zones: when on, PostNord is offered for the countries below even where the zones of its carriers do not contain them. The carriers are linked to every active zone, and a zone you create later is linked at once. When you switch it off again, the carriers get back the zones they had before. When off, the carriers are offered only in their own zones.
Countries (Ignore shipping zones): the destination countries for that mode. Leave it empty to allow all countries. This field is used only when Ignore shipping zones is on.
Amounts and weights accept a comma or a dot. A value that is not a number of 0 or more is not saved, with a message.
Advanced
Debug log: writes rate calculations and API calls to logs/vfd_ptnd_debug.log.php in the module folder. The file cannot be opened from the web. API errors are always logged. The API key is never logged. Turn the log off when you are done.
Log: shows the size and the latest entries of the debug log. Click Clear log to empty it.
Remove data on uninstall: when on, uninstalling the module deletes the PostNord settings and carriers. When off, uninstalling only switches the carriers off. Service points saved in orders are always kept.
How it works at checkout
At the shipping step PrestaShop asks the module for the price of each PostNord carrier. Only physical products count: virtual products add no weight and are not included in the subtotal. The module checks the cart weight and the minimum subtotal. If free shipping applies, the price is 0. Otherwise the price comes from the country table, then from the fallback cost. If there is no price, the carrier is hidden. The price is calculated in your default currency and then shown in the customer's cart currency.
For the service point carrier and a delivery address in Sweden, Denmark, Norway or Finland, your server asks the PostNord Business Location API for the 10 service points nearest to the delivery postcode. It sends the delivery country and postcode and the agreement country. The API timeout is 10 seconds. Lists are cached for 6 hours per postcode, and "no points" answers for 1 hour. API errors are cached for 5 minutes, so a PostNord outage does not slow down every checkout update. The delivery step never waits for PostNord: when the list is not cached yet, it is loaded after the customer selects the carrier.
For other destinations the carriers can still be offered with your prices, without a picker. The home delivery carrier never shows a picker.
If you edit a carrier in Shipping > Carriers after it has orders, PrestaShop saves it as a new carrier version. The module follows the new version automatically.
The module does not request live PostNord prices and does not create shipping labels, book shipments (EDI), provide tracking numbers or send tracking e-mails. There is no map view. Use PostNord Portal, Skicka Direkt Business or a label tool for shipments; the saved service point ID is what those tools need.
Pickup points
When the customer selects the service point carrier, a PostNord service point list appears under it with the nearest points, grouped by city with distance. Before a postcode is entered, the customer sees "Enter your postcode to choose a PostNord service point." The choice is saved with the cart and survives updates of the delivery step.
When the list is loaded, a point is required. Without one, Continue stops with "Please select a PostNord service point." The chosen point is checked against PostNord's list for the delivery address on the server. A point chosen for another postcode is not used.
The picker never blocks a sale. If the list cannot be loaded (no API key yet, PostNord API down, no points near the postcode), the customer sees a note and can still place the order. PostNord then delivers to the service point nearest to the address.
Back office order page: a PostNord service point block with the name, address and Service point ID. If no point was chosen, it says "not selected - PostNord delivers to the service point nearest to the shipping address".
Order confirmation and order details of the customer: PostNord service point: with the name and address.
Order e-mails: the order confirmation to the customer and the new order alert to the shop show the point name, address and ID next to the carrier name. The shop alert also shows "not selected" when there is no point.
License key
The module works with a VibeFox license key from vibefox.net. The license block License — VibeFox PostNord is the first block on Modules > Module Manager > VibeFox PostNord > Configure, above the settings. Paste the key into License key and click Activate. After that the block shows the key masked, the status (for example the date the license is active until and your domain) and the buttons Check now to check the status again, Change key to enter another key and Remove key to remove the key from this shop. Below them are the line Product: presta-shipping-postnord and the link Manage licenses and domains in your account, which opens your vibefox.net account. Only employees with the Configure permission for the module can change the key. The texts of the block follow the back office language (English and Russian are included).
If the key is not accepted, the block says why, for example Key not found, This key belongs to another product, Domain limit reached or License expired on a date. After the shop address changes, or after you free a domain slot in your account, click Check now. If the license server cannot be reached, the module keeps working on the last known status.
One key works on one domain: the domain of the main shop, also in a multistore setup. Removing the key from the shop does not free its domain slot. Free the slot in your vibefox.net account.
Without an active key, the PostNord carriers are not shown to customers at checkout and no shipping price is calculated. The PrestaShop storefront does not know that you are logged in to the back office, so the carriers are hidden for you too: you can set up the module before you buy a key, but not test it at checkout. A reminder appears in Modules > Module Manager on the Alerts tab. Existing orders are not affected.
When a license expires, the module keeps working, but updates and support need a renewal. The status is checked again automatically while you work in the back office: once a day for the first 14 days after the key is entered, then once a week. No cron job is needed. Uninstalling the module always removes the license key and license status. Reset of this module does not delete data, so the key and the status are kept.
Troubleshooting
PostNord does not appear at checkout: check that the license is active and Enable/Disable (or Home delivery) is on. In Shipping > Carriers check that the carrier covers the zone of the customer's country and the customer's group, or turn on Ignore shipping zones. Check that a price is set for the country (country row, * row or Fallback cost), the weight limits and Minimum subtotal. Products can also be limited to certain carriers in the product page.
The picker says service points cannot be loaded: check the API key and the Test mode setting. A production key does not work against the test environment, and the other way round. Turn on Debug log, reload the checkout and look at the Log field on the module page. The order can still be placed; PostNord then delivers to the nearest service point.
Unexpected service points: check Agreement country. It decides which service points are offered.
Shipping is free by mistake: check Country prices for rows with a Price of 0, especially a * row added with Add country and left unfilled, and check Free shipping from.
Service points look outdated after a change: click Save on the module page. This clears the cached lists.
The page says a PostNord carrier was not found: the carrier was deleted in Shipping > Carriers. Reset the module in Modules > Module Manager to create it again.
Uninstall
Go to Modules > Module Manager, open the menu next to VibeFox PostNord and choose Uninstall. The license key and the license status are always removed. Disabling the module only clears the cached service point lists. On uninstall the cached lists are always removed. If Remove data on uninstall is on, the carriers are deleted (orders keep their history) and the settings and the log are removed. If it is off, the carriers are only switched off and all settings are kept. Installing the module again gives the saved carriers back the status they had. Service points saved in orders are always kept.
PostNord is a trademark of its respective owner. This module is not affiliated with or endorsed by PostNord.
