Expose website tags and badges via business settings and business-info.

Stores custom meta tags and eNamad/Samandehi footer HTML in settings so storefronts can render them from the public API.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-10-03 18:07:13 +03:30
co-authored by Cursor
parent cffc828328
commit 63ae9b22b9
10 changed files with 354 additions and 0 deletions
@@ -34,12 +34,14 @@ import {
WebsiteSitemapConfig,
ZarinpalGatewaySettings,
DEFAULT_WEBSITE_SCHEMA_SETTINGS,
DEFAULT_WEBSITE_TAGS_AND_BADGES,
} from './business-settings.types';
import {
defaultOrderStepColor,
normalizeOrderStepColor,
} from './order-step-colors';
import { normalizeWebsiteSchemaSettings } from './website-schema.util';
import { normalizeWebsiteTagsAndBadges } from './website-tags-badges.util';
function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === 'object' && value !== null && !Array.isArray(value);
@@ -505,6 +507,11 @@ export function normalizeBusinessSettings(raw: unknown): BusinessSettings {
schema: normalizeWebsiteSchemaSettings(
isRecord(website) ? website.schema : DEFAULT_WEBSITE_SCHEMA_SETTINGS,
),
tagsAndBadges: normalizeWebsiteTagsAndBadges(
isRecord(website)
? website.tagsAndBadges
: DEFAULT_WEBSITE_TAGS_AND_BADGES,
),
},
sms: {
senderNumber: normalizeSmsSenderNumber(sms.senderNumber),
@@ -571,6 +578,10 @@ export function mergeBusinessSettings(
patch.website?.schema !== undefined
? patch.website.schema
: current.website.schema,
tagsAndBadges:
patch.website?.tagsAndBadges !== undefined
? patch.website.tagsAndBadges
: current.website.tagsAndBadges,
},
sms: {
senderNumber: