Posts

Showing posts with the label hybris

SAP Hybris deployment architecture

Image
Do you know how to set up each standalone server(Solr, Datahub, App, Admin)? Refer to   this post , which points you to right wiki link for detail steps

How to debug Hybris application?

As Hybris runs in builin server, you can debug it as Remote Java Application from Eclipse start the server with  hybrisserver.bat debug  (In windows) or  ./hybrisserver.sh debug  (In Linux) Import all required  extensions  in eclipse Open any Java file ( cartPageController.java ) Open  Run > Debug Configurations  (shortcut:  Alt + r + b ) check for  Remote Java Application  in your left panel of popup Right click on  Remote Java Applicaiton  and click on new Create a new configuration by clicking on  Apply Click on  Debug  to start your  debug mode Nowe enjoys the debugging by putting breakpoints.

How to prevent the system initialization in the Hybris HAC?

Lock the system initialization: You can avoid accidental initialization or update the system by locking those options from HAC. Now when we really want to perform this operation we can unlock it and use the functionality. To lock the system for initialization and update add the unlocking ( system.unlocking.disabled=true ) properties to your  local.properties  file and rebuild your system. Unlock the system initialization: Let's you want to perform an update system from HAC but that option is locked. Don't worry, you can easily unlock it without restarting the system and perform an operation. Set system.unlocking.disabled to false (HAC>configuration) Go to  /hac/platform/init , Click on Unlock. Wiki reference Block/Redirect URL from the webserver: In case, your business stakeholder wants to block initialization and update system from HAC. The idea here is to change its request mapping. If you have a web server in place for admin console, You can blo

How to add script tag or source code in hybris WCMS component ?

Requirement : To enable google structure data for Organization and WebSite search I want to add the script (application/ld+json) on Hybris homepage using WCMS component. Problem : I have chosen the paragraph component and added it to the one of available WCMS slot. But not able to add a script in the editor, as XSS filter remove script while saving to DB. Workaround : Disable XSS filter for while using  xss.filter.enable= false  (from hac), save the script (editor > select source > past your script) and then agian enable the xss filter. Structure data application/ld+json: <script type='application/ld+json'>  {   "@context": "http://www.schema.org",   "@type": "Organization",   "name": "MyCompnay USA, Inc.",   "url": "https://www.MyCompnayusa.com/",     "logo": "http://www.MyCompnayusa.com/web/media/system/layout/images/logo.gif",

How to create catalog aware ItemType in Hybris?

Scenario Create an Item type which can have two versions(stage/online) like the product type. In simple word, it should be catalog aware. Solution We can declare any Item type as catalog aware using in *-items.xml < itemtype code = "MyConfiguratorSetting" extends = "GenericItem" autocreate = "true" generate = "true" > < deployment table = "ConfiguratorSettings" typecode = "1301" /> < custom - properties > < property name = "catalogItemType" >< value > java . lang . Boolean . TRUE </ value ></ property > < property name = "catalogVersionAttributeQualifier" >< value > "catalogVersion" </ value ></ property > < property name = "uniqueKeyAttributeQualifier" >< value > "code" </ value ></ property > </ custom - prope