Back

VibeFox Estafeta for OpenCart — Help

Requirements

OpenCart: 3.0.x (tested on 3.0.5.0) or 4.0.2 and later (tested on 4.1.0.3).

PHP: 8.0 or later with the cURL extension.

DrEnvio account (for live rates only): live Estafeta rates come from DrEnvio, an Estafeta partner in Mexico. Create an account at drenvio.com, enable Estafeta, set up your pickup address there and copy the API key from your DrEnvio panel. It is the same key the official DrEnvio plugin uses. If you only use your own prices, you do not need a DrEnvio account.

Products: products need a weight for live rates.

VibeFox license key: bought on vibefox.net. One key works on one domain.

Installation

The download is one zip file with the packages for both OpenCart versions. Unpack it on your computer. It contains README.txt, the OpenCart 3 package vfd_estafeta-oc3-(version).ocmod.zip and the OpenCart 4 package vfd_estafeta.ocmod.zip. Install only the package for your OpenCart version. The license key is the same for both versions.

OpenCart 3

1. In the admin go to Extensions > Installer, click Upload and choose the file vfd_estafeta-oc3-(version).ocmod.zip. The extension adds no OCMOD modifications, so you do not need to refresh Extensions > Modifications. Instead of the Installer, you can copy the contents of the upload folder of this package into the root folder of your store.

2. Go to Extensions > Extensions and choose the extension type Shipping. Find VibeFox Estafeta and click Install (the green + button).

3. Click Edit (the pencil button) to open the settings page.

4. Paste your VibeFox license key into License key in the license block at the top of the Edit page and click Activate (see License key).

5. Enter the DrEnvio API key and, optionally, the Origin postcode. If your default currency is not MXN, enter the MXN exchange rate. Set a country price for MX or a Fallback cost if the method should stay visible when DrEnvio has no rate. Turn on Enable/Disable and click Save.

OpenCart 4

1. In the admin go to Extensions > Installer, click Upload and choose the file vfd_estafeta.ocmod.zip. Do not rename the file: OpenCart 4 takes the extension code from the file name, and a renamed package does not work.

2. The package appears in the list of installed extensions on the same page. Click Install (the green + button) next to it.

3. Go to Extensions > Extensions and choose the extension type Shipping. Find VibeFox Estafeta, click Install (the green + button), then Edit (the pencil button).

4. Enter the license key and the settings as in steps 4 and 5 for OpenCart 3. The settings page and its fields are the same in both versions.

After install the method is off until you turn on Enable/Disable and save. If you install the extension again after an uninstall, the Estafeta settings you kept are used again.

Configuration

All settings are on the extension page: Extensions > Extensions > Shipping > VibeFox Estafeta > Edit. The sections are listed on the left. One Save button at the bottom saves the whole page without reloading it. Every save also clears the cached DrEnvio rates. Only admin users with the modify permission for this extension can save the settings.

At the top of the page the extension shows warnings: no DrEnvio API key, a default currency other than MXN without an exchange rate, no country price for MX and no fallback cost (the method is then hidden when there is no live rate, or never shown without an API key), or no weight class with the unit kg (product weights are then converted by the unit name of their weight class, and unknown units are taken as kg; add a kg class in System > Localisation > Weight Classes). Number fields accept a decimal point or comma. When you save, a wrong value is reported and cleared or reset as described at each field, the form shows the value that was saved, and the other settings are still saved (The other settings were saved.).

General

The method is offered for the geo zone below (or every address), or for the countries of Availability without shipping zones.

Enable/Disable: turns Estafeta shipping on or off. Default: off.

Name: the shipping method name shown to the customer at checkout. Default: Estafeta. Required: 1 to 64 characters, without < > ; = # { }. An invalid name is reported and the previous name is kept.

Tax class: the tax class added on top of the shipping cost, or No tax (default). Whether DrEnvio prices include IVA depends on your DrEnvio account. If they already include IVA, choose No tax.

Geo zone: offer Estafeta only for addresses in this geo zone, for example a "Mexico" geo zone. All zones (default) means no limit. Geo zones are managed in System > Localisation > Geo Zones. Not used when Ignore shipping zones is on.

Sort order: the position of Estafeta among the shipping methods at checkout. A whole number.

Live rates (DrEnvio API)

The section explains where to get the key. The cheapest Estafeta service for the address is offered. Without a key the prices of Prices without a live rate are used.

DrEnvio API key: the API key from your DrEnvio panel. 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: shown only while a key is saved. Turn it on and save to delete the key. Then only Country prices and the Fallback cost are used. A key typed in the field above replaces the saved one instead.

Origin country: the two-letter country code of the pickup address. Default: MX. Sent only together with the origin postcode. An invalid code is reported and reset to MX.

Origin postcode: the 5-digit postcode of the pickup address. Leave it empty to use the origin address saved in your DrEnvio account. A postcode that does not have 5 digits is cleared and reported when you save.

MXN exchange rate: DrEnvio quotes in Mexican pesos. Only needed if your default currency is not MXN: the value of 1 MXN in your default currency, for example 0.05. Without it live rates are not used. It must be greater than 0. If the store currency is MXN, leave it empty.

Prices without a live rate

Used when there is no API key or DrEnvio returns no Estafeta rate (API down, unknown postcode, no postcode entered yet). Prices are in your store default currency, tax excluded.

Country prices: one destination country per line in the format CC:PRICE, for example MX:150. Use a decimal point or comma, no thousands separator. Parts in another format are ignored and reported when you save.

Fallback cost: the price when there is no live rate and no country price. Leave it empty to hide the method; 0 means free shipping.

Calculation type: Per order (default) charges the price once. Per item (price x number of items) multiplies it by the number of items in the cart. This applies to Country prices and Fallback cost. A live DrEnvio rate is always the price of the whole parcel.

Conditions

Free shipping from: shipping is free when the subtotal of the products that need shipping (after the coupon, before tax) reaches this amount. No DrEnvio request is made then. Leave it empty to never give free shipping.

Minimum subtotal: show the method only when the same subtotal is at least this amount. Leave it empty to always show it.

Min weight (kg): the minimum cart weight for the method to appear. 0 means no limit (default).

Max weight (kg): the maximum cart weight. The method is hidden if it is exceeded. Default: 30. 0 means no limit.

If Min weight is greater than Max weight, saving shows an error and both weights stay unchanged. Product weights are converted to kg from the weight class of each product.

Availability without shipping zones

Ignore shipping zones: offer the method for the countries below without checking the geo zone. Default: off.

Countries: the destination countries for that mode. Leave it empty for all countries. Used only when Ignore shipping zones is on.

Advanced

Debug log: writes API requests and rate calculations to storage/logs/vfd_est_debug.log.php (on OpenCart 4 system/storage/logs/vfd_est_debug.log.php). The file cannot be read from the web. API errors are always logged, even when the log is off. The API key and customer addresses are never logged. Turn the log off when you are done. When the file reaches 5 MB, it is moved to vfd_est_debug.old.log.php and a new log is started.

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 extension deletes all its settings and the log. When off (default), everything is kept for a re-install. The saved Estafeta services of orders are always kept.

Import / Export

Export: click Download JSON to save the settings as a JSON file. The API key is not exported.

Import: paste previously exported JSON and click Import to restore the settings, for example on another store. The values are checked like a normal save. The saved API key is kept.

How it works at checkout

When OpenCart shows the shipping methods, it asks the extension for the Estafeta price. If a Geo zone is set (and Ignore shipping zones is off) and the address is outside it, Estafeta is not offered. Only products with Requires Shipping set to Yes count: other products add no weight and are not included in the subtotal. The subtotal is the price of these products after the coupon discount and before tax; gift certificates, reward points and store credit are not taken into account. The extension then checks the conditions: the Countries list (when Ignore shipping zones is on), the cart weight and the minimum subtotal. If free shipping applies, the price is 0 and no request goes to DrEnvio.

Otherwise the extension sends DrEnvio the destination country and postcode, the cart weight, the number of items and the subtotal in MXN, and the origin postcode if you set one. Mexican postcodes must have 5 digits; until the customer enters a delivery address with one, no request is made. DrEnvio returns quotes of all carriers of your account. The extension uses only Estafeta quotes, ignores zero prices, picks the cheapest one and converts it to your default currency. The price is rounded to the decimals of that currency and shown to the customer in their currency with the tax of the selected Tax class.

Each answer is cached for 1 hour. A failed request or a route without an Estafeta rate is remembered for 5 minutes, so a slow or broken API never stalls every checkout update. The API timeout is 12 seconds. In these cases the customer sees no error: the country price or the fallback cost is used, or the method is hidden if neither is set. The reason is written to the log.

The customer sees only the method name and the price. The extension calculates rates only. It does not create shipments, print labels (guías) or track parcels; create the shipment in your DrEnvio or Estafeta account. The customer cannot choose a specific Estafeta service or an Estafeta office, and exchange rates are not updated automatically.

On OpenCart 4 the customer clicks Choose in the shipping method block of the checkout page and picks Estafeta in the window Shipping method options. The method works the same way as on OpenCart 3.

Orders

When an order with Estafeta is placed, the extension saves the rate shown to the customer, without a new request to DrEnvio. Later changes of the order in the admin do not change it. On OpenCart 4 the checkout keeps one order and updates it each time the customer confirms again, so the saved rate is replaced by the latest rate of the checkout. If the customer switches to another shipping method, the panel is no longer shown for that order.

The order page in Sales > Orders shows an Estafeta panel:

Estafeta service: the Estafeta service of the DrEnvio quote and its delivery time. Shown only for live rates.

Price source: Live DrEnvio rate, Country price (no live rate), Fallback cost (no live rate) or Free shipping threshold.

Shipping cost: the shipping price calculated at checkout in your default currency, tax excluded.

License key

The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox Estafeta is the first block on Extensions > Extensions > Shipping > VibeFox Estafeta > Edit, 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: opencart-shipping-estafeta and the link Manage licenses and domains in your account, which opens your vibefox.net account. Only admin users with the Modify permission for the extension can change the key. The texts of the block follow the admin 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 store address changes, or after you free a domain slot in your account, click Check now. If the license server cannot be reached, the extension keeps working on the last known status.

One key works on one domain: the store address from the OpenCart configuration. Removing the key from the store does not free its domain slot. Free the slot in your vibefox.net account.

Without an active key, Estafeta is not shown to customers at checkout and no rate is calculated. An admin user who is logged in to the admin in the same browser still sees the method in the store, marked (unlicensed — visible to admins only), so you can set up and test the extension before you buy a key. On OpenCart 4 this preview is not available: the store does not see the admin login, so without an active key the method is hidden for everybody. After you have opened the Edit page once, a reminder appears on the admin Dashboard. Close it with × to hide it for 7 days. Existing orders are not affected.

When a license expires, the extension keeps working, but updates and support need a renewal. The status is checked again automatically when you open the admin Dashboard or the Edit page: once a day for the first 14 days after the key is entered, then once a week. No cron job is needed. Uninstalling the extension always removes the license key and license status.

Troubleshooting

Estafeta does not appear at checkout: check that the license is active and Enable/Disable is on. Check Geo zone, or Ignore shipping zones and Countries. Check the warnings at the top of the extension page, the weight limits and Minimum subtotal. Without an API key or when DrEnvio has no Estafeta rate, the method needs a country price for the destination or a fallback cost. Check that the products have Requires Shipping set to Yes.

Live rates do not appear: turn on Debug log, reload the checkout and look at the Log field on the extension page. It shows the reason: no API key, no exchange rate for a store whose default currency is not MXN, a missing or invalid postcode, a rejected API key (DrEnvio HTTP 401 or 403, check the API key), no Estafeta rate for the route (the log lists the carriers DrEnvio returned), or a rate in a currency other than MXN.

Does the price include IVA? That depends on your DrEnvio account. If the DrEnvio prices already include IVA, set Tax class to No tax.

Rates look outdated after a change: click Save on the extension page. This clears the cached DrEnvio rates.

The order page has no Estafeta panel: the panel is shown only for orders placed with Estafeta while the extension was installed and enabled.

The page says "Warning: You do not have permission to modify VibeFox Estafeta!": your admin user group may only view the settings. Give the group the modify permission for extension/shipping/vfd_estafeta (OpenCart 3) or extension/vfd_estafeta/shipping/vfd_estafeta (OpenCart 4) in System > Users > User Groups.

For developers: the DrEnvio API address can be replaced with the setting vfd_est_api_url (for tests); it has no field on the settings page.

Uninstall

Go to Extensions > Extensions, choose the type Shipping and click Uninstall (the red − button) next to VibeFox Estafeta. The license key and license status of this extension are always removed. OpenCart always resets Enable/Disable, Sort order, Tax class and Geo zone. The cached rates are always removed. If Remove data on uninstall is on, the Estafeta settings and the debug log are deleted as well. If it is off, the other settings are kept and are used again when you install the extension again. The saved Estafeta services of orders are kept in both cases, and orders keep their shipping method and cost.

On OpenCart 4, to remove the files of the extension as well, go to Extensions > Installer after the uninstall and click Uninstall (the orange − button) next to VibeFox Estafeta in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.

Estafeta and DrEnvio are trademarks of their respective owners. This extension is not affiliated with or endorsed by Estafeta or DrEnvio.