Add website special-products source setting for storefronts.
Let businesses choose product vs store_item sourcing, defaulting from the store module, and expose it on tenant resolve and store-specials. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
8609d8d4fd
commit
b0d4916138
@@ -99,6 +99,16 @@ export type StoreSettings = {
|
||||
ePayment: EPaymentSettings;
|
||||
};
|
||||
|
||||
/** Where website special-product carousels read from. */
|
||||
export const SPECIAL_PRODUCTS_SOURCE_IDS = ['product', 'store_item'] as const;
|
||||
|
||||
export type SpecialProductsSource = (typeof SPECIAL_PRODUCTS_SOURCE_IDS)[number];
|
||||
|
||||
/** Per-business website CMS settings. */
|
||||
export type WebsiteSettings = {
|
||||
specialProductsSource: SpecialProductsSource;
|
||||
};
|
||||
|
||||
/** Optional business-dashboard CMS modules. Always-on areas (customers, website, etc.) are not listed. */
|
||||
export const BUSINESS_DASHBOARD_MODULE_IDS = [
|
||||
'products',
|
||||
@@ -148,6 +158,7 @@ export type BusinessSettings = {
|
||||
dashboard: DashboardSettings;
|
||||
store: StoreSettings;
|
||||
modules: ModulesSettings;
|
||||
website: WebsiteSettings;
|
||||
};
|
||||
|
||||
export const DEFAULT_ORDER_PROCESS_STEPS: OrderProcessStep[] = [
|
||||
@@ -238,4 +249,7 @@ export const DEFAULT_BUSINESS_SETTINGS: BusinessSettings = {
|
||||
enabled: DEFAULT_ENABLED_BUSINESS_MODULES,
|
||||
charts: DEFAULT_HOME_CHARTS,
|
||||
},
|
||||
website: {
|
||||
specialProductsSource: 'store_item',
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user