VibeFox Frenet for Adobe Commerce — Ajuda
Requirements
Magento: Magento Open Source or Adobe Commerce 2.4.6 to 2.4.9, on your own server or hosting, on premises or on Adobe Commerce on cloud infrastructure. The module does not work with Adobe Commerce as a Cloud Service (the SaaS edition), which does not accept PHP modules.
PHP: 8.1 to 8.4, with the cURL and JSON extensions.
Frenet account (for live quotes only): create a free account in the Frenet panel (painel.frenet.com.br), enable the carriers you use and copy your API token. If you only use fixed prices, you do not need a Frenet account.
Products: fill in the product weight for accurate prices. Magento products have no standard dimensions, so every item is sent to Frenet as 16 × 11 × 2 cm (the minimum Correios box). Products without a weight are quoted as 0.3 kg.
VibeFox license key: bought on vibefox.net. One key works on one domain.
Installation
The module is one ZIP file. It is a Composer package and can also be copied into app/code. Run the commands in the Magento root folder as the user that owns the Magento files.
1. With Composer: put the ZIP file into a folder that your project uses as a Composer "artifact" repository and run composer require vibefox/module-frenet-shipping. Without Composer: unpack the ZIP file into app/code/Vibefox/FrenetShipping/, so that registration.php is directly in that folder.
2. Run bin/magento module:enable Vibefox_FrenetShipping and bin/magento setup:upgrade. In production mode also run bin/magento setup:di:compile and bin/magento setup:static-content:deploy, then bin/magento cache:flush.
3. In the Admin go to Stores > Configuration > Sales > Delivery Methods and open VibeFox Frenet. Paste your VibeFox license key into License key in the license block, the first row of the group, and click Activate (see License key).
4. Paste the API token and enter the origin CEP. If the base currency of your store is not BRL, enter the BRL exchange rate. Optionally add fixed prices and a fallback cost. Set Enable Frenet to Yes and click Save Config.
The module adds the Frenet shipping method to Magento. Customers see it as Frenet - Shipping (method title and method name). It is off after installation (Enable Frenet = No). The module adds one table for the Frenet data of orders.
Configuration
All settings are in Stores > Configuration > Sales > Delivery Methods > VibeFox Frenet, in the standard Magento configuration form. Like other Magento settings, they can be changed for a website with the Scope switcher at the top of the page; Method title and Method name also for a store view. Remove data on uninstall is read from the Default Config only. Save Config saves the whole page and clears the cached Frenet quotes. Amounts and weights accept "9.99" and "9,99".
If a value is wrong, Magento shows an error and nothing on the page is saved: an empty Method title, longer than 64 characters or with one of the characters < > ; = # { }; an empty Method name or one longer than 64 characters; a Sort order that is not a whole number; a number field that does not contain a number of 0 or more; a BRL exchange rate of 0; a Minimum weight (kg) greater than the Maximum weight (kg).
While Enable Frenet is Yes, warnings after saving remind you of settings that stop live quotes: no API token (only fixed prices are used, or the method is hidden at checkout if there are no fixed prices either), no 8-digit origin CEP, a base currency other than BRL without an exchange rate, and an origin CEP that does not have 8 digits. The warnings are shown only while the method is enabled, because the Delivery Methods page is shared by all shipping methods.
General
Enable Frenet: shows or hides Frenet at checkout. Default: No.
Method title: the carrier name shown in the cart and at checkout. Default: Frenet. Required, at most 64 characters.
Method name: shown after the method title, as "Method title - Method name". Default: Shipping. Required, at most 64 characters.
Sort order: the position among the shipping methods at checkout. A whole number, negative numbers are allowed.
Frenet live quotes
Frenet compares the carriers enabled in your Frenet account and returns their prices for the cart. Live quotes are requested only for addresses in Brazil with a full 8-digit CEP.
API token: your Frenet API token from the Frenet panel. Leave it empty to use fixed prices only. Magento stores it encrypted and shows only a mask after saving. Leave the mask as it is to keep the saved token, type a new value to change it. To delete the saved token, clear the field and click Save Config. The token is sent only in a request header and never written to the log.
Origin CEP: the postal code (CEP) the parcels are shipped from, 8 digits, for example 01310-100. It is saved in the format 00000-000. Leave it empty to use the postcode of Stores > Configuration > Sales > Shipping Settings > Origin, if the origin country there is Brazil. A CEP without 8 digits is saved as typed, and the page shows Frenet: the origin CEP must have 8 digits. Live quotes are not requested until it is fixed.
Service to offer: Cheapest service (default) or Fastest service. Frenet returns several services, and the method shows one price. If two services cost the same, the faster one is chosen; if two are equally fast, the cheaper one. A service without a delivery time counts as the slowest. Its carrier, name and delivery time are saved with the order.
BRL exchange rate: Frenet quotes in Brazilian reais. If the base currency of your store is not BRL, enter how many units of the base currency 1 BRL is worth, for example 0.16. The quote and the declared order value are converted with it. It must be greater than 0. Without it live quotes are not used and the fixed prices apply. Not needed when your base currency is BRL.
Fixed prices
Used when Frenet returns no price (API down, CEP not served), no token is set, or the destination is outside Brazil.
Price per country and size: a table with the columns Country, Price, XS, S, M, L and XL, prices in the base currency of your store, tax excluded. Click Add country to add a row and Delete to remove one. The size columns depend on 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. An empty or 0 size price uses the Price column; an empty Price means no fixed rate for that size. A Price of 0 means free shipping for that country. * All other countries is used for every country without its own row. Rows without any price and values that are not numbers of 0 or more are removed when you save, without an error.
Fixed price applies: Per order (default) charges the price once. Per item (price × quantity) multiplies it by the number of items. This applies only to fixed prices and the fallback cost. Live Frenet prices are always per shipment.
Fallback cost: used when neither Frenet nor the table gives a price. Leave it empty to hide the method. 0 means free.
Conditions
Minimum weight (kg): hide the method below this cart weight. 0 means no limit.
Maximum weight (kg): hide the method above this cart weight. Default: 30. 0 means no limit, an empty field restores the default of 30 kg.
Minimum order amount: show the method only when the subtotal of the products that need shipping (after discounts, tax excluded, base currency) is at least this amount. Leave it empty to always show it.
Free shipping from: shipping is free when the subtotal (after discounts, before tax, in the base currency) is at least this amount. No request goes to Frenet. Leave it empty for no free shipping threshold.
Product weights are converted to kg from the weight unit of your store (Stores > Configuration > General > General > Locale Options > Weight Unit, lbs or kgs). The weight limits and the size columns use the actual cart weight (the sum of product weights). Magento products have no standard dimensions, so volumetric weight is not calculated by the module.
The module has no tax field. If your store taxes shipping, Magento adds tax to the Frenet price with the class in Stores > Configuration > Sales > Tax > Tax Classes > Tax Class for Shipping. Frenet prices are final carrier prices.
Availability
Ship to Applicable Countries: All Allowed Countries offers Frenet for every country your store allows, Specific Countries only for the countries below.
Ship to Specific Countries: offer Frenet only for these destination countries. Live quotes are requested for Brazil only; other countries use the fixed prices.
Advanced
Debug log: logs every rate calculation, quote request and response to var/log/vfd_frn_debug.log.php in the Magento folder. The file cannot be opened from the web. API errors are always logged, even when this is off. The token is never logged and the customer CEP is shortened. Turn it off when you are done.
Log: shows the size and the latest entries of the log. Click Clear log to empty it.
Remove data on uninstall: when Yes, uninstalling the module with its data deletes the Frenet settings and the log (see Uninstall). When No, they are kept for a re-install. The license key and the cached quotes are always removed. The Frenet quotes saved with orders are order history and are kept.
How it works at checkout
At the shipping step Magento asks the module for the Frenet price. Only products that need shipping count: virtual and downloadable products add no weight and are not included in the order amount. For a bundle product shipped separately, its items are counted. The module first checks the countries, the cart weight and Minimum order amount. If Free shipping from applies, the price is 0 and no request goes to Frenet. A Magento cart price rule with free shipping for the whole cart also makes the price 0.
For an address in Brazil with a full 8-digit CEP, the module sends Frenet the origin and destination CEP, every cart item (weight in kg, the standard 16 × 11 × 2 cm box, quantity, SKU and categories), the order value in BRL and the coupon code of the cart. No request is made while the CEP is incomplete. Frenet returns the services of your enabled carriers. Services with an error or without a price are skipped. The module picks the cheapest or the fastest service and converts the price to your base currency. Magento then shows it in the customer's currency and adds tax on shipping if your store charges it.
Each answer is cached for 1 hour for the same cart and address. A failed request, or a CEP that no enabled carrier serves, is remembered for 10 minutes. The API timeout is 10 seconds. In these cases the customer sees no error: the fixed price or the fallback cost is used, or the method is hidden if there is none. The reason is written to the log. For addresses outside Brazil only fixed prices are used.
The module calculates rates only. It does not create shipments, print labels, request pickups or track parcels. It shows one Frenet service per cart, not several, and has no pickup points or lockers. Frenet quotes within Brazil only; use the fixed prices for other countries.
Orders
When an order is placed with Frenet, on the storefront or with Create New Order in the Admin, the module saves the quote the customer was shown, without a new request to Frenet. On the admin order page (Sales > Orders > View, Information tab) the Frenet shipping block shows what to book in Frenet:
Carrier and Service: the Frenet carrier and service, for example a Correios or Jadlog service. Shown for live quotes.
Frenet service ID: the service code returned by Frenet. Shown for live quotes.
Delivery time (business days): the delivery time returned by Frenet. Shown for live quotes.
Frenet price (BRL): the Frenet price in Brazilian reais. Shown for live quotes.
Price source: Frenet live price, Fixed price, Fallback cost or Free shipping.
Calculated price (excl. tax): the shipping price in the base currency, tax excluded.
The block also works for older orders and when the module is switched off. This data is kept when the module is uninstalled, also with Remove data on uninstall.
License key
The module works with a VibeFox license key from vibefox.net. The license block License — VibeFox Frenet is the first row of the VibeFox Frenet group in Stores > Configuration > Sales > Delivery Methods, 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 store. Below them are the line Product: magento-shipping-frenet and the link Manage licenses and domains in your account, which opens your vibefox.net account. Only Admin users whose role allows the Delivery Methods configuration section can change the key. The texts of the block follow the Admin interface locale (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 store 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 default store view, also when the installation has several websites or stores. Removing the key from the store does not free its domain slot. Free the slot in your vibefox.net account.
Without an active key, the Frenet method is not shown to customers at checkout and no rate is calculated. The Magento storefront does not know that you are logged in to the Admin, so the method 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 the System Messages of the Admin, with the links Enter the license key and Dismiss, which hides it for 7 days. 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: once a day for the first 14 days after the key is entered, then once a week, by the Magento cron and while you work in the Admin. Uninstalling the module with its data always removes the license key and license status.
Troubleshooting
Frenet does not appear at checkout: check that the license is active and Enable Frenet is Yes for the website of the store. Check Ship to Applicable Countries and Ship to Specific Countries, the warnings after Save Config, the weight limits and Minimum order amount. Typical reasons: the customer has not entered a full 8-digit CEP yet and there are no fixed prices, or Frenet returned no service for the route and there is no fixed price or Fallback cost.
Live quotes do not appear: turn on Debug log, reload the checkout and look at the Log field in the Advanced section. It shows the reason: no origin CEP, no BRL exchange rate, an incomplete customer CEP, a weight or amount limit, or the messages of the skipped services.
The log says the API token was rejected (HTTP 401 or 403): copy the token again from the Frenet panel and paste it into API token.
The log says Frenet returned no services: enable at least one carrier in the Frenet panel.
My store's base currency is euros or dollars: Frenet answers in BRL. Enter the BRL exchange rate (how many units of the base currency 1 BRL is worth).
Tax is charged on top of the Frenet price: Frenet prices are final carrier prices. Do not tax shipping in Tax Class for Shipping if Magento must not add tax to them.
Rates look outdated after a change: click Save Config on the Delivery Methods page. This clears the cached Frenet quotes.
The settings page or the checkout looks unchanged after installing or updating: run bin/magento setup:upgrade and bin/magento cache:flush; in production mode also setup:di:compile and setup:static-content:deploy.
Uninstall
Deleting the module code alone removes nothing from the database: the license key and the settings stay. To remove the data, uninstall the module with the Magento command:
Installed with Composer: run bin/magento module:uninstall --remove-data Vibefox_FrenetShipping. It removes the data and the code.
Installed in app/code: run bin/magento module:uninstall --non-composer Vibefox_FrenetShipping to remove the data, then bin/magento module:disable Vibefox_FrenetShipping, delete the folder app/code/Vibefox/FrenetShipping and run bin/magento setup:upgrade.
The license key, the license status and the cached quotes are always removed. If Remove data on uninstall is Yes, the Frenet settings and the log are removed too. If it is No, the settings are kept for a re-install. The module does not delete the Frenet quotes saved with orders: they are order history.
Frenet is a trademark of its respective owner. This module is not affiliated with or endorsed by Frenet.
