Posts

Showing posts from November, 2024

CronExpression in Sap Commerce(Hybris)

Image
What is CronExpression 1. The technology is constantly changing day by day. Sometimes, we are required to execute a job periodically on the server. 2. Running the job on the server manually is a difficult task so, it cannot be done multiple times by the user or administrator, so we use Cron expression. 3. A Cron expression is a string or expression consisting of 6 or 7 fields (time unit) where each field separated by white space. 4. The most common cron expressions consisting of 7 fields, denoting the various unit of time, is specified below. From the 7 fields, the first 6 are mandatory, whereas, the last field ( <year> ) is optional. Fields of CronExpression: <seconds> <minutes> <hours> <day-of-month> <month> <day-of-week> <year> In Cron expressions, time unit is known as field.These are separated by white space, can contain any of the allowed values with various combinations of the allowed character...

Need of Initial Modifier in SAP Commerce(Hybris) Cloud 2211

Image
Initial Modifer in item-type is important because it allows us to control over the behaviour of fields during life cycle of item(like in creation time). In this Post we are going to explore initial modifier in detail. What is the initial Modifier Attribute : initial If 'true', the attribute will only be writable during the item creation. Setting this to 'true' is only useful in combination with write='false'. Default is 'false'. Data Type : boolean Enumerated Values : - true - false When we should go for initial=true Attributes like unique codes or Ids which should never be change/modify after being creation. Note : This initial=true Modifier will work with combination of write="false" ,then only the field is immutable after the item is created initial="true" it specifies the attribute can be set only onces,during creation of item type after item is created ,its cannot be modified write="false" it specif...

How to Create Custom Site using WCMS in SAP Commerce(Hybris) 2211

Image
Step1: Create Content Catalog in catalog.impex Note: Take reference from /electronicsstore/resources/electronicsstore/import/coredata/contentCatalogs/electronicsContentCatalog/catalog.impex Step 2: Update content catalog name in catalog_en.impex Note: Take reference from /electronicsstore/resources/electronicsstore/import/coredata/contentCatalogs/electronicsContentCatalog/catalog_en.impex Step 3: Create Product Catalog and classification Note: Take reference from /electronicsstore/resources/electronicsstore/import/coredata/productCatalogs/electronicsProductCatalog/catalog.impex Run Both Staged and Online Version Step 4: Update name of product catalog and product classification Note: Take reference from /electronicsstore/resources/electronicsstore/import/coredata/productCatalogs/electronicsProductCatalog/catalog_en.impex Step 5: Create Base Store Note: Take reference from /electronicsstore/resources/electronicsstore/import/coredata/stores/electronics/stor...

Customizing the B2C Accelerator to Support both B2B and B2C storefronts

Image
In my previous blog after initialize and build we got ootb b2b and b2c two storefronts yacceleratorstorefront,yb2bacceleratorstorefront but if we want to do any customization we cannot do directly in those extensions its not a good practice So we need to create our own custom extensions Step 1: Remove yb2bacceleratorstorefront from localextensions.xml file and custom folder. Because if we run ant modulegen directly ,build get fails we get below error so to solve this follow step1 Step 2: Run ant modulegen command in platform Please select the template(default template : accelerator),enter name sample ,enter package com.hybris.sample Step 3: After Build Sucessful Add the new custom extensions and comment/remove yaccelerator* extensions in the localextensions.xml file as mentioned below Save it and do ant clean all in platform Step 4: Build got failed because duplication ConsignmentProcess.done attribute in yaccelerator...