当前位置:网站首页>The population logic of the request to read product data on the sap Spartacus home page
The population logic of the request to read product data on the sap Spartacus home page
2022-07-06 00:45:00 【Wang Zixi】
Spartacus It's an open source JavaScript web Applications , Allows you to quickly create your own based on JavaScript Of SAP Business cloud store .Spartacus Yes, it is Angular Compiling , And publish in the form of Library . Use Spartacus The recommended method is to build your own JavaScript web Import and store the application . There is no need to modify , The storefront can open the box and work , but Spartacus Designed to be upgradeable 、 Customizable and extensible , To meet all your brand and functional needs .
entrance :occ-product.adapter.ts~loadMany Method :
assemble url The input parameter is :productCode This key is right , The parameter name is productCode, The value is the actual product code, such as 358639:
meanwhile ,product Data requested url, according to productCode value ( dynamic ), Insert a string template , This string template is actually product API Of endpoint, It's defined in this.config.backend.occ.endpoints in . The picture below is product
dependent OCC API endpoint:
The data source configured in the figure above , Actually hard coded in this file projects\core\src\occ\adapters\product\default-occ-product-config.ts
in :
You can see from the debugger ,Spartacus home Page initiated product Data request ,scope by list,
so url pattern from list
From this record ,${productCode}
At run time, the actual value will be 358639
Replace .
Finally, it becomes the following figure :
In order to maintain our commitment to scalability ,Spartacus The design pattern of is to build non core features into feature libraries that add or change the functions provided (feature libraries).
In the use of Spartacus when , You need to build an application , It will introduce Spartacus library , It includes the use of SAP Commerce Cloud Core resources needed . Then build new features that include any custom functions and pages .
Spartacus The content of the page is from SAP Commerce Cloud CMS( Content management system ) Acquired , Like logos 、 link 、 Banners and static pages .SAP It is suggested that the new content driven features follow the same pattern , send Content manager Can pass CMS Tools modify page content .
边栏推荐
- FFmpeg抓取RTSP图像进行图像分析
- Spark AQE
- Pointer - character pointer
- 小程序容器可以发挥的价值
- Idea远程提交spark任务到yarn集群
- STM32 configuration after chip replacement and possible errors
- Extension and application of timestamp
- NLP text processing: lemma [English] [put the deformation of various types of words into one form] [wet- > go; are- > be]
- ubantu 查看cudnn和cuda的版本
- The relationship between FPGA internal hardware structure and code
猜你喜欢
Room cannot create an SQLite connection to verify the queries
Set data real-time update during MDK debug
看抖音直播Beyond演唱会有感
[EI conference sharing] the Third International Conference on intelligent manufacturing and automation frontier in 2022 (cfima 2022)
FPGA内部硬件结构与代码的关系
数据分析思维分析方法和业务知识——分析方法(三)
95后CV工程师晒出工资单,狠补了这个,真香...
anconda下载+添加清华+tensorflow 安装+No module named ‘tensorflow‘+KernelRestarter: restart failed,内核重启失败
MYSQL GROUP_ The concat function realizes the content merging of the same ID
Opencv classic 100 questions
随机推荐
notepad++正則錶達式替換字符串
Pointer - character pointer
多线程与高并发(8)—— 从CountDownLatch总结AQS共享锁(三周年打卡)
KDD 2022 | 脑电AI助力癫痫疾病诊断
vSphere实现虚拟机迁移
Classical concurrency problem: the dining problem of philosophers
[simple implementation of file IO]
可恢复保险丝特性测试
Data analysis thinking analysis methods and business knowledge -- analysis methods (II)
Codeforces gr19 D (think more about why the first-hand value range is 100, JLS yyds)
Spark DF adds a column
Cve-2017-11882 reappearance
Leetcode 44 Wildcard matching (2022.02.13)
devkit入门
【线上小工具】开发过程中会用到的线上小工具合集
Yolov5, pychar, Anaconda environment installation
The value of applet containers
[EI conference sharing] the Third International Conference on intelligent manufacturing and automation frontier in 2022 (cfima 2022)
MIT博士论文 | 使用神经符号学习的鲁棒可靠智能系统
DD's command