Skip to content

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

Quick Order initialization

The Quick Order initializer configures the Quick Order B2B drop-in for bulk ordering: it sets the GraphQL endpoint (Core Service), loads placeholders from placeholders/quick-order.json, and passes language definitions. The drop-in reads the store configuration (quickOrderActive) to enable or disable the feature.

ParameterTypeReq?Description
langDefinitionsLangDefinitionsNoLanguage definitions for internationalization (i18n). Override dictionary keys for localization or branding.
quickOrderActivebooleanNoOverride for the Quick Order feature flag. When false, containers show a disabled overlay. By default the drop-in reads this from store config (storeConfig.quickorder_active).

Defaults when no configuration is provided:

import { initializers } from '@dropins/tools/initializer.js';
import { initialize, setEndpoint } from '@dropins/storefront-quick-order/api.js';
import { initializeDropin } from './index.js';
import { CORE_FETCH_GRAPHQL, fetchPlaceholders } from '../commerce.js';
await initializeDropin(async () => {
setEndpoint(CORE_FETCH_GRAPHQL);
const labels = await fetchPlaceholders('placeholders/quick-order.json');
const langDefinitions = {
default: { ...labels },
};
return initializers.mountImmediately(initialize, { langDefinitions });
})();

Override dictionary keys for localization or branding. The langDefinitions object maps locale keys to custom strings that override default text for the drop-in.

const langDefinitions = {
default: {
QuickOrder: {
QuickOrderItem: {
addAllToCart: 'Add All to Cart',
emptyList: 'No products in the list',
// ... other keys — see Dictionary page
},
},
},
};
return initializers.mountImmediately(initialize, { langDefinitions });

The drop-in reads store config from Adobe Commerce:

Config keyDescription
quickorder_activeWhen false, Quick Order is disabled; all containers show a disabled overlay.

Enable Quick Order in Adobe Commerce Admin: Stores > Settings > Configuration > General > B2B Features > Enable Quick Order. Apply the configuration to both .page and .live when using this drop-in.

Maps locale identifiers to dictionaries of key-value pairs. The default locale is used as the fallback when no specific locale matches.

langDefinitions?: {
[locale: string]: {
[key: string]: string | Record<string, string>;
};
};