Wholesale Enquiry Manager
Wordpress Plugin to manage Wholesale Enquiry
by Abhishek Santosh Gupta · github.com/abhishekbuild/wholesale-enquiry-manager · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/abhishekbuild/wholesale-enquiry-manager/archive/refs/heads/master.zipA parallel enquiry cart for WooCommerce wholesale stores. Customers can add products to an enquiry list and submit a single form for all items.
Description
Wholesale Enquiry Manager adds a complete "enquiry cart" system that runs alongside the standard WooCommerce cart. It is designed for wholesale or B2B stores where pricing is negotiated rather than fixed.
Key features:
- Per-product mode: mark any product as "Enquiry Only" (hides Add to Cart) or "Allow Both" (shows both buttons side-by-side).
- Enquiry cart stored in the WooCommerce session — completely separate from WC()->cart.
- Customers add products, set per-item requirements (custom packaging, lead time, MOQ, etc.) and submit a single enquiry form.
- Guest-friendly — no account required.
- Automatic page creation on activation with the [wem_enquiry_cart] shortcode.
- Admin list of all enquiries with status badges, customer details, product counts, and Zoho sync status.
- Status workflow: New → In Discussion → Quoted → Converted to Order → Closed.
- Email notifications to both the customer and the store admin on submission.
- Zoho CRM integration: automatically creates/updates a Contact, creates a Deal, and attaches a detailed Note.
- "Test Connection" button in settings to verify Zoho credentials without submitting a real enquiry.
Installation
- Download the plugin zip file.
- In your WordPress admin, go to Plugins → Add New → Upload Plugin.
- Upload the zip and click Install Now.
- Click Activate Plugin.
- Ensure WooCommerce is installed and active — the plugin will show an admin notice if it is not.
On activation the plugin automatically:
- Registers the wem_enquiry custom post type.
- Creates a page called "Enquiry Cart" (slug: enquiry-cart) with the [wem_enquiry_cart] shortcode.
- Saves the page ID so the floating icon can link to it.
If you prefer a different page, create your own page with [wem_enquiry_cart] as its content, then update the stored option wem_enquiry_page_id to match the new page ID.
Usage
Marking a product as Enquiry Only
- Open the product in the WooCommerce product editor.
- Go to the Product Data panel → General tab.
- Tick "Enquiry Only".
- Save the product.
The Add to Cart button will be hidden and the product will not be purchasable via normal checkout. Only the "Add to Enquiry" button will appear.
Marking a product as Both (Direct Purchase + Enquiry)
- In the same General tab, tick "Allow Direct Purchase + Enquiry".
- Save the product.
Both buttons will appear side by side. Customers can add the same product to either cart independently.
Note: if both checkboxes are ticked, "Enquiry Only" takes precedence.
Finding and managing enquiries
- Go to WP Admin → Enquiries.
- The list table shows Status, Customer, Company, Email, Phone, Products, Zoho Sync status, and Date.
- Click an enquiry title to open the detail view with:
- Full customer information.
- Products requested with quantities and per-item requirements.
- Status change dropdown.
- Zoho CRM sync status with direct links to the CRM record.
Email configuration
Go to WP Admin → Enquiries → Settings → Email Settings to configure:
- From Name and From Email for outgoing emails.
- A separate Admin Notification Email if the store owner is different from the WP admin.
Zoho CRM Setup
-
Go to https://api-console.zoho.in (replace "in" with your region if different).
-
Click "Add Client" → choose "Self Client".
-
Note your Client ID and Client Secret from the credentials tab.
-
Click "Generate Code" with the following scope (use the ZohoBigin.* equivalents if you are on Zoho Bigin): ZohoCRM.modules.contacts.ALL,ZohoCRM.modules.deals.ALL,ZohoCRM.modules.notes.ALL For "Time Duration", pick 10 minutes (the longest option — Zoho no longer offers "No Expiry"). The code is one-time-use and short-lived; you only need it to run step 5. The refresh token you obtain in step 6 is long-lived.
-
Within those 10 minutes, exchange the generated code for a refresh token using Postman or curl. The code can only be exchanged ONCE — if the call fails or the code expires, return to api-console and click "Generate Code" again.
POST https://accounts.zoho.in/oauth/v2/token Body (form-encoded): code = {your_generated_code} client_id = {your_client_id} client_secret = {your_client_secret} redirect_uri = https://localhost grant_type = authorization_code
-
Copy the
refresh_tokenvalue from the JSON response. -
Go to WP Admin → Enquiries → Settings → Zoho CRM Integration.
-
Select your Data Center, enter Client ID, Client Secret, and Refresh Token.
-
Click Save, then "Test Connection" — you should see "Connected ✓".
Every new enquiry will automatically:
- Create or update a Contact in Zoho CRM matched by email address.
- Create a Deal linked to that Contact in the Qualification stage.
- Add a detailed Note to the Deal with all product and customer information.
- Show sync status on the enquiry detail page in WordPress admin.
If Zoho sync fails for any reason, the enquiry is still saved in WordPress and the customer still receives a success response. You can retry the sync from the enquiry detail page.
Frequently Asked Questions
Does this conflict with the normal WooCommerce cart?
No. The enquiry cart uses a separate WooCommerce session key (wem_enquiry_cart) and never calls WC()->cart->add_to_cart(). Both carts can contain the same product simultaneously without any conflict.
Do customers need to be logged in?
No. Guest enquiries are fully supported via the WooCommerce session.
What happens if Zoho CRM is not configured?
The plugin works completely without Zoho. Enquiries are saved in WordPress and emails are sent normally. The Zoho integration is additive — configure it when ready.
Can I customise the email templates?
Yes. The email templates are located in wp-content/plugins/wholesale-enquiry/templates/emails/. Copy them to your theme in the same directory structure to override them without losing changes on plugin updates.
How do I change the Enquiry Cart page?
Create a new page with [wem_enquiry_cart] as its content. Then update the WordPress option wem_enquiry_page_id (e.g. via WP-CLI: wp option update wem_enquiry_page_id 42) to point to the new page ID.
Is the plugin GDPR-friendly?
Customer data (name, email, address) is stored in WordPress post meta attached to the enquiry post type. You are responsible for including enquiries in your data retention and deletion policies. The data is never sent to third parties except Zoho CRM if that integration is enabled and configured.
Changelog
1.0.0
- Initial release.
- Parallel enquiry cart with per-product requirements accordion.
- Admin list with status workflow.
- Zoho CRM integration (Contact + Deal + Note).
- Customer and admin email notifications.
- Settings page with Test Connection.
Upgrade Notice
1.0.0
First release — no upgrade required.