Back

VibeFox Delhivery 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.

Delhivery API token (for live rates only): log in to Delhivery One and open Settings > API setup. The Delhivery help article "API token generation" explains the steps. Both links are on the extension page. Test tokens work with the staging environment. You also need the 6-digit pincode of your pickup location. If you only use fixed prices, you do not need a token.

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_delhivery-oc3-(version).ocmod.zip and the OpenCart 4 package vfd_delhivery.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_delhivery-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 Delhivery 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 API token and your origin pincode, choose Express or Surface and Pre-paid or COD. If your store default currency is not INR, enter the conversion rate. Optionally enter fixed prices (see Configuration). Turn on Enable Delhivery and click Save.

OpenCart 4

1. In the admin go to Extensions > Installer, click Upload and choose the file vfd_delhivery.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 Delhivery, 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 Delhivery and save. If you install the extension again after an uninstall, the Delhivery settings you kept are used again.

Configuration

All settings are on the extension page: Extensions > Extensions > Shipping > VibeFox Delhivery > Edit. The sections are listed on the left. One Save button saves the whole page without reloading it. Every save also clears the cached Delhivery rates. Amounts accept "9.99" and "9,99". If a value is wrong, nothing is saved and the page shows the reason, for example Enter a valid method title (without < > ; = # { })., a message that a field must be a non-negative number, or Sort order must be a whole number. Only admin users with the modify permission for this extension can save the settings.

If your store default currency is not INR, an API token is saved and no conversion rate is set, a warning at the top of the page reminds you that live rates are not used until you enter the rate. If the store has no kilogram weight class and its weight unit is not a standard one (kg, g, lb or oz), a warning says that product weights are read as kilograms. Set a standard unit in System > Localisation > Weight Classes.

General

The settings apply to every geo zone. You can limit the method in Availability.

Enable Delhivery: offers Delhivery at checkout. Default: off.

Method title: the shipping method name shown to the customer in the cart and at checkout. Default: Delhivery. Required, at most 64 characters, without the characters < > ; = # { }.

Tax class: the tax class of the shipping cost, or No tax (default). With a class, OpenCart adds tax on top of the shipping cost.

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

Delhivery API account (needed for live rates only)

Environment: Production (track.delhivery.com) (default) or Staging / test account (staging-express.delhivery.com). Use Staging only with a Delhivery test token.

API token: your Delhivery API token. It is sent only in the authorization header and never written to logs. After saving, the field stays empty and shows Saved — leave empty to keep it. Type a new value only to change it.

Remove saved token: turn it on and save to delete the saved token. Only the fixed prices are used then.

Origin pincode: the 6-digit pincode of your pickup location or warehouse, for example 110001. If it does not have 6 digits, the settings are saved with the warning The origin pincode must have 6 digits — live rates are not requested until it is fixed.

Live rates

A live rate is requested for Indian destinations with a valid 6-digit pincode, for a forward (delivered) shipment.

Shipping mode: the Delhivery billing mode used for the rate: Express (default) or Surface.

Payment type: the payment type sent to Delhivery: Pre-paid (default) or COD (cash on delivery — Delhivery adds its COD charge). The extension does not switch it by the payment method the customer chooses.

Rate amount: Delhivery returns the charge with and without GST.

Total amount (including GST): the default.
Gross amount (excluding GST): choose this if the method has a tax class (General > Tax class), so tax is not charged twice.

INR to (store currency) conversion rate: the label shows your store default currency. Delhivery rates are in Indian rupees. If your default currency is not INR, enter how many units of your currency one rupee is worth, for example 0.011. The rate must be greater than 0. Leave it empty and live rates are not used, the fixed prices apply. Not needed when your default currency is INR.

Fixed prices (used when no live rate is available)

Fixed prices are used when there is no token or pincode yet, the destination is outside India, the pincode is not serviceable or the API returns an error. They are in your store default currency, tax excluded.

Prices per country: one per line in the format COUNTRY_CODE:price, for example IN:120. Checked before the fallback price. Lines in another format are dropped on save, and a warning lists them.

Fallback price: used when neither a live rate nor a country price applies. Leave it empty to hide the method (default). 0 means free.

Fixed price is charged: Per order (default) charges the price once. Per item (price × quantity) multiplies it by the number of items in the cart. A live Delhivery rate is always for the whole parcel weight.

Conditions

Free shipping from: delivery is free if the subtotal of the products that need shipping (after the coupon, before tax) is at least this amount. No request goes to Delhivery. Leave empty to turn it off.

Show from subtotal: show the method only if this subtotal is at least this amount. Leave empty to always show it.

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

Max weight (kg): hide the method if the cart is heavier. Default: 30. 0 means no limit, an empty field means 30 kg. Min weight cannot be greater than Max weight: the page shows an error and nothing is saved.

Product weights are converted to kg from their OpenCart weight class. The rate uses the actual cart weight (the sum of product weights), without volumetric weight or boxes.

Availability

Geo zone: offer Delhivery only for addresses in this geo zone. All zones (default) means no limit. Geo zones are managed in System > Localisation > Geo Zones. Not checked when Ignore zones is on.

Ignore zones: when on, the geo zone is not checked and the method is offered for the countries below (all countries if the list is empty).

Countries: the destination countries for that mode. Used only when Ignore zones is on.

Advanced

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

Log: shows the size and the latest entries of the log. Click Clear log to empty it.

Remove data on uninstall: when on, uninstalling the extension deletes the Delhivery settings, cached rates and the log. When off (default), they are kept for a re-install. Order data (mode, price source, AWB numbers) is never deleted.

Import / Export

Export: click Download JSON to save the settings as a JSON file. The API token 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 token is not changed.

How it works at checkout

When OpenCart shows the shipping methods, it asks the extension for the Delhivery price. If a Geo zone is set (and Ignore zones is off) and the address is outside it, Delhivery 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 extension then checks the countries (when Ignore zones is on), the cart weight and Show from subtotal. The subtotal is the price of the products that need shipping, after the coupon discount and before tax. Gift certificates, reward points and store credit are not taken into account. If free shipping applies, the price is 0 and no request goes to Delhivery.

For an Indian address with a valid 6-digit pincode (the postcode of the address), the extension sends Delhivery the origin and destination pincodes, the cart weight in grams, the shipping mode and the payment type. The returned amount is converted from INR to your default currency, rounded to its decimals 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 is cached for 10 minutes, so the checkout does not wait for Delhivery on every refresh. The API timeout is 10 seconds.

If there is no live rate, the price for the country or the fallback price is used. If neither is set, the method is hidden. The customer never sees an API error. The reason is written to the log.

The extension calculates rates and gives customers a tracking link. It does not create shipments or waybills, print labels, request pickups or manifests, check pincode serviceability, estimate delivery dates, sync tracking statuses or quote international Delhivery rates. Outside India only the fixed prices are used.

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

Orders and tracking

When an order is placed with Delhivery, the extension stores the shipping mode and the price source with the order. Open the order in Sales > Orders: the Delhivery panel above the order history shows Mode: (Express or Surface), Price: (live Delhivery rate, fixed price or free shipping threshold) and the Delhivery AWB / tracking number, or Not entered yet.

On OpenCart 4 the checkout keeps one order and updates it each time the customer confirms again. The mode and the price source are updated with it. If the customer switches to another shipping method before an AWB is entered, the Delhivery panel is no longer shown for that order.

Create the shipment in Delhivery One, then enter its AWB in the panel and click Save. The page is not reloaded. Letters, digits and dashes are kept (up to 64 characters). Save an empty field to remove the AWB. With an AWB the panel shows a Track on delhivery.com link. Saving the AWB needs the permission to modify orders. Without it the panel is read-only.

A registered customer sees Delhivery tracking: with the AWB as a link to the Delhivery tracking page on the order page of their account. When you add an order history entry and notify the customer, the order status e-mail gets the same line with the link. The new order e-mail has no tracking link, because the AWB is entered later. The panel and the tracking link also work for older orders when the extension is switched off.

License key

The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox Delhivery is the first block on Extensions > Extensions > Shipping > VibeFox Delhivery > 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-delhivery 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, Delhivery 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

Delhivery does not appear at checkout: check that the license is active and Enable Delhivery is on. Check Geo zone, or Ignore zones and Countries, the weight limits and Show from subtotal. Without a live rate, a country price or a Fallback price is needed. Check that the products have Requires Shipping set to Yes.

Live rates do not appear: check the API token, a valid Origin pincode and, if your default currency is not INR, the conversion rate. The customer must enter a valid 6-digit Indian pincode as the postcode. Turn on Debug log, reload the checkout and look at the Log field on the extension page. It shows the reason, for example a pincode that is not serviceable or an HTTP error from Delhivery.

GST is charged twice: Delhivery's total amount already includes GST. Set Rate amount to Gross amount (excluding GST) or Tax class to No tax.

Testing: set Environment to Staging and use a Delhivery test token.

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

The AWB cannot be saved: the message You do not have permission to modify orders. means your admin user group needs the modify permission for sale/order in System > Users > User Groups.

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

For developers: the extension triggers the OpenCart events catalog/vfd_delhivery/api_url and catalog/vfd_delhivery/api_timeout, which can change the API address and the timeout.

Uninstall

Go to Extensions > Extensions, choose the type Shipping and click Uninstall (the red − button) next to VibeFox Delhivery. The license key and license status of this extension are always removed. OpenCart always resets Enable Delhivery, Sort order, Tax class and Geo zone. The cached rates and the extension's events are always removed. If Remove data on uninstall is on, the Delhivery 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 Delhivery data of orders (mode, price source and AWB numbers) is never deleted. Existing 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 Delhivery in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.

Delhivery is a trademark of its respective owner. This extension is not affiliated with or endorsed by Delhivery.