Showing posts with the label Hybris Deployment

How to setup user account on linux systems for Hybris?

Why you should avoid running applications as root I've often come across posts on forums or other websites where you see people joking in such a manner about running/logging in as root as if it's something awful and everyone ought to know about it. However, there isn't much that a search reveals on the matter. It may be widely known to Linux experts, but I really don't know why. I remember always running as root when I first tried Linux years ago (Redhat and Mandrake) and don't remember running into any problems because of that. There are actually some distros that have a bright red background with alert signs all over it as wallpaper for the root user (SuSe?). I still use the "Administrator" account for regular use on my Windows installation and haven't ever run into any problems there either.  [source] How to create a User Account on Linux systems for Hybris Setup? Open a shell prompt. If you are not logged in as root, type the command

How to add or update Sort by Options in the Hybris?

Case1: Update/remove existing Sort by option If you are looking for update/remove existing Sort by option then you can do it by simply through hmc/backoffice/impex. Go to back-office  SolrIndexedType  and open your Indexed type Go to Solr Sorts tab: Here you can see the list of Sort By option which you can update/delete Case2: Add a custom Sort by option without custom sort logic In case if you want to add new custom Sort by option without any custom sorting logic then you can do it without changing any code. Let's assume I want a new sort by option based on  isPromotedProduct  (boolean) of the Product type. Just  follow the below steps... 1) Define SolrIndexedProperty You need to have SolrIndexedProperty for your attribute and you need to do Solr indexing to reflect its value in the Solr server. Here, I am assuming you know this part very well or you may already have SolrIndexedProperty defined. INSERT_UPDATE SolrIndexedProperty ; solrIndexedType(identifier)[un

[yjavac] 1. ERROR cannot be resolved to a type in Hybris?

Extensions can have dependencies on one another. While working with Hybris you come across a scenario, where you want to import a class from the different extension. The build only works if the required extension is available. Ensure the below steps to works it smoothly. Dependencies to Non-Platform(not located in  /platform/ext ) Extension The required extension should be there in  localextensions.xml Add the required extension in  extensioninfo.xml  (e.g  <requires-extension name="hmc"/> ) of the dependent extension In your eclipse(IDE), add required extension in  build path  of the dependent extension to resolve IDE dependecy. Note:  Adding required extension in IDE build path won't resolve extension dependency of your platform. It only resolved by  extensioninfo.xml Rebuild the system ( ant clean all ) Dependencies to Platform Extension By default, all extensions have the dependency on Platform extension(located at  /platform/ext ). There

How to change fromEmail Address of an email in Hybris?

If you want to reset or change  from emailAddress  for Hybris email, you can do that using Impex. You need to find emailPage for your email. then you can set or change  fromEmail  and  fromName  like below. # Email Pages UPDATE EmailPage ; $contentCV[unique=true] ; uid[unique=true] ; fromEmail[lang=$lang] ; fromName[lang=$lang] ; ; CustomerRegistrationEmail ; "" ; "Customer Services Team" ; ; DeliverySentEmail ; "" ; "Customer Support Team" ; ; ForgottenPasswordEmail ; "" ; "Customer Services Team"

Delete Hybris Products having duplicate name from HAC

How to delete duplicate product using the flexible search in Hybris? Open  HAC > console > scripting languages Now you can run the below  groovy script 1. Groovy script to get the list of pks to be removed import; flexibleSearchService = spring.getBean("flexibleSearchService") modelService = spring.getBean("modelService") def findProductWithSameName() { query = """ select MIN({}) as pks from {Product! as p JOIN CatalogVersion as CV on {p.catalogversion}={CV:PK} and {CV:version} = 'Online' JOIN Catalog as C on {CV:catalog}={C:PK} and {C:id}='myProductCatalog' } group by {p:name} having count(*) > 1""";; } findProductWithSameName().each { println it.code; //modelService.remove(it); } 2. Test Remove script import

SAP Hybris Installation and Deployment Architecture - [Part2]

If you not gone through Part1 , then please read it first. Centralized logging Hybris OOTB there is  centralized_logging  recipes, which can be used if you have  Docker  base setup. Anyway, you can set up your own  ELK Stack  (Elasticsearch-Logstash-Kibana), which is a good combination as Log Management Solution (Open Source). You can use Redis for the large enterprise solution to decouple the Log Server & Log Shipper. Tools: Logstash: As a log shipper and a log indexer Redis: As a broker – used as a queuing system ElasticSearch: As a log indexer – store and index logs Kibana: As a front-end viewer – a nice UI with useful extra features Install & configured  above stack to get consolidated logs from all application servers. Advanced Application Monitoring SAP Hybris Commerce Advanced Application Monitoring is a tool for analyzing network traffic within the Hybris system. Advanced Application Monitoring is vital for administrating and monitoring the he

How to set fix toAdress in Hybris for all email?

If you want to send all emails to some fix  toAddress , in that case, you need to override  email  and  displayName  in respective  *EmailContext  of  renderer template . Let's just assume you want to override  toAddress  in customer registration flow. So here you need to find context class name form Impex. Below are the renderer template for customer registration subject & body and  CustomerEmailContext  is the class name which will feed all data to this renderer. # Email velocity templates INSERT_UPDATE RendererTemplate ; code[unique=true] ; contextClass ; rendererType(code)[default='velocity'] ; powertools_Email_Customer_Registration_Body ; $emailPackageName.CustomerEmailContext ; powertools_Email_Customer_Regist

SAP Hybris deployment architecture

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

SAP Hybris Installation and Deployment Architecture - [Part1]

All references in this post are based on Hybris version 6.6 Hybris datahub server Datahub is nothing but the web application( datahub-webapp-x.x.x.x-RCx.war ), which can be deployed on Tomcat as the normal web application. You don't require to install whole Hybris suite to set up datahub. steps, you set up the basic prerequisites for installing Data Hub steps help you install Data Hub for use with the Hello World tutorial. Solr server By default, Solr server is installed/configured with Hybris suite, which will autostart and stopped with the Hybris platform. If you want to install standalone Solr server on the different sandbox, which can be managed individually then you need to configure below properties on your Hybris platform (server) file. solrserver.instances.default.autostart=true solrserver.instances.default.mode=standalone solrserver.instances.default.hostname=localhost solrserver.instances.default.port=8983