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"/>
</map>
</property>
</bean>

<bean class="de.hybris.platform.cockpit.services.search.impl.ConditionTranslatorRegistry.ConditionTranslatorMapping">
<property name="attributeTypes">
<set>
<value>REFERENCE</value>
</set>
</property>
<property name="operatorQualifiers">
<set>
<value>isEmpty</value>
</set>
</property>
<property name="translator" ref="genericQueryConditionTranslator"/>
</bean>

<bean class="de.hybris.platform.cockpit.services.search.impl.ConditionTranslatorRegistry.ConditionTranslatorMapping">
<property name="attributeTypes">
<set>
<value>ENUM</value>
</set>
</property>
<property name="operatorQualifiers">
<set>
<value>in</value>
</set>
</property>
<property name="translator" ref="genericQueryConditionTranslator"/>
</bean>

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>
</conditions>
</property>

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.
DefaultRuleEngineCalculationService
defaultRuleEngineCalculationService
Rule Engine Calculation Service

 

Getting external IP with groovy

URL url = new URL("http://mkysoft.com/ip.php");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
InputStream is = connection.getInputStream();
return org.apache.commons.io.IOUtils.toString(is);

Install hybris temp/trial license

You can reset developer license with initializing. In initialize process all data deleted. You can install temp license without initialize. Use license.bat/license.sh for generating temp license. You can find this script at bin/platform. You need to create temp license by db. We have these options:

  • CPS_MYS = mysql
  • CPS_HDB = hana
  • CPS_ORA = oracle
  • CPS_MSS = mssql
  • CPS_POS = postgres
  • CPS_SQL = ?

For example we create temp license for mysql:
./license.sh -temp CPS_MYS

You will get temp license for 90 day.

You need remove old license after 90 day for new one. You can delete it with below command:
./license.sh -delete SystemID HardwareKey SoftwareProducts

You can get above parameters with below command:
./license.sh -get

— thanks to Yusuf for above information.

Also you can reset trial license with updating user creation time.

UPDATE users set createdTS = NOW()

NOTE: NOW() command for MySql, you must chose relevant command for your database. There is no option running update command on UI, you can develop groovy script for running this command over jdbc.

Enum tipindeki alanlar için varsayılan değer atamak

 
<enumtypes>
    <enumtype code="MyEnum" generate="true" autocreate="true">
        <value code="MyValue1" />
        <value code="MyValue2"/>
    </enumtype>
</enumtypes>

<itemtype code="MyItem" extends="BaseItem" autocreate="true" generate="true" jaloclass="de.hybris.platform.warehousing.jalo.MyItem">
    <attributes>
        <attribute type="MyEnum" qualifier="myAttribute">
            <modifiers optional="false" />
            <defaultvalue>em().getEnumerationValue("MyItem", "MyValue1")</defaultvalue>
            <description>My attribute.</description>
            <persistence type="property" />
        </attribute>
    </attributes>
</itemtype>