Posts

How to configure catalog sync cronjob in Hybris?

Image
 How to create custom catalog synchronization job in Hybris? Scenario My client wants to have product catalog sync cronjob. So the first thing that came to my mind was, It's quite easy, by creating an instance of  CatalogSyncCronJob  and assign it to appropriate sync job(Product Sync stage to Online) and trigger. But it won't work like that. CatalogVersionSyncJob is designed to run only once with each instance.  So if we create sync job instance by ImpEx/HMC, it will not get any newly / modified items in the second execution. because system needs a new instance for each sync execution! Wondering, how catalog synchronization works when we do it form Hybris HMC(Catalog Management Tool > Synchronization)? If we execute catalog sync from Catalog Management Tool, then each time, Hybris internally creates a new instance of selected sync job. Hence, it can detect new or modified items to sync. Solution We can write the custom job, which basically does t

Hybris SAP Commerce Cloud - Log4j Vulnerability Solution

The Log4j vulnerability is the most high-profile security vulnerability on the internet right now and comes with a severity score of 10 out of 10. I hope by now you are already aware of  Log4j Vulnerability (CVE-2021-44228) . Hence, In this article, I'll not cover more about what log4j vulnerability is. Now let's talk about what is the quick solution or precautionary measures for the SAP Commerce Hybris. If your Hybris solution is  on-premise  or with  SAP Infrastructure (CCV1)  then you should take preventive measures either removing JNDI classes from existing log4j-core-*.jar or upgrading all log4j libs. As of now, let's go with the first option which looks like a quick and easy fix to me. 1) Create /hybris/config/customize/platform/ext/core/lib folder structure in your project 2) Copy  /hybris/bin/platform/ext/core/lib/log4j-core- .jar* file to  /hybris/config/customize/platform/ext/core/lib 3)  Go to   /hybris/config/customize/platform/ext/core/lib  and execute below tw

How to build hybris storefront less file without server restart

Image
In the Hybris if you need to change the style you need to deal with .less files. .less file need to compile to .css then only you can see the changes applied to your storefront. Generally, hybris build (ant clean all) will take care of .less compilation. But if you are frequently dealing with .less files and you want to build it without restarting/building the platform. You can use the below ant command. 1) Open another CMD/Terminal at your platform directory (you don't need to stop your current running server) 2) Now set ant environment using  setantenv.bat 3) Compile your storefront ant <yourstorefrontextension>_compileuisrc     e.g. ant mystorefront_compileuisrc

How to find the Hybris SAP Commerce version?

  1) By navigating to folder/file You can check the hybris build information (Version) in  build.number  file located at hybris\bin\platform. You will find something like this below. #Ant properties #Tue Oct 06 14:59:00 CEST 2020 builddate=20201006 1444 releasedate=20201006 1444 vendor=hybris version=1811.28 version.api=1811 You can refer to  version  &  version.api  property for the Hybris version. 2) From HAC You can search the above version property from the HAC console. Go to HAC > Platform > Configuration. Now search with "verison"

What is default username and password for Hybris solr?

In Hybris, all authentication and authorization configuration is stored in the security.json file. A sample security.json file is provided which contains the following users: below are the default username and passwords for Solr User User Description solradmin admin123 admin user can perform any operation solrserver server123 for communication between server nodes solrclient client123 can perform search queries Read more about Solr Security