This discussion is archived
4 Replies Latest reply: Dec 9, 2012 10:29 PM by GopinathRamasamy RSS

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

soumyasriram Newbie
Currently Being Moderated
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..... file

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

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


  • Correct Answers - 10 points
  • Helpful Answers - 5 points