Opencart extensions free download · 6 min read · Updated

Request a Quote for OpenCart 4: B2B Quote Requests and “Price on Request” Products (Free Extension)

A free OpenCart 4 extension that adds a Request a quote button and form to product pages, saves requests to an admin inbox under Sales, emails the store, and can replace Add to Cart with "Price on request" for products priced 0.

Opencart 4 request a quote

Not every sale fits a cart. A company wants 25 laptops and expects a volume price. A customer wants a product engraved, or delivered abroad. Some products have no fixed price at all: made to measure, installed on site, or priced by the day’s material cost. These customers either email you with half the details, or give up.

OpenCart 4 has quantity discounts and customer groups, but no way to ask for a quote. This free extension adds a Request a quote button and form to product pages, saves every request in an inbox in your admin, and emails you when one arrives. For products without a price, it can replace Add to Cart with “Price on request”.

Download Request a Quote for OpenCart 4 (free, tested on OpenCart 4.1.0.4)

Request a quote form in a popup on an OpenCart 4 product page with name, email, telephone, company, quantity and details fields
The form opens in a popup on the product page. Logged-in customers have their name, email and phone filled in.

What it does

  • A button on product pages, under Add to Cart, opening a short form: name, email, telephone, company, quantity and details.
  • An inbox in the admin at Sales → Quote Requests, with a badge counting new requests, New and Replied filters, and a detail page.
  • Email alerts to the store address, with Reply-To set to the customer, so you can answer straight from your mailbox.
  • “Price on request” mode: on products priced 0, Add to Cart and the $0.00 price are replaced by the quote button.
  • Spam protection: a hidden honeypot field, one request a minute per visitor, and server-side validation.
  • Requests are never lost. They’re saved before the email is sent, so a mail problem doesn’t lose a lead.

Install it

  1. Download requestquote.ocmod.zip.
  2. Go to Extensions → Installer, upload it, and click the green +.
  3. Go to Extensions → Extensions → Modules and install Request a Quote. This creates the oc_quote_request table and two events.
  4. Click Edit, open Settings, choose where the button shows, turn Status on and save.
Request a Quote settings: show the button on every product or only on products priced 0, email new requests, status
Settings: where the button shows, email alerts and status.
SettingOptions
Show the buttonOn every product, under Add to Cart: for bulk and custom orders alongside normal sales. Only on products priced 0: “price on request” products, where the quote replaces Add to Cart
Email new requests to the storeSends each request to the store email in System → Settings → Store, using your mail settings
StatusOn or off

What shoppers see

OpenCart 4 product page with a Request a quote button below the Add to Cart button
In “every product” mode, the button sits under Add to Cart.

The quantity starts at the product’s minimum quantity. After sending, the form is replaced by a thank-you message:

Request a quote popup showing Thank you! Your request has been sent. We'll reply by email.
The request is saved and the store is emailed.

“Price on request” products

In the second mode, set a product’s price to 0 and the product page shows “Price on request” and the quote button instead of a $0.00 price, the quantity box and Add to Cart. Products with a price are untouched:

OpenCart 4 product page showing Price on request and a Request a quote button instead of price and Add to Cart
A product priced 0 in “price on request” mode.

Category and search pages still list the product; their price and button come from your theme’s product cards. If $0.00 there bothers you, hide prices of 0 in the theme, or put these products in their own category.

Managing requests

OpenCart 4 admin Quote Requests list with a new request from Daniel Reeves for 25 MacBooks and a red badge in the Sales menu
Sales → Quote Requests, with a badge for new requests.

Open a request to see everything the customer sent, the date and IP address. Reply by email opens your email program with the address and subject filled in. When you’ve answered, click Mark as replied so the request leaves the New list.

OpenCart 4 quote request detail with product, name, email, telephone, company, quantity, message, date and IP, and Reply by email and Mark as replied buttons
A request’s detail page.

Turning a quote into an order

Two ways work well with OpenCart’s own features:

  • A coupon for this customer. Create a coupon in Marketing → Coupons for the agreed discount, limited to the product, with Uses Per Coupon set to 1, and send a coupon link in your reply. The customer checks out normally.
  • A quantity discount. For repeat B2B buyers, add a discount row on the product’s Discount tab for their customer group and quantity. See B2B and wholesale pricing in OpenCart 4.

For one-off custom work, you can also create the order yourself in Sales → Orders and send the customer a payment link from your payment provider.

How it’s built

PartWhereWhat it does
Tableoc_quote_requestProduct, store, customer, contact details, quantity, message, status, IP, date
Eventcatalog/view/product/product/afterInserts the button and form after the Add to Cart form; hides it in price-on-request mode
Eventadmin/view/common/column_left/beforeAdds Sales → Quote Requests with the badge
Controllerextension/requestquote/module/requestquote.sendValidates, saves and emails the request (JSON)

Validation and spam protection

// Bots fill in the hidden field; people never see it.
if (!empty($post['website'])) {
	$json['error']['warning'] = $this->language->get('rq_error_closed');
}

// One request a minute per visitor.
if (!empty($this->session->data['requestquote_time']) && time() - $this->session->data['requestquote_time'] < 60) {
	$json['error']['warning'] = $this->language->get('rq_error_wait');
}

The product ID is checked against the catalog, the email with FILTER_VALIDATE_EMAIL, the quantity between 1 and 1,000,000, and every field has a length limit matching its database column. If bots still get through, add our free Cloudflare Turnstile extension.

Save first, then email

Many stores’ mail settings are broken without anyone noticing. The request is saved before the email is tried, and the email runs inside try/catch, so an SMTP error writes a line to the error log instead of losing the lead or showing the customer an error:

try {
	$mail = new \Opencart\System\Library\Mail($this->config->get('config_mail_engine'), $mail_option);
	$mail->setTo($this->config->get('config_email'));
	$mail->setFrom($this->config->get('config_email'));
	$mail->setSender($store);
	$mail->setReplyTo(html_entity_decode($request['email'], ENT_QUOTES, 'UTF-8'));
	$mail->setSubject(sprintf($this->language->get('rq_mail_subject'), $id, $product_name));
	$mail->setText($text);
	$mail->send();
} catch (\Throwable $e) {
	$this->log->write('Request a Quote: email for request #' . $id . ' failed: ' . $e->getMessage());
}

The email is sent from your store address (so SPF and DKIM pass) with Reply-To set to the customer, rather than pretending to come from the customer’s address, which would fail DMARC. To check your setup, see transactional email for OpenCart 4.

Testing

TestResult
A request for 25 MacBooks with company and messageSaved as request #1, shown under New with a badge of 1
A second request within a minute“Please wait a minute before sending another request.”
The hidden field filled inRefused, nothing saved
Empty name, invalid email, quantity 0An error under each field
Price-on-request mode, product priced 0“Price on request” and the button; no $0.00, no Add to Cart. Priced products: no button
Reply by emailOpened a new email to the customer with the subject filled in

Troubleshooting

ProblemCause and fix
No buttonCheck Status and mode: in “priced 0” mode only products with price 0 get it. The theme must have OpenCart’s id="form-product" form
Requests saved but no emailCheck System → Settings → Mail, then System → Maintenance → Error Logs for a “Request a Quote” line
“Requests cannot be sent right now”The extension is off, or the product is disabled

Uninstalling keeps the requests table, so reinstalling doesn’t lose them. To delete the data, run DROP TABLE oc_quote_request; afterwards.

More free OpenCart 4 extensions: product Q&A, sticky add to cart, coupon links and age verification.

Rupak Nepali
Written byRupak Nepali

Rupak Nepali is a web developer, manage Webocreation website and the author of six books:
Getting Started with OpenCart Module Development (Packt, 2013),
OpenCart Theme and Module Development (Packt, 2015),
OpenCart 4: Dev Guide for Themes & Extensions (2024),
OpenCart 4: User Manual (2025),
Cloudflare for the Enterprise Website (2026) and
The Technical Web Guide for Marketers (2026).
Rupak has built OpenCart stores and extensions since 2010, has published more than 600 tutorials on Webocreation, and shares free OpenCart extensions on GitHub.
Find Rupak on
GitHub | Amazon | LinkedIn | X | YouTube.

Leave a Reply

Your email address will not be published. Required fields are marked *