=== BidBasket – Request a Quote for WooCommerce ===
Contributors: congthanls
Tags: request a quote, quote cart, hide price, b2b, wholesale
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a Request a Quote button to WooCommerce. Customers collect products in a quote cart and send quote requests. Hide prices and Add to Cart.

== Description ==

BidBasket adds a **Request a Quote** button to your WooCommerce store. Customers collect products in a quote cart (the "quote basket"), enter their contact details and send you a quote request. You receive an email and manage every request from your WordPress dashboard. You can also hide prices and the Add to Cart button, for the whole shop or selected categories and products, and turn products into quote-only products.

It is built for wholesale and B2B shops, building material and furniture suppliers, and any store whose prices depend on quantity, delivery or customisation.

= Features =

* "Add to Quote" button on product pages and in product lists (shop and category pages).
* Works for simple and variable products, including products without a price or out of stock.
* Hide prices and the Add to Cart button for all products, selected categories or single products, for everyone or only for visitors who are not logged in. Show your own text instead of the price ("Price on request"). Hidden products cannot be added to the cart at all, not even with direct links.
* Quote basket: change quantities and remove products before sending.
* Basket kept for guests during their session, and saved to the account of logged-in customers (follows them across devices).
* Request form with name, email, phone, company and message, plus an optional (or required) address with the same country, state and postcode rules as the WooCommerce checkout. Fields can be changed with filters.
* Quote requests saved in your dashboard with a snapshot of each product (name, SKU, options, quantity and price at the time of the request), so requests stay readable if products change or are deleted.
* Statuses: New, In Progress, Replied, Closed — with bulk status changes, search and date filter.
* Email to the store for every new request (Reply-To set to the customer) and a confirmation email to the customer. Both are WooCommerce emails: change the subject, heading, recipients and format under WooCommerce → Settings → Emails.
* Spam protection: honeypot field and rate limiting.
* Privacy: optional consent checkbox, personal data export and erasure via the WordPress privacy tools, automatic deletion of old requests, suggested privacy policy text.
* Quote Basket block and `[bidbasket_basket]` shortcode.
* Templates can be overridden in your theme.
* Translation ready.

= BidBasket Pro =

BidBasket Pro is an optional add-on for stores that answer requests with priced quotes:

* Edit prices, quantities and discounts, add products or custom lines.
* Shipping and taxes calculated for the customer's location.
* Branded PDF quotes (logo, colors, terms).
* Customers accept or reject online; accepted quotes become WooCommerce orders ready to pay.
* Expiry dates, quote history and a "Quotes" tab in My Account.

Everything listed under Features above stays free and works without Pro.

[Get BidBasket Pro](https://checkout.freemius.com/product/44873/plan/79106/)

= What BidBasket does not do (yet) =

* On its own, it does not create priced quotes, PDFs or orders from a request: you answer the customer by email, or use BidBasket Pro.
* Grouped and external products cannot be added to a quote.

= Privacy =

BidBasket does not send data to any external service and does not track visitors. The details customers enter in the request form are stored in your WordPress database. Basket contents are stored in the WooCommerce session (server side) and, for logged-in customers, in their user account.

== Installation ==

1. Install and activate WooCommerce.
2. Upload the `bidbasket` folder to `/wp-content/plugins/`, or install the plugin from the Plugins screen.
3. Activate BidBasket. A **Quote Basket** page is created automatically.
4. Go to **Quote Requests → Settings** to choose where the button is shown, change its text and set privacy options.
5. Optional: add the Quote Basket page to your menu.

== Frequently Asked Questions ==

= Does BidBasket require WooCommerce? =

Yes. If WooCommerce is not active, BidBasket stays inactive and shows a notice in the dashboard.

= Where do I find quote requests? =

In the **Quote Requests** menu of your dashboard. New requests are counted next to the menu item.

= Who can see quote requests? =

Users with the `manage_woocommerce` capability (Administrators and Shop Managers). Developers can change this with the `bidbasket_manage_capability` filter.

= Emails are not arriving =

BidBasket sends email through WordPress (`wp_mail`). If other WooCommerce emails do not arrive either, configure an SMTP plugin. Failed sends are logged under WooCommerce → Status → Logs (source "bidbasket").

= Can I use my page builder or a block theme? =

Yes for block themes: BidBasket is tested with Twenty Twenty-Five as well as Storefront, Astra and Kadence. Add the **Quote Basket** block or the `[bidbasket_basket]` shortcode to any page and select that page in the settings. The product page button uses the standard WooCommerce add-to-cart hooks; page builders that replace the add-to-cart form with their own widget may not show it.

= My site uses page caching =

Exclude the Quote Basket page from caching (BidBasket already sends no-cache headers for it).

= Can I change the form fields? =

Yes, with the `bidbasket_request_form_fields` filter. Name and email are always required.

= How do I override templates? =

Copy files from `bidbasket/templates/` to `yourtheme/bidbasket/` (emails: `yourtheme/woocommerce/emails/`) and edit the copies.

= Can I hide prices only for guests? =

Yes. In Quote Requests → Settings → Hide prices and Add to Cart, set "Hide for" to visitors who are not logged in. Logged-in customers then see prices and can buy as usual.

= Can I hide the price of a single product? =

Yes. Edit the product and use Product data → General → "Price and Add to Cart" to hide or always show it, whatever the global rule is.

= How do I stop spam requests? =

BidBasket has a hidden honeypot field and allows 5 requests per hour from one IP address. A visitor's address receives at most 3 confirmation emails a day, and those emails never repeat the visitor's free-text message. To add a CAPTCHA, output it on the `bidbasket_request_form_before_submit` action and check it with the `bidbasket_validate_request_form` filter.

= My site is behind Cloudflare or a proxy =

The rate limit uses the visitor's IP address. Behind a proxy every visitor can appear to have the proxy's address. Use the `bidbasket_client_ip` filter to return the real visitor IP from the header your proxy sets (only if your server accepts traffic from that proxy alone).

= Is BidBasket compatible with HPOS? =

Yes. BidBasket does not read or write WooCommerce orders.

== Screenshots ==

1. Add to Quote button on a product page.
2. Quote Basket with the request form.
3. Quote requests in the dashboard.
4. Quote request details.
5. Settings.

== Changelog ==

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.0 =
First release.
