Reload cockpit xml configurations

When you make change on product cockpit list, editor, advanced search, base, etc you need to reload configuration xml files to system. Below BeanShell code do this.

import de.hybris.platform.core.initialization.SystemSetupContext;
import de.hybris.platform.core.initialization.SystemSetup;
import de.hybris.platform.core.Registry;
SystemSetupContext setupCtx = new SystemSetupContext(new HashMap(), SystemSetup.Type.PROJECT, "mycustomcockpits");


Log SQL queries which are created with flex

You can add below properties to your file.

log4j2.config.xml= = de.hybris.platform.jalo.flexiblesearch
log4j2.logger.flexible-search.level = debug
log4j2.logger.flexible-search.appenderRef.stdout.ref = STDOUT

After configuration you can manage log level in hac.

Adding isempty and in for enum operator for productcockpit

Below configuration adding isEmpty operator for REFERENCE type and in operator for ENUM.

<bean id="editorConditionConfiguration" parent="myCockpitEditorConditionConfiguration" scope="tenant"/>

<bean id="myCockpitEditorConditionConfiguration" parent="defaultEditorConditionConfiguration" scope="tenant"
class="de.hybris.platform.cockpit.model.advancedsearch.config.impl.DefaultEditorConditionConfiguration" abstract="true">
<property name="defaultConditionsMap">
<map merge="true">
<entry key="REFERENCE" value="isEmpty"/>
<entry key="ENUM" value="in"/>

<bean class="">
<property name="attributeTypes">
<property name="operatorQualifiers">
<property name="translator" ref="genericQueryConditionTranslator"/>

<bean class="">
<property name="attributeTypes">
<property name="operatorQualifiers">
<property name="translator" ref="genericQueryConditionTranslator"/>

You need to add this operator to your referenced property with below code in your advanced search configuration (advancedSearch_VariantProduct.xml).

<property qualifier="product.galleryImages" visible="false">
<conditions mode="append">
<condition operator="isEmpty"></condition>

Known hybris services

Service Bean Module Description
TimeService defaultTimeService core Get time information from system with timeoffset configuration.
InventoryEventService defaultInventoryEventService warehouse
GuidKeyGenerator guidKeyGenerator  Guid generator
CronJobService cronJobService  Cron job operations
DefaultConfigurationService defaultConfigurationService Configuration service
DefaultCartService Cart operations
DefaultCommerceSaveCartService Manage multiple cart, check configuration for it.
Rule Engine Calculation Service


Getting external IP with groovy

URL url = new URL("");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
InputStream is = connection.getInputStream();

Update all items with impex

We canuse bactcmode for updating all items by type

UPDATE Product[batchmode=true];itemType(code)[unique=true];description[en][default='test']

Copy schema to another in Hana DB

You can get workfolder at backup console. Get destination folder and change backup as work for example.

export "SOURCESCHEMA"."*" as binary into '/workfolder' with replace threads 10;
import "SOURCESCHEMA"."*" as binary from '/workfolder' with rename schema "SOURCESCHEMA" to "TARGETSCHEMA";

If you get privilege error like “SAP DBTech JDBC: [258]: insufficient privilege: Not authorized”, edit your user at Security menu and add EXPORT/IMPORT System Privileges.