Below example getting order status text.
select {code}, {enumerationvalue:code} from {order join enumerationvalue on {order:status} = {enumerationvalue:pk}}
DANGER!!!
In hybris hac, you cannot run DDL (data definition language) commands. You need unprotected connection to db. You can use below groovy example. Attention: DDL commands are dangerous!!!
import java.util.List; import javax.sql.DataSource; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DriverManagerDataSource; def config = spring.getBean("configurationService").getConfiguration(); DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(config.getString("db.driver")); dataSource.setUrl(config.getString("db.url")); dataSource.setUsername(config.getString("db.username")); dataSource.setPassword(config.getString("db.password")); JdbcTemplate jdbc = new JdbcTemplate(dataSource) jdbc.execute("ALTER TABLE MYTABLE ALTER (P_MYFIELD BIGINT)");
Below example logging flexiblesearch class to separate file with time based trigger policy. Also we can add rollover strategy for removing old files.
log4j2.appender.FlexlogAppender.type=RollingFile log4j2.appender.FlexlogAppender.name=FlexlogAppender log4j2.appender.FlexlogAppender.fileName=${HYBRIS_LOG_DIR}/Flexlog.log log4j2.appender.FlexlogAppender.filePattern=${HYBRIS_LOG_DIR}/Flexlog.log-%d{yyyy-MM-dd}.log log4j2.appender.FlexlogAppender.ImmediateFlush=true log4j2.appender.FlexlogAppender.layout.type=PatternLayout log4j2.appender.FlexlogAppender.layout.pattern=%m%n log4j2.appender.FlexlogAppender.policies.type = Policies log4j2.appender.FlexlogAppender.policies.time.type = TimeBasedTriggeringPolicy log4j2.appender.FlexlogAppender.policies.time.interval = 1000000 log4j2.appender.FlexlogAppender.policies.time.modulate = true log4j2.logger.flexible.name = de.hybris.platform.jalo.flexiblesearch log4j2.logger.flexible.level = DEBUG log4j2.logger.flexible.appenderRef.stdout.ref = FlexlogAppender log4j2.logger.flexible.additivity = false
You can find great documentation for installing SAP Netware ABAP 7.51 SP02 at Julie blog post. I didn’t use shared OS because of huge disk/ram usage.
Install nano, vim, etc with yum.
yum install nano
You can open multiple terminal and make copy paste with ssh to your server.
nano /etc/ssh/sshd_config
Remove # for uncomment line “PermitRootLogin yes” or add it if missing.
service sshd restart
You need to open a lot of port for SAP Netware in firewall. You can disable firewall instead of configuring it.
service firewalld stop
systemctl disable firewalld
SAP Netware using uuidd library for generating GUID, install it.
yum install uuidd
SAP Netware using sch command in installation step, install it.
yum install tcsh
Install open-vm-tools.
yum install open-vm-tools
You can find vmware tools in VMWare Virtual Machine menu as Install VMware Tools. Then you can check /mnt folder for CD which including tools. Copy it to your temp.
cp VMwareTools-10.x.tar.gz /tmp
tar -zxvf VMwareTools-10.x.tar.gz
Install python for tools installer.
yum install python
Change directory to extracted folder then run tools installer.
phyton install vmware-install.pl
Start installation script with below arguments.
./install.sh -g -s
Strategy | Abstract | Interface | Description |
DefaultCommerceCloneSavedCartStrategy | Clone cart. | ||
DefaultCloneAbstractOrderStrategy | Clone order. | ||
DefaultCommerceAddToCartStrategy | CommerceAddToCartStrategy | Adding product to cart. | |
DefaultCommerceUpdateCartEntryStrategy | |||
DefaultCartValidationStrategy | |||
DefaultMultiCodeCouponRedemptionStrategy | CouponRedemptionStrategy<> | Single code coupon redemption. | |
DefaultSingleCodeCouponRedemptionStrategy | CouponRedemptionStrategy<> | Multi code coupon redemption. | |
DefaultCommercePlaceOrderStrategy | |||
CommerceStockLevelStatusStrategy | |||
AbstractFacetSearchStrategy | |||
KeyStrategy | Cache key strategy. | ||
AbstractCheckoutFlowStrategy | |||
FindPaymentCostStrategy | |||
AbstractCancelDenialStrategy | OrderCancelDenialStrategy | ||
AutoLoginStrategy | |||
GUIDCookieStrategy | |||
DefaultCreateOrderFromCartStrategy | |||
DefaultCommerceCartMergingStrategy | |||
AbstractCheckoutFlowStrategy | |||
TicketOrdersAssociationStrategy | |||
AbstractCheckoutFlowStrategy | |||
DefaultRedirectStrategy | |||
DefaultBaseStoreSelectorStrategy | BaseStoreSelectorStrategy |
Some times you need attribute type change in hybris. Hybris as own ORM and it is not support updating attribute type. If you change attribute type you will get error like this:
de.hybris.platform.servicelayer.exceptions.ModelSavingException: <########## NewPropError ##########> value type mismatch in unlocalized property ‘myproperty’ of ‘myitem’ : expected ‘class java.lang.Integer’ but got ‘class java.lang.Long’
If you don’t want to adding new field than migrating data and removing old, you can use below procedure.
I am trying to list hybris configurations. These parameters are using in properties files (local.properties, project.properties, tenant_cutom.properties). I will update this list with new ones.
(more…)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"); Registry.getApplicationContext().getBean("cockpitImportConfig").importCockpitConfig(setupCtx);