这个 StackOverflow 的讨论地址如下。
针对 checkout 开发了一个 Angular library.
打开 order confirmation 页面后,遇到如下错误消息:
core.js:6498 ERROR Error: Feature orderCore is not configured properly
at FacadeFactoryService.getResolver (spartacus-core.js:24825)
at FacadeFactoryService.create (spartacus-core.js:24867)
at facadeFactory (spartacus-core.js:24898)
at orderReturnRequestFacadeFactory (spartacus-order-root.js:13)
at Object.factory (spartacus-order-root.js:37)
at R3Injector.hydrate (core.js:11457)
at R3Injector.get (core.js:11276)
at NgModuleRef$1.get (core.js:25352)
at Object.get (core.js:25066)
at lookupTokenUsingModuleInjector (core.js:3354)
解决方案
如果您想使用 Spartacus Order 库,您需要为其创建“order-feature.module.ts”。 默认情况下,核心与组件捆绑在一起。 因此,在您的配置中,您需要设置:“[ORDER_CORE_FEATURE]: ORDER_FEATURE”。 所以,配置是这样的:
const config: CmsConfig = {
featureModules: {
[ORDER_FEATURE]: {
cmsComponents: [
....
],
},
// by default core is bundled together with components
[ORDER_CORE_FEATURE]: ORDER_FEATURE,
},
};
网友评论