Posts

Creating a Filter in SAP Commerce Cloud (Hybris)

Prerequisite Having hands-on knowledge of filters in servlets. Knowing the Spring MVC flow will be helpful. Introduction In Spring MVC, every request from the front end or any browser is first sent to the dispatcher servlet . The dispatcher then forwards the request to the appropriate controller and method. Before reaching the dispatcher servlet, the request first passes through a filter , where the doFilter method processes the request and response. Adding a Filter to the Existing Filter Chain (Step-by-Step Process) Filters are essential in SAP Commerce Cloud (Hybris) as they allow developers to hook into the request-response lifecycle . They are commonly used for: Logging Authentication Request manipulation Custom operations Custom Logging Filter Implementation package com.simplified.storefront.filters; import java.io.IOException; import javax.servlet.FilterChain; i...

Latest SAP Commerce (Hybris) Interview Questions

1.What is the need for the deployment tag, and what does autocreate=true 2.What happens if the deployment tag is not used 3.Explain the process of adding a step in the checkout end-to-end. 4.Have you worked on order process Share a project use case. 5.How do you configure and abort a cron job in Hybris 6.What are composite cron jobs 7.How do you create variants and sub-variants in SAP Commerce 8.Share your experience with Solr and Backoffice customizations. 9.Have you worked on cart customizations Share a project use case. 10.What is the difference between value providers and resolvers 11.Explain the OCC flow in Hybris. 12.Have you worked on payment integration or any third-party integration 13.Are you familiar with Kibana, Dynatrace, or CCV2 14.Explain the Spring MVC flow. 15.What are the types of dependency injection in Spring 16.Mention any JDK 17 or JDK 11 features you know. 17.Why is navigable=true used in Sap Commerce. 18.Explain...

User Management and Hierarchy in SAP Hybris: Employees, Customers, and User Groups

Image
Users in Hybris : Users in SAP Commerce (Hybris) are people who interact with the system to perform tasks like managing settings in the Backoffice or engaging with the storefront. Types of Users in Hybris: i)Employee ii)Customer If we goto User Node in BackOffice we can see two users such as Employees, Customers An Employee in Hybris is a user who manages the application and performs administrative tasks or backend operations. Examples of employees in Hybris: asagent, admin, CustomerSupportAdministrator, WarehouseAdministrator etc Employees in Hybris can have multiple roles. For example:- One employee might be an admin with complete access to the system. Another employee might have partial access based on their role. Customers in Hybris are users who shop on the website, performing actions like adding products to the cart, placing orders, and managing their accounts,adding products to wishlist Open: /platform/ext/core/resources/core-items.xml Principal Item Type...

Product Data Synchronization Between Solr and SAP Commerce (hybris)

Image
Requirement : The product data in SAP Commerce (Hybris) is always synchronized with the information stored in Solr. This means that any updates or changes made to product details in Solr are automatically reflected in SAP Commerce(Hybris) Database. It works by: Fetching product details (like product code, stock status, EAN, and manufacturer name) from Solr. Checking if the product already exists in the SAP Commerce database. If the product exists, it updates the existing record. If the product does not exist, it creates a new record in the database. This process ensures that the product information in SAP Commerce remains synchronized with the product data from Solr. Step 1: Define the Custom Item Type SolrExtractedItemType in /samplecore/resources/samplecore-items.xml You need to create a custom item type that will hold the product information fetched from Solr, such as the product code, stock status, EAN, and manufacturer name < itemtype code = "SolrExtractedItemType...

Renderer Classes for Backoffice Customization in SAP Commerce (Hybris)

Image
Requirement : Here we are developing custom renderer class to retrive and sort somecondition entities by precedence Format each condition as a string: code | precedence | Y/N (where Y/N (Yes or No) indicates the isAvailable flag) and Concatenate all conditions into a single string separated by commas (,) then display the formatted string in the backoffice list view. Step 1: Define two custom item types: SomeProductRule and SomeCondition . Location: /samplecore/resources/samplecore-items.xml < itemtype code = "SomeProductRule" autocreate = "true" generate = "true" > < description >Some Product Rules</ description > < deployment table = "someproductrules" typecode = "15788" /> < attributes > < attribute qualifier = "vendor" type = "java.lang.String" > < description >Vendor Identifier</ description ...