|
Hi friends,
Unable to work with database. Need some reference or Guide to get data from table. I tried lots nothing working for me.
otherwise if some one explain me the below. How it work.
public String getDescription() {
GenericValue product = getProduct();
if (product != null) {
String description = ProductContentWrapper.getProductContentAsText(product, "DESCRIPTION", this.locale, null);
// if the description is null or empty, see if there is an associated virtual product and get the description of that product
if (UtilValidate.isEmpty(description)) {
GenericValue parentProduct = this.getParentProduct();
if (parentProduct != null) {
description = ProductContentWrapper.getProductContentAsText(parentProduct, "DESCRIPTION", this.locale, null);
}
}
if (description == null) {
return "";
} else {
return description;
}
} else {
return null;
}
}
|