Posts

How to add you custom class in HAC logging list?

Scenario Hybris use  log4j2 logger . We can change the log level for preconfigured classes from the HAC > Platform > Loggin (like root , org.springframework etc.). But what if we want to configure logger for our custom class. Solution Add logger statement in your java class add log4j2 configuration for your custom Java class Restart the Hybris server MyService.Java private static final Logger LOG = Logger.getLogger(MyService.class); LOG.debug("I am debug log"); local.properties \#log4j2 configuration log4j2.rootLogger.level = warn log4j2.logger.myService.name = com.extended.service.impl.MyService log4j2.logger.myService.level = warn log4j2.logger.myService.appenderRef.stdout.ref = STDOUT log4j2.logger.customService.name = com.extended.service.impl.CustomService log4j2.logger.customService.level = warn log4j2.logger.customService.appenderRef.stdout.ref = STDOUT Do you know this also can be done  without restarting Hybris server?

How to Integrate Google Enhanced Ecommerce with Hybris

How to implement Universal Analytics (UA) Enhanced Ecommerce features using Google Tag Manager on a Hybris? We already have successfully implemented Enhanced E-commerce (Integrating Google Analytics) for many of Hybris sites. This will be paid service. contact@helphybris.com

Hybris ERR_TOO_MANY_REDIRECTS with Apache AJP proxy?

Problem statement: We have setup Apache as the reverse proxy using  mod_proxy_ajp . When we access any Product or Category having "+" in their name, we get  ERR_TOO_MANY_REDIRECTS  error. Solution: The way Apache handles "+", causes a redirection loop. You can add "nocanon" to your ajp directives to resolve this. Now you are free to use "+" character in the product name. ... <VirtualHost *:443> ... ProxyPass / ajp://localhost:8009/ nocanon </VirtualHost> ...  Allow slash [will not work with Hybris] If you also want to allow slash "\", then you should configure the proxy server to pass the request URL with no decoded for it. check the below configuration using  AllowEncodedSlashes NoDecode <VirtualHost *:443> ... AllowEncodedSlashes NoDecode ProxyPass / ajp://localhost:8009/ nocanon </VirtualHost> ProxyPass Keywords  nocano

How to remove or update all data records in Hybris?

Scenario 1: I want to remove all the data from the Hybris ItemType. Solution: If you want to remove all records for particular itemType. Then you can do it using HAC Impex import. Open HAC (/hac) Go to console > ImpEx Import Run the below Impex (Change MyItemType with the ItemType for which you want to remove the data) $targetType=MyItemType REMOVE $targetType[batchmode=true];itemtype(code)[unique=true] ;$targetType Scenario 2: Sometimes, you want to remove selected data based on some condition or probably want to run complex SQL query. Then we wish if we could do it by writing SQL query, as many of developers are aware of syntax and its resources are easily available. Solution: Yes, you can do it in Hybris HAC also. Only thing is you should know the appropriate table and attribute/fields names in DB. If you don't, you can always run the select flexible search query and can see generated SQL query. Open HAC (/hac) Go to console > FlexibleSearch Se