SAP Spartacus里的defaultOccProductConfig
这个defaultOccProductConfig是一个TypeScript对象,位于文件default-occ-product-config.ts里:
export const defaultOccProductConfig: OccConfig = {backend: {occ: {endpoints: {product: {default:'products/${productCode}?fields=DEFAULT,averageRating,images(FULL),classifications,manufacturer,numberOfReviews,categories(FULL),baseOptions,baseProduct,variantOptions,variantType',list:'products/${productCode}?fields=code,name,summary,price(formattedValue),images(DEFAULT,galleryIndex)',details:'products/${productCode}?fields=averageRating,stock(DEFAULT),description,availableForPickup,code,url,price(DEFAULT),numberOfReviews,manufacturer,categories(FULL),priceRange,multidimensional,configuratorType,configurable,tags,images(FULL)',attributes: 'products/${productCode}?fields=classifications',variants:'products/${productCode}?fields=name,purchasable,baseOptions(DEFAULT),baseProduct,variantOptions(DEFAULT),variantType',},productReviews: 'products/${productCode}/reviews',// Uncomment this when occ gets configured// productReferences:// 'products/${productCode}/references?fields=DEFAULT,references(target(images(FULL)))&referenceType=${referenceType}',productReferences:'products/${productCode}/references?fields=DEFAULT,references(target(images(FULL)))',// tslint:disable:max-line-lengthproductSearch:'products/search?fields=products(code,name,summary,price(FULL),images(DEFAULT),stock(FULL),averageRating,variantOptions),facets,breadcrumbs,pagination(DEFAULT),sorts(DEFAULT),freeTextSearch,currentQuery',// tslint:enableproductSuggestions: 'products/suggestions',},},
在product-occ.module.ts里被导入:
providers数组里,接受一个个对象,字段名为:
- provide: injectionToken
以上图第32行的PRODUCT_NORMALIZER为例:
DefaultConfigurationChunk:
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
SAP Spartacus里的defaultOccProductConfig相关推荐
- SAP Spartacus 里的 icon 设计
同 SAP Fiori 一样,SAP Spartacus 里也有大量的自定义 icon 设计,比如下图的 iconTypes.RESET: 需要调用 iconLoader 获取 RESET icon ...
- Media Query在SAP Spartacus里的用途
Media queries are useful when you want to modify your site or app depending on a device's general ty ...
- SAP Spartacus里的feature module
SAP Spartacus里Component的使用受featureModule控制:
- SAP Spartacus里product数据请求的HTTP url是在哪里维护的
我们打开SAP Spartacus home页面时,能观察到product carousel里待显示的product数据从后台被请求: 随便点开一个url,格式如下: https://jerry.ea ...
- SAP Spartacus 里的 .release-it.json 文件
在 SAP Spartacus package.json 里有一个依赖叫做 release-it: 这个工具的链接:https://github.com/release-it/release-it 这 ...
- 如何找到 SAP Spartacus 里某个 Component TypeScript 编译后生成的 JavaScript 位置
需求 如何找到触发该网络请求的准确代码位置? 从 initiator 里查看调用栈上下文,一点头绪也没有. 找到触发该网络请求的控件的 selector:cx-register 在 Storefron ...
- SAP Spartacus 里的 cxOutletRef 指令执行过程分析
先看 cxOutletRef 指令的效果:ng-template 里定义了如下图标 1 区域所示的自定义 UI,通过 cxOutletRef, 将其插入到图标 2 所示的 ProductDetails ...
- SAP Spartacus里的localStorage用法
window-ref.ts: get nativeWindow(): Window {return typeof window !== 'undefined' ? window : undefined ...
- SAP Spartacus里modifiedtime的大小写问题
从cms返回的Component数据,modifiedtime全部小写: https://github.com/SAP/spartacus/issues/2521 这个issue里,把所有modifi ...
最新文章
- mysql 计算排名,生成排行榜
- 深入浅出ShellExecute
- 2014年全国计算机等级一级考试复习资料,2014年全国计算机等级一级考试复习资料..doc...
- elk 搜索 语法_ELK从入门到还未精通(二)——ElasticSearch上篇
- [转载]input[type=file]在移动端各浏览器无法适配打开相机的问题。
- Amdahl’s law (阿姆达尔定律)的演化和思考
- redis aof命令缓冲区的写入源码
- 初涉Runtime (一)
- 计算机视觉CV中特征点提取SURF算法的学习笔记
- SQL中LIMIT子句介绍
- 适合英语学习的100部电影
- 【Caffe学习01】在Caffe中trian MNIST
- LVGL官方文档-7.11.0-8-Porting-Logging
- WaWa的奇妙冒险(第二周集训自闭现场)
- 香农编码的C++实现及求平均码长和编码效率
- 小程序--广州旅游推荐
- 安卓自定义计时器控件
- 对JavaScript 标签语句的简单理解
- 嵌入式Arm立即数判定
- 百度地图获取地区/省市县json地图区域数据