Skip to main content

Catalog Mode & Quote Request

Overview​

The Catalog Mode module turns a WooCommerce store into a browsable catalogue: it can hide prices, remove the add-to-cart button, and offer an enquiry form in their place. Enquiries are stored, answered from the admin screen, and emailed to both sides.

It is for wholesale, made-to-order and trade stores where a price is quoted rather than published, and for stores that want a catalogue open while checkout is closed.

Availability​

ItemValue
Module keycatalog_mode
TierPremium
Entitlement keycatalog_mode
Admin tabcatalog-mode, under Pricing & Promotions
Enabled optionaiowc_module_enabled_catalog_mode (off until turned on)
REST namespaceaiowc/v1

Enabling the module creates the two tables below, seeds the defaults and schedules the cleanup job. Every storefront behaviour is off by default: enabling the module changes nothing a shopper sees until at least one of hide_prices, hide_add_to_cart or enable_inquiry_form is turned on.

Settings​

Stored in the bundled option row aiowc_cm_settings; legacy per-key options aiowc_cm_<key> are migrated on first read.

API nameStored keyDefaultMeaning
hidePriceshide_pricesfalseRegister the price filters.
hideAddToCarthide_add_to_cartfalseRegister the cart-button filters.
enableInquiryFormenable_inquiry_formfalseRegister the enquiry button, modal and submit handler.
inquiryEmailinquiry_emailsite admin emailAddress notified of a new enquiry, and the from address on the reply.
showCallForPriceshow_call_for_pricetrueShow replacement text where a price would have been.
replacementTextreplacement_text"Contact us for pricing"The text shown in place of a price.
applyToRolesapply_to_roles[] (all users)When set, only users with these roles are subject to catalogue mode.
applyToCategoriesapply_to_categories[] (all products)When set, catalogue mode applies only to products in these categories.
cleanupDayscleanup_days180Age at which closed enquiries are deleted. 0 or less disables the cleanup.

The three switches are read once, when hooks are registered, so a change takes effect on the next request rather than mid-request.

Rules​

Beyond the module-wide switches, catalogue mode can be scoped by rules. Each rule has a type, a set of target ids, its own hide_price, hide_cart and show_inquiry flags, optional replacement text, a priority and an active flag.

Rules resolve most specific first — product, then role, then category, then global — and within one type the lower priority number wins. Exactly one rule wins per product and visitor; results are cached per product and role for the request.

Admin screen​

The Catalog Mode tab has three sub-tabs, and the active one is held in the URL:

Sub-tabWhat it offers
RulesCreate, edit and delete catalogue rules through a rule editor dialogue.
EnquiriesThe enquiry queue, a detail dialogue, status changes, admin notes and replies.
SettingsA form over the module settings above.

REST API endpoints​

All routes are on aiowc/v1. Administration requires manage_woocommerce plus a REST nonce on cookie-authenticated requests. The submit route accepts guests but requires a REST nonce and is rate limited to 30 requests a minute.

MethodPathPurposeRequired argsPermission
POST/catalog-mode/inquireSubmit an enquiry; accepts customer_phone and message.product_id, customer_name, customer_emailPublic write
GET/catalog-mode/inquiriesList enquiries; accepts status, page, per_page.–Manage
GET/catalog-mode/inquiries/{id}Read one enquiry.idManage
PUT / PATCH / POST/catalog-mode/inquiries/{id}Update status or admin notes.idManage
DELETE/catalog-mode/inquiries/{id}Delete an enquiry.idManage
POST/catalog-mode/inquiries/{id}/replyEmail a reply to the customer and record it; accepts admin_notes.id, reply_textManage
GET/catalog-mode/rulesList rules; accepts limit, offset.–Manage
POST/catalog-mode/rulesCreate a rule; accepts target_ids, hide_price, hide_cart, show_inquiry, replacement_text, priority, is_active.rule_typeManage
PUT / PATCH / POST/catalog-mode/rules/{id}Update a rule.idManage
DELETE/catalog-mode/rules/{id}Delete a rule.idManage
GET/catalog-mode/settingsRead the settings above.–Manage
PUT / PATCH / POST/catalog-mode/settingsUpdate the settings above.–Manage

WooCommerce integration​

Frontend handlers are skipped inside wp-admin, and each group is registered only when its switch is on.

Hiding prices (hide_prices)​

FilterPriority
woocommerce_get_price_html100
woocommerce_cart_item_price100
woocommerce_cart_item_subtotal100
woocommerce_variable_price_html100

Hiding the cart button (hide_add_to_cart)​

HookPriorityEffect
woocommerce_loop_add_to_cart_link100Replaces the loop button.
woocommerce_is_purchasable100Marks the product not purchasable.
woocommerce_single_product_summary1Removes the single-product add-to-cart output.
woocommerce_add_to_cart_validation100Refuses a direct add-to-cart attempt.

Because purchasability and add-to-cart validation are both filtered, a hidden product cannot be added by posting to the cart URL directly.

Enquiry form (enable_inquiry_form)​

HookEffect
woocommerce_single_product_summary (35)Renders the enquiry button on the product page.
woocommerce_after_shop_loop_item (15)Renders the enquiry button in the loop.
wp_footerRenders the enquiry modal.
wp_ajax_aiowc_submit_inquiry, wp_ajax_nopriv_aiowc_submit_inquiryHandles the form post for signed-in and guest visitors.
wp_enqueue_scriptsLoads the enquiry assets.

The form can therefore be submitted either through admin-ajax or through POST /catalog-mode/inquire.

Email​

A new enquiry is emailed to inquiry_email, falling back to the site admin address when it is empty. A reply is emailed to the customer from the same address. Both go through wp_mail, so they use whatever the site is already configured to send with.

Database schema​

TableHolds
{prefix}aiowc_catalog_mode_rulesRules: type, target ids, per-rule hide flags, replacement text, priority and active state.
{prefix}aiowc_catalog_inquiriesEnquiries: product, customer name, email, phone, message, status, admin notes and replies.

Background jobs​

HookIntervalWork
aiowc_catalog_inquiry_cleanup24 hoursDeletes closed enquiries older than cleanupDays. Returns immediately when that setting is 0 or less.

Entitlement limits​

catalog_mode is an on/off grant with no licence-side quota on rules or enquiries. Enquiry volume is bounded by the public-write rate limit of 30 requests a minute per caller, and enquiry retention by cleanupDays.

Health check​

The module reports a warning when its tables are missing or WooCommerce is inactive, and otherwise reports that it is functioning normally.