VibeFox Chilexpress for PrestaShop — Help
Requirements
PrestaShop: 8.0 to 9.x.
PHP: 8.0 or later, with the cURL extension for live rates. The module refuses to install on older PHP versions.
Chilexpress API keys (for live rates only): create an account on the Chilexpress developer portal (developers.wschilexpress.com) and subscribe to two products: Rating (Cotizador) and Coverage (Coberturas / Georreferencia). Each product has its own subscription key. Test keys work only with the test environment; production keys are issued to Chilexpress business customers with a customer contract. You also need the Chilexpress county code of the comuna you ship from, for example STGO. If you only use fixed prices, you do not need API keys.
Chilean regions (for live rates only): live rates need the region of the delivery address. PrestaShop has no Chilean regions by default; the module can add them for you (see Chilean regions below). The country Chile must exist in the shop.
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 Chilexpress 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. Fill in the Country prices table. For live rates, enter both subscription keys, your origin county code and, if the shop currency is not CLP, the CLP exchange rate, click Add Chilean regions if the page asks for it, then choose the rate source (see Configuration) and click Save.
On install the module creates the Chilexpress carrier with the delivery time text Chilexpress courier. The carrier is linked to the zone of Chile 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. To offer Chilexpress in other zones, add them to the carrier there, or turn on Ignore shipping zones.
Configuration
All settings are on the module page: Modules > Module Manager > VibeFox Chilexpress > Configure. Each section has its own Save button, which saves the whole page. Every save also clears the cached Chilexpress rates and comuna lists. Changes need the "configure" permission for the module; without it the page shows You do not have permission to configure this module.
The page lists problems at the top: API rates are selected but a key, the origin county code or the CLP exchange rate is missing; the price table has no row for Chile or the default; the shop has no Chilean regions or no region field in the Chilean address form; the shop weight or dimension unit is not known to the module (it is then read as kg or cm; set it in International > Localization, Local units); the carrier was deleted. Numbers can be typed with a point or a comma, as in your back office language. An invalid or negative number, a CLP exchange rate of 0, a Min weight (kg) above Max weight (kg) or a Name longer than 64 characters is an error, and nothing is saved until you correct it.
General
Enable/Disable: turns Chilexpress shipping on or off. This is the same switch as the carrier status in Shipping > Carriers.
Name: the shipping method name shown to the customer at checkout. It is the carrier name. Default: Chilexpress. Required, up to 64 characters.
Tax: the tax rule of the carrier, or No tax (the default for a new carrier). Chilexpress API rates are used exactly as quoted. Choose No tax if the quote already includes IVA and your shop would add tax on top.
Rates
Rate source: where the price comes from.
Live rates are available for destinations in Chile only. Other countries always use the fixed prices.
Country prices: a table of destination countries with a Price column and optional prices by parcel size in your shop default currency, tax excluded. The size comes from the cart weight: XS up to 1 kg, S up to 2 kg, M up to 3 kg, L up to 5 kg, XL above 5 kg. A size left at 0 uses Price. Click Add country to add a row and the trash icon to remove one. The row * Default applies to countries without their own row. A country without a row (and without * Default) gets no fixed price, so the carrier is hidden there. A row whose price and size price are both 0 gives free shipping. An empty table is shown with one row for Chile at 0 and the last row cannot be removed, only reset to 0, so enter real prices before you save the page. A repeated country or an invalid price is corrected (the duplicate is ignored, the price set to 0), and a warning lists the corrections.
Calculation type: Per order charges the fixed price once. Per item (fixed price x number of items) multiplies it by the number of items in the cart. A Chilexpress API rate is always quoted for the whole parcel.
Chilexpress API (live rates)
The section starts with links to the developer portal and the Rating and Coverage subscription pages.
Test environment: uses the Chilexpress test environment (qaservices.wschilexpress.com). Use it with test keys and turn it off on a live shop.
Rating API key: the subscription key of the Rating (Cotizador) product.
Coverage API key: the subscription key of the Coverage (Coberturas / Georreferencia) product. It is used to find the Chilexpress county code of the customer's comuna (the City field of the address, together with its region).
After saving, a key field stays empty and shows Saved — leave empty to keep it. Type a new value only to change it. The key is saved as typed, only spaces around it are removed.
Remove the saved Rating API key and Remove the saved Coverage API key: shown only when a key is saved. Turn it on and click Save to delete the key.
Origin county code: the Chilexpress county (comuna) code you ship from, 2–5 letters, for example STGO (Santiago Centro), PROV (Providencia) or VALP (Valparaíso). It is empty after install. A value that is not a county code is rejected with an error.
Service: the Chilexpress service used for the rate. If it is not offered for the destination, the cheapest offered service is used.
CLP exchange rate: Chilexpress quotes in Chilean pesos. Needed only if your shop default currency is not CLP: the price of 1 CLP in that currency, for example 0.001. Without it API rates are not used. If the shop currency is CLP, leave it empty. The value must be greater than 0.
Chilean regions: the comunas of Chile are looked up per region, so live rates need the region of the address. If the shop has no Chilean regions, the field shows the button Add Chilean regions. It adds the 16 regions as states of Chile (ISO codes RM, VS…), turns on "Contains states" for Chile and adds the region field to the Chilean address form. Regions that already exist (by code or name) are not added twice. When everything is in place, the field shows Chilean addresses have a region with the number of regions.
Availability
Min weight (kg): the minimum cart weight for the carrier to appear. 0 means no limit.
Max weight (kg): the carrier is hidden above this cart weight. Default: 25. 0 means no limit; an empty field means 25 kg. Min weight (kg) cannot be greater than this value.
Minimum subtotal: show the carrier only when the cart subtotal (products that need shipping, after discounts, tax excluded) is at least this amount. Leave it empty to always show it.
Ignore shipping zones: offer the carrier for the countries below even if their zone is not linked to it: the carrier is linked to all zones, and zones created later are linked too. When you switch it off, the carrier gets its previous zones back.
Countries: the destination countries for that mode, chosen from the active countries of the shop. Leave it empty to allow all countries. This field is used only when Ignore shipping zones is on.
Free shipping
Free shipping: turns on the free shipping threshold.
Free shipping from: the cart subtotal (products that need shipping, after discounts, tax excluded) from which shipping is free. Used only when Free shipping is on. No API request is made in that case.
Advanced
Debug log: writes API requests and rate calculations to logs/vfd_chx_debug.log.php in the module folder. The file cannot be opened from the web. API errors are always logged, even when this option is off. API keys and customer addresses are never logged.
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 all module settings, the carrier, cached rates, logs and the services saved with orders. When off, everything is kept for a re-install. Orders themselves are always kept.
How it works at checkout
At the shipping step PrestaShop asks the module for the Chilexpress price. Only products that need shipping count: virtual products add no weight and are not included in the subtotal. The subtotal is taken after cart rules (vouchers), tax excluded, in your shop default currency. The module first checks the conditions: allowed countries (with Ignore shipping zones), cart weight and minimum subtotal. If free shipping applies, the price is 0 and no request goes to Chilexpress.
For an address in Chile and an API rate source, the module takes the region of the address and the comuna from the City field and looks up the Chilexpress county code in the comuna list of that region (Coverage API). Accents, spaces and spelling variants are ignored, so Ñuñoa and Nunoa match, and Santiago matches Santiago Centro. A county code typed in the City field is accepted too. Then the module sends the Rating API the origin and destination county codes, the cart weight (at least 0.1 kg), the parcel dimensions (length and width of the largest product, heights stacked) and the cart subtotal in CLP as the declared value. Chilexpress returns its services; the module uses the chosen service or the cheapest one and converts the peso amount to your shop default currency. The price is rounded to the decimals of that currency and then shown in the customer's cart currency.
Rates are cached for 1 hour and comuna lists for 7 days. A failed request is remembered for 5 minutes, so a slow or unavailable API does not slow down every checkout refresh. The API timeout is 10 seconds. If Chilexpress returns an error, no service with a price, or the comuna or region is unknown, the customer sees no error. The carrier is hidden in the API-only mode, or the fixed price is used. The reason is written to the debug log.
If you edit the 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 calculates rates only. It does not create shipments or transport orders (OT), print labels, book pickups or track parcels; book the shipment in your Chilexpress account. Customers cannot choose a Chilexpress office, and there is no comuna selector: the customer types the comuna in the standard City field. International shipments use the fixed prices.
Orders
When an order is placed with the Chilexpress carrier, the module saves how its price was calculated. The order page in the back office shows a Chilexpress block with Chilexpress service (for a live rate, the service Chilexpress quoted, for example Express) and Price source: Live rate (Chilexpress Rating API), Fixed price or Free shipping.
License key
The module works with a VibeFox license key from vibefox.net. The license block License — VibeFox Chilexpress is the first block on Modules > Module Manager > VibeFox Chilexpress > 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-chilexpress 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 Chilexpress carrier is not shown to customers at checkout and no rate is calculated. The PrestaShop storefront does not know that you are logged in to the back office, so the carrier is 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 or resetting the module always removes the license key and license status.
Troubleshooting
Chilexpress does not appear at checkout: check that the license is active and Enable/Disable is on. In Shipping > Carriers check that the carrier covers the zone of the customer's country and the customer's group (or Ignore shipping zones is on and the country is in Countries). Check the weight limits and Minimum subtotal. With fixed prices, check that the country or * Default has a row. Products can also be limited to certain carriers in the product page.
Shipping in Chile is free although it should not be: the Country prices row for Chile (or * Default) has 0 in Price and in the size columns. Enter the prices and click Save.
The live rate is not shown, the fixed price is used instead: first check the warnings at the top of the module page. Otherwise turn on Debug log, reload the checkout and look at the Log field on the module page. Typical causes: the address has no region or the region field is missing (use Add Chilean regions), a comuna that Chilexpress does not recognise (check the City field and the region), a key for the wrong product or environment, or a destination without Chilexpress coverage.
HTTP 401 or 403 in the log: the subscription key is wrong, inactive, or for another product or environment. Test keys work only with Test environment on.
API rates are not used in a shop with another currency: enter the CLP exchange rate.
Are API rates with or without IVA? They are used exactly as Chilexpress quotes them. If your shop adds tax to shipping and the quote already includes IVA, set Tax to No tax.
Rates look outdated after a change: click Save on the module page. This clears the cached rates and comuna lists.
The page says the Chilexpress carrier was not found: the carrier was deleted in Shipping > Carriers. Reset the module in Modules > Module Manager to create it again.
The page says The country Chile does not exist in this shop: add or enable Chile in International > Locations > Countries, then use Add Chilean regions.
Uninstall
Go to Modules > Module Manager, open the menu next to VibeFox Chilexpress and choose Uninstall. The license key and license status are always removed. The cached rates and comuna lists are always removed. If Remove data on uninstall is on, the carrier is deleted (orders keep their history) and the settings, the log and the services saved with orders are removed. If it is off, the carrier is only disabled and all settings are kept. Installing the module again restores the saved carrier with its previous status. Chilean regions added with Add Chilean regions stay in the shop.
Chilexpress is a trademark of its respective owner. This module is not affiliated with or endorsed by Chilexpress.
