The models that are most frequently customized are currently placed in @spartacus/core.
The following is an example of module augmentation on
the ConsentTemplate model:
假設我想擴充Spartacus core裡的标準interface:
ConsentTemplate
首先從Spartacus core裡導入:
import { ActiveCartService, CartAddEntrySuccessEvent, CmsConfig, Config, ConfigModule, ConsentTemplate, EventService } from '@spartacus/core';
然後使用如下文法擴充一個新的字段documentUrl:

最後的效果:
而關于SAP Spartacus 前台控制邏輯即業務的擴充,示意圖如下: