当前位置:网站首页>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 .
边栏推荐
- STM32 configuration after chip replacement and possible errors
- [simple implementation of file IO]
- [groovy] compile time metaprogramming (compile time method interception | find the method to be intercepted in the myasttransformation visit method)
- Model analysis of establishment time and holding time
- Idea remotely submits spark tasks to the yarn cluster
- A preliminary study of geojson
- Arduino hexapod robot
- 【线上小工具】开发过程中会用到的线上小工具合集
- Browser reflow and redraw
- DD's command
猜你喜欢

从 1.5 开始搭建一个微服务框架——调用链追踪 traceId

Spark SQL null value, Nan judgment and processing

Illustrated network: the principle behind TCP three-time handshake, why can't two-time handshake?

Data analysis thinking analysis methods and business knowledge -- analysis methods (II)

95后CV工程师晒出工资单,狠补了这个,真香...

OpenCV经典100题

Starting from 1.5, build a micro Service Framework - call chain tracking traceid

Calculate sha256 value of data or file based on crypto++

notepad++正則錶達式替換字符串

notepad++正则表达式替换字符串
随机推荐
Calculate sha256 value of data or file based on crypto++
An understanding of & array names
猿桌派第三季开播在即,打开出海浪潮下的开发者新视野
logstash清除sincedb_path上传记录,重传日志数据
FFmpeg抓取RTSP图像进行图像分析
devkit入门
[groovy] XML serialization (use markupbuilder to generate XML data | create sub tags under tag closures | use markupbuilderhelper to add XML comments)
Pointer pointer array, array pointer
[groovy] JSON serialization (convert class objects to JSON strings | convert using jsonbuilder | convert using jsonoutput | format JSON strings for output)
Comment faire votre propre robot
How spark gets columns in dataframe --column, $, column, apply
Uniapp development, packaged as H5 and deployed to the server
电机的简介
[EI conference sharing] the Third International Conference on intelligent manufacturing and automation frontier in 2022 (cfima 2022)
notepad++正則錶達式替換字符串
RAID disk redundancy queue
Synchronized and reentrantlock
数据分析思维分析方法和业务知识——分析方法(二)
MYSQL GROUP_ The concat function realizes the content merging of the same ID
Novice entry depth learning | 3-6: optimizer optimizers