当前位置:网站首页>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 .
边栏推荐
- The relationship between FPGA internal hardware structure and code
- notepad++正则表达式替换字符串
- Meta AI西雅图研究负责人Luke Zettlemoyer | 万亿参数后,大模型会持续增长吗?
- notepad++正則錶達式替換字符串
- Introduction of motor
- Room cannot create an SQLite connection to verify the queries
- [groovy] XML serialization (use markupbuilder to generate XML data | create sub tags under tag closures | use markupbuilderhelper to add XML comments)
- Power query data format conversion, Split Merge extraction, delete duplicates, delete errors, transpose and reverse, perspective and reverse perspective
- A preliminary study of geojson
- Data analysis thinking analysis methods and business knowledge -- analysis methods (II)
猜你喜欢
【EI会议分享】2022年第三届智能制造与自动化前沿国际会议(CFIMA 2022)
看抖音直播Beyond演唱会有感
建立时间和保持时间的模型分析
[groovy] XML serialization (use markupbuilder to generate XML data | set XML tag content | set XML tag attributes)
KDD 2022 | EEG AI helps diagnose epilepsy
How to make your own robot
Notepad + + regular expression replace String
How to solve the problems caused by the import process of ecology9.0
MDK debug时设置数据实时更新
View class diagram in idea
随机推荐
ubantu 查看cudnn和cuda的版本
Power Query数据格式的转换、拆分合并提取、删除重复项、删除错误、转置与反转、透视和逆透视
2022-02-13 work record -- PHP parsing rich text
免费的聊天机器人API
CTF daily question day44 rot
小程序容器可以发挥的价值
A preliminary study of geojson
NLP generation model 2017: Why are those in transformer
Opencv classic 100 questions
云导DNS和知识科普以及课堂笔记
Go learning --- structure to map[string]interface{}
Notepad++ regular expression replacement string
Promise
Browser reflow and redraw
Yolov5、Pycharm、Anaconda环境安装
关于#数据库#的问题:(5)查询库存表中每本书的条码、位置和借阅的读者编号
State mode design procedure: Heroes in the game can rest, defend, attack normally and attack skills according to different physical strength values.
Pointer pointer array, array pointer
MCU realizes OTA online upgrade process through UART
Intensive learning weekly, issue 52: depth cuprl, distspectrl & double deep q-network