专栏首页Jerry的SAP技术分享SAP Hybris Commerce功能介绍:Consignment tracking

SAP Hybris Commerce功能介绍:Consignment tracking

This new feature is developed by Chengdu Hybris dev team. When a customer decides to buy a given product, in step 4 Payment Method, customer chooses the way to pay:

Once payment is done, customer could see payment detail.

A new button is added in the screen which allows our end user to check the logistics status of current good delivery once the good is purchased.

Below is a sample popup once the button is clicked. All the data you saw below is the test data prepared by Hybris dev colleague manually, since we didn’t actually purchase any good.

The test data is inserted by the following console ( internal tool which is used only for testing ) so that they could be displayed later once the tracking button is pressed.

Implementation detail go through

Please find Java classes involved in the enhancement implementation:

The mentioned Java classes are implemented in these five projects:

ConsignmentTrackingController

This controller is responsible to react on the Tracking button press event and delegate the call to the tracking detail popup page.

The logic of progress bar display is done here: ( so only three values in progress bar: 0, 50 and 100 ):

Popup view( delivery detail )

The view is implemented in file: consignmenttrackingaddon/acceleratoraddon/web/webroot/WEB-INF/views/responsive/pages/consignment/trackPackage.jsp For example, the field for “Expected delivery”:

the fields for “ORDERED”, “SHIPPED” and “ARRIVED”:

Progress bar:

ConsignmentData

This bean class holds the data to be displayed in the tracking detail popup view. You can find its detail configuration from this file via the path: consignmenttrackingfacades\resources\consignmenttrackingfacades-beans.xml

DefaultConsignmentTrackingFacade

This facade simply delegates the execution to Service layer and does some post conversion based on returned result:

EventData

The fields are modelled in file “consignmenttrackingservices\resources\consignmenttrackingservices-beans.xml”:

ConsignmentDAO

Data Access Object, generates dynamic statement to fire flexible query to get data from persistence layer:

ConsignmentService

Since customer could choose their own carrier and integrate into the scenaro via custom development, so here ConsignmentService again delegates the call to the actual CarrierAdapter:

MockAddon

In order to guide customer to integrate their specific carrier into tracking scenario, SAP delivers a mock addon containing all necessary technical implementation for implementation reference. So how customer’s specific CarrierAdapter could be used? In ConsignmentService implementation, the corresponding CarrierAdapter instance is fetched according to its code.

The code is searched against the CarrierMap, which is injected by Spring in file “consignmenttrackingservices\resources\consignmenttrackingservices-spring.xml” plus annotation org.springframework.beans.factory.annotation.Required:

So customer can simply replace the default mockCarrierAdapter into their customized Adapter to make it take effect.

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 如何自行分析SAP WebClient UI开发环境里抛出的错误消息根源

    In this blog I will demonstrate how I resolve the error message “endless binding...

    Jerry Wang
  • 如何检测SAP UI5应用里控件的初始化和析构时间点

    Recently in order to resolve some internal incidents, I have the requirement to ...

    Jerry Wang
  • How to suppress the annoying line break error in WebIDE

    This error is very annoying. There are different line break settings in unix ( L...

    Jerry Wang
  • Haystack - hack the box

    HayStack is an easy box in hack the box. But it does isn't easy at all. It's ann...

    madneal
  • Holiday -- hack the box

    Holiday is an insane box officially. It's really difficult to get the user permi...

    madneal
  • 分布式计算中的8个谬论

    Eight-Fallacies-of-Distributed-Computing-Tech-Talk

    zhuanxu
  • 如何自行分析SAP WebClient UI开发环境里抛出的错误消息根源

    In this blog I will demonstrate how I resolve the error message “endless binding...

    Jerry Wang
  • 如何检测SAP UI5应用里控件的初始化和析构时间点

    Recently in order to resolve some internal incidents, I have the requirement to ...

    Jerry Wang
  • [security] Go 1.11.3 and Go 1.10.6 pre-announcement

    We plan to issue Go 1.11.3 and Go 1.10.6 on Wednesday, December 12 at

    李海彬
  • windows平台下redis安装及配置文件介绍

    redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(...

    写代码的猿

扫码关注云+社区

领取腾讯云代金券