4 Replies Latest reply on Dec 10, 2012 6:29 AM by Gopinath Ramasamy

    how to display bundle link items using catalogtools in java file?

      i wrote code for displaying skuid with in bundle

      public class Productdetails extends CatalogServices{
      public String getBundleSkuId(String productId) throws RepositoryException{
                CatalogTools storeCatalogTools = (CatalogTools) getCatalogTools();
                Repository productCatalog = (Repository) storeCatalogTools.getCatalog();
                RepositoryItem productItem = productCatalog.getItem(productId,"product");
                RepositoryItem sku = (RepositoryItem) productItem.getPropertyValue("childSKUs[0]");
           List<RepositoryItem> skubundleList= (List<RepositoryItem>) sku.getPropertyValue("bundleLinks");
                for(RepositoryItem skubundle : skubundleList){
                String id = (String) skubundle.getPropertyValue("id");
                return id;

      I am passing product id to getBundleSkuId method and it will return skuid of the bundle.....

      Productdetails.properties file

      any suggestions for this code... iam notgetting correct output
      Thanks in advance :-)

      Edited by: soumyasriram on Dec 7, 2012 2:21 AM