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.
Functions reference
Section titled “Functions reference”| Function | Description |
|---|---|
getStoreConfig | Returns store configuration including the Quick Order feature flag (quickOrderActive). |
getStoreConfig
Section titled “getStoreConfig”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; };}>Returns
Section titled “Returns”storeConfig.quickOrderActive—truewhen Quick Order is enabled in store config.
Example
Section titled “Example”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');}API dependencies
Section titled “API dependencies”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.