Skip to content

Tag: sap commerce

Get List Of Populators of a Converter

How to print all populators of a converter? I will share a small groovy script to get list of populators of a converter.

SAP Commerce (Hybris) uses converters to changing models to data object. Data object is kind of DTO. It stores value in the memory, unlike models. Model has a proxy connection with DB, it loads data to memory when it is required. In the facade layer, a model is converted to a data object. View/Controller layer uses the data objects.

Hybris (SAP Commerce) MSSQL How to get database table details in HAC (Administration Console)?

How to get MSSQL table details (attributes) in Hybris Administration Console (HAC) by a basic query. If you don’t have access to DB directly, you can fetch table attributes by this way.

Buy 2 products of the same category, get x% discount on those products

Scenario You want to set a discount if a user buys more than 2 different products in a category. You would like to sell more products of specific categories by offering discounts to users. Accomplishing this is possible in SAP Commerce Hybris by an OOTB (Out of the box) way. If you want to apply a promotion if a user adds 2 amounts of the same products to his cart, see this post. If you are looking for more articles about promotions, check here. Implementation I would like to offer a discount for BALLS category. If the user adds 2 or more balls products, a 10 percent discount will be applied to those products. Go to Backoffice → Marketing → Promotion Rules Create a new Promotion by clicking the ‘+’ button Give a name. Select web site. Set priority as you desired. Select product promotion Add 2 containers Add Qualifying categories to both containers. Add the same category that you want to apply for promotion. In the actions tab, add Percentage discount on partner products. Set containers and numbers as below. Save and publish. Test I added 2 Balls products and 1 product from another category. 10% discount only applied…