How Do You Increase the Database Column Length For An Itemtype Attribute?

In SAP Hybris Commerce 6.x, the default database column length for an Itemtype Attribute String type is 255 characters.  A client recently asked to increase the database column length for the Orders table P_NAME column from the default 255 variable characters length to 500 variable characters length. In this tutorial, I will show you how to properly increase the database column in SAP Hybris Commerce. For this tutorial, I'm using the default Hybris database, HSQLDB. Open the <Your Hybris DIR>/ext/core/resources/core-items.xmll file using your preferred text file editor. Once the core-items.xml file is open, find the attribute qualifier="name" under AbstractOrder itemtype node. For …

What's New in Search and Navigation in SAP Hybris Commerce 6.6?

On December 14, 2017, SAP announced the release of Hybris Commerce 6.6. This release is packed with a number of useful features. In this article, we will focus on the new capabilities in Search and Navigation introduced in SAP Hybris Commerce 6.6. New Search and Navigation Features Introduced in Hybris Commerce 6.6 Enhanced Search Sxperience with Personalization In Hybris Commerce 6.6, Backoffice administrators may easily customize the search experience for targeted groups of customers. In the screenshot below, the Hybris Backoffice administrator created a new Solr Boost rule that boosts the Burton search keyword by 1.40, which will place all Burton products …

How Do I Validate Outbound Connections to Third Party E-Commerce Solutions Without SSH Access?

I recently worked on a Hybris Commerce implementation where the DevOps role was managed by an external, cloud service provider.  In this externally managed DevOps situation, the Hybris development team were prevented from accessing the production Linux servers directly, and only the external DevOps team had direct access to the production servers. Sound familiar? This Hybris implementation, like most Hybris implementations, included third-party integrations to payment and tax web services. Each third-party integration's IP address or domain had to be whitelisted by the external DevOps team before the Hybris Commerce platform was able to connect with the third-party service successfully. On-premise services also had to …

How Do I Programmatically Display Base Products That Have Variant Products in Hybris Commerce?

This tutorial provides step by step instructions how to display base products that have variant products using Groovy. Step by Step Instructions 1. Goto to HAC in your Web browser. (If Hybris is running on your local machine, type https://localhost:9002/ in your Web browser URL) 2. Type your user name and password once HAC is displayed. (The following screenshot displays the HAC login page with username and password provided) 3. Once you've logged in successfully, click on Console -> Scripting Languages 4.  Copy and paste the following code into the Console window: import de.hybris.platform.servicelayer.search.FlexibleSearchService import de.hybris.platform.servicelayer.search.SearchResult; import de.hybris.platform.core.model.product.ProductModel import de.hybris.platform.variants.model.VariantProductModel; Map<String, Object> params …

How Can Learning Groovy Improve Your Hybris Commerce Knowledge?

If you are serious about learning SAP Hybris Commerce, you must learn the fundamentals of the Groovy scripting language.  Groovy is an integral part of Hybris, and it will accelerate your Hybris Commerce development and testing efforts. For example, let's say you know nothing about the Hybris Stock or Warehouse Services. How would you learn more about these Hybris Services? Answer: Use Groovy to expedite your learning of these important services.  With this tutorial, I will show you how to retrieve a single product's stock level from a particular warehouse using Groovy. Prerequisites The BaseCommerce and ElectronicsStore extensions and their essential …

How Do I Display a List of Available Catalogs in Hybris Commerce?

This tutorial will provide step by step instructions to display a list of available catalogs in your Hybris Commerce implementation. Step by Step Instructions 1. Goto to HAC in your Web browser. (If Hybris is running on your local machine, type https://localhost:9002/ in your Web browser URL) 2. Type your user name and password once HAC is displayed. (The following screenshot displays the HAC login page with username and password provided) 3. Once you've logged in successfully, click on Console -> Scripting Languages 4.  Copy and paste the following code into the Console window: import de.hybris.platform.catalog.CatalogService; import de.hybris.platform.core.Registry; import de.hybris.platform.catalog.model.CatalogModel; CatalogService …

How Do You Decide Whether a Product Attribute Should Use the Classification System Instead of the Type System?

Here are few helpful pointers: The product attribute is not used in the business logic The product attribute is used only in a limited or select number of products The product attribute’s longevity is unknown, and it may become unnecessary in a matter of a few months or less The product attribute will be added dynamically at run-time The product attribute is a display property and does not have any reporting requirements

How Do I Set Foreign Exchange Rates Using an Impex Script?

  # Currencies $usaCurrency=USD $ukCurrency=GBP $audCurrency=AUD $europeCurrency=EUR $chinaCurrency=CNY $canadaCurrency=CAD $norwayCurrency=NOK $swedenCurrency=SEK # Currencies INSERT_UPDATE Currency ;isocode[unique=true] ;conversion ;$usaCurrency ;1 ;$ukCurrency ;0.75 ;$audCurrency ;1.26 ;$europeCurrency ;0.85 ;$chinaCurrency ;6.59 ;$canadaCurrency ;1.25 ;$norwayCurrency ;7.89 ;$swedenCurrency ;8.10 The foreign exchange rates are stored in the Currency item type Conversion attribute.  In practice, you would create a Cron Job to update the foreign exchange rates in Hybris Commerce as often as required to effectively run your business.