Posts

How to Add a New Navigation Node and Page in SAP Commerce (Hybris).

Image
Beside of "My Coupons" Navigation Node I want to create My Test Node ,then link it to new custom My Test Page Step 1 : Identitfy the Parent Node is MyAccountNavNode Take reference from location: /customercouponaddon/resources/customercouponaddon/import/contentCatalogs/electronicsContentCatalog/cms-responsive-content.impex (or) /customerinterestsaddon/resources/customerinterestsaddon/import/contentCatalogs/electronicsContentCatalog/cms-content.impex Step 2: Create a CMS Link Component because the CMS Link Component represents a clickable link on the storefront. $contentCatalog = electronicsContentCatalog $contentCV =catalogVersion(CatalogVersion.catalog(Catalog.id[default= $contentCatalog ]),CatalogVersion.version[default=Staged])[default= $contentCatalog :Staged] INSERT_UPDATE CMSLinkComponent ; $contentCV [ unique = true ] ; uid[ unique = true ] ; name ; url ; &linkRef ; target(code)[default= 'sameWindow' ] ...

POST OCC(WebServices) API for Creating B2C Store Details in Sap Commerce(Hybris) 2211

Image
Step 1: Create the b2CStoreDetails method in the SampleB2CStoreController . This method defines an endpoint to create new B2C Store details.It Receives the request and passes the store data to the facade. Location: /sampleocc/src/com/hybris/occ/controllers/SampleB2CStoreController.java Note: I'm adding the b2CStoreDetails method in SampleB2CStoreController of Step 14 in OCC Webservices in SAP Commerce (Hybris) 2211 – Part 2 import java.util.ArrayList; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.http.ResponseEntity; import com.hybris.simple.facades.B2CStoreData; import com.hybris.simple.facades.B2CStoreDataList; import com.hybris.simple.facades.B2CStoreDataListWSDTO; import com.hybris.simple.facades.B2CStoreDataWSDTO; @Controller @RequestMapping (value = "/{baseSiteId}") public cl...

Advanced Configurations of OCC Webservices in SAP Commerce 2211 Using YOCC Template – Part 2

Image
Go to Part 1 OCC: OCC Webservices in SAP Commerce (Hybris) 2211 – Part 1 Step 11: In this step, you are adding a bean definition for B2CStoreDataList in samplefacades-beans.xml This bean will hold a list of B2CStoreData objects, which are returned by passing a storeId . Location: /samplefacades/resources/samplefacades-beans.xml < bean class =" com.hybris.simple.facades.B2CStoreDataList "> < property name =" b2cstore " type =" java.util.List<com.hybris.simple.facades.B2CStoreData> " /> </ bean > Step 12: In this step, we will create the B2CStorePopulator to map data from the SampleB2CStoreModel to B2CStoreData . Location: /samplefacades/src/com/hybris/simple/facades/populators/B2CStorePopulator.java import de.hybris.platform.converters.Populator; import de.hybris.platform.servicelayer.dto.converter.ConversionException; import com.hybris.simple.core.model.SampleB2CStoreModel ; import com...

OCC Webservices in SAP Commerce(hybris) 2211 using YOCC template – Part 1

Omnichannel Commerce Connect(OCC), which is a RESTful web services framework provided by SAP Commerce (Hybris).We can expose sap commerce(hybris) apis to external systems. Requirement : Create a custom OCC endpoint that retrieves detailed store information based on the storeId Step 1: Run the following command ant extgen to create a new OCC extension in platform Select Yocc template ,give name of your extension like sampleocc and package like com.hybris.occ Note: Remove or comment yocc extension ,add your custom occ extension in localextensions.xml and do ant clean all Step 2: Create SampleB2CStore an item type with attributes like storeId,storeName,storeLocation,storeOwner,storeGstNumber in samplecore-items.xml < itemtype code = "SampleB2CStore" autocreate = "true" generate = "true" > < deployment table = "SampleStore" typecode = "15786" /> < attributes > < attribute qualifi...

Backoffice Customizations in SAP Commerce: Explorer Tree, Search, List View ,Label & Wizard

Image
When to create new navigation node in backoffice a)When we want to access an item-type very frequently because Business User will not be more technical guy to open type node and search for particular node. b)For Navigation Nodes we can specific access restrictions through roles. Example:- If we mention principal=" backofficeadministratorrole " for our new node , Only those specific users with this current role can see and access the Node in Backoffice. This ensure only authorized users can see and access the node. Step 1: Create SampleB2CStore item type with attributes like storeId,storeName,storeLocation,storeOwner,storeGstNumber in samplecore-items.xml < itemtype code = "SampleB2CStore" autocreate = "true" generate = "true" > < deployment table = "SampleStore" typecode = "15786" /> < attributes > < attribute qualifier = "storeId" type = "java.lang.String...