Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Quick Order Functions

The Quick Order drop-in exposes API functions for store configuration. Use them to determine whether Quick Order is enabled. Containers use this to show or hide the disabled overlay.

FunctionDescription
getStoreConfigReturns store configuration including the Quick Order feature flag (quickOrderActive).

Fetches store configuration via GraphQL and returns quickorder_active (mapped to quickOrderActive). The drop-in uses it to show a disabled overlay when Quick Order is off in Adobe Commerce Admin.

const getStoreConfig = async (): Promise<{
storeConfig: {
quickOrderActive: boolean;
};
}>
  • storeConfig.quickOrderActivetrue when Quick Order is enabled in store config.
import { getStoreConfig } from '@dropins/storefront-quick-order/api.js';
const { storeConfig } = await getStoreConfig();
if (storeConfig.quickOrderActive) {
console.log('Quick Order is enabled');
} else {
console.log('Quick Order is disabled');
}

Quick Order does not implement or duplicate APIs for product data, search, or add-to-cart. Instead, it relies on external APIs provided by the PDP, Cart, and Product Discovery drop-ins (for example, getProductsData, productsSearch, Cart add-to-cart). This approach avoids code duplication, maintains consistency with existing logic, and preserves extensibility. You can pass custom API methods in the same way when needed. See the QuickOrderItems container for required and optional parameters.