Posts

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 ; "helpdesk@gmail.com" ; "Customer Services Team" ; ; DeliverySentEmail ; "contact@gmail.com" ; "Customer Support Team" ; ; ForgottenPasswordEmail ; "test@gmail.com" ; "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 de.hybris.platform.servicelayer.search.FlexibleSearchQuery; flexibleSearchService = spring.getBean("flexibleSearchService") modelService = spring.getBean("modelService") def findProductWithSameName() { query = """ select MIN({p.pk}) 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"""; flexibleSearchService.search(query).result; } findProductWithSameName().each { println it.code; //modelService.remove(it); } 2. Test Remove script import de.hybris.platform.servicelayer.search.FlexibleS

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