Settings
Open Add-ons > Manage add-ons > Melhor Envio Shipping & Labels > Settings.
General
Section titled “General”| Setting | Default | Description |
|---|---|---|
| Enable | On | When off, no new work is started. Jobs and webhooks of work that is already under way are still processed. |
| Marketplace owner mode | On | On: every order is processed with the marketplace owner’s Melhor Envio account; vendors can look and print but not buy or cancel. Off: each vendor connects their own account. |
| Debug log | Off | Also stores every HTTP call with masked request and response. Tokens and secrets are never stored; names, documents, e-mails, phones and addresses are masked. |
| Log retention (days) | 90 | Older log entries are removed by the cron run. |
| Create the label when the order status becomes | empty | Empty = labels are created by hand. A status here puts the label in the Melhor Envio cart (it never pays; paying is a button press). |
| Order status when the label is posted / delivered | empty | Moves the order when Melhor Envio reports the parcel posted or delivered. Completed, cancelled, failed and declined orders are left alone. |
| Profile field with the CPF / CNPJ | none | A custom profile field (billing or shipping) that holds the customer’s CPF or CNPJ; it prefills the label form. The number can always be typed in the form. |
| Send phone and e-mail to Melhor Envio | Off | Sender and recipient phone / e-mail are optional for the carrier; turn on to send them. |
| Public print links | Off | On: anyone with the print link can open the label PDF. Off (recommended): only a logged-in Melhor Envio user can. |
| Also create a CS-Cart shipment | On | Records the tracking number as a regular shipment so the customer’s order page and notifications show it. |
| Quote cache (minutes) | 10 | The quote of the same package set to the same CEP is reused (0 = no cache, 240 at most). |
| Quote timeout (seconds) | 5 | Checkout never waits longer for Melhor Envio; the method is simply not offered. |
| Fallback shipping rate | empty | Offered when Melhor Envio does not answer. Empty = hide the methods. |
Connection
Section titled “Connection”The application credentials and the authorization are not ordinary settings: they are entered on the Connection page and stored encrypted (AES-256-GCM, key derived from your store’s own secret). They are never shown again; leave a secret field empty to keep the saved value.
| Field | Description |
|---|---|
| Mode | Test uses the sandbox application and the sandbox host of Melhor Envio; Live uses the production application. |
| Technical contact e-mail | Sent in the User-Agent header of every request, as Melhor Envio requires. Nothing is pre-filled. |
| Client ID / Client secret | From your application in Melhor Envio (Area Dev). The secret also signs the webhook. |
| Sender | Name, CPF or CNPJ, address and CEP of the shipper. A CNPJ and state registration are needed only for commercial shipments with an invoice. |
| Default package | Weight and size used for products without them (checkout quote and label form). |
Shipping methods (Configure tab)
Section titled “Shipping methods (Configure tab)”| Field | Description |
|---|---|
| Extra handling days | Added to the delivery estimate. |
| Extra fee | A fixed amount (store currency) plus a percentage added to the quote. |
| Free shipping from | Cart subtotal (store currency) from which the method costs nothing; 0 = never. |
| Declare the cart value as insured value | Sends the goods value as the insured value (changes the price at some carriers). |
| Receipt notice, own hands | Extra services that add to the Melhor Envio price. |
In marketplace owner mode every quote starts from the CEP of the owner’s sender data (the Connection page of the store owner), whichever vendor’s product is in the cart; give vendors their own origin by switching owner mode off and letting each vendor enter their sender CEP.
Product weight and the box size of the product’s shipping settings are used as the package; stock CS-Cart splits the cart into packages by the box settings and each package is quoted as one item.
The queue runs from cron. Use either the command line or the secret web address shown in the Cron section of the settings:
php /path/to/store/admin.php --dispatch=kv_melhor_envio.cronhttps://your-store.example/index.php?dispatch=kv_melhor_envio.cron&key=<secret>
The cron run reads the tracking of open labels (up to 20 per request), applies stored webhooks, renews the OAuth token when it has not been used for 15 days (the refresh token lives 45 days) and cleans the log.
Log and jobs
Section titled “Log and jobs”- Log lists every call, job and webhook with filters (level, action, text, dates) and a CSV export.
- Jobs lists the queue. A job that fails is retried after 5 minutes, 15 minutes, 1 hour, 3 hours and 12 hours, then marked “Gave up”; use Retry to queue it again.
Multi-Vendor
Section titled “Multi-Vendor”In the vendor panel a vendor sees only their own records. With the marketplace owner mode off the vendor also gets the Connection tab for their own account.