// get the selectable features for the variant
List productFeatureAndAppls = variant.getRelated("ProductFeatureAndAppl", UtilMisc.toMap("productFeatureTypeId", productFeatureTypeId, "productFeatureApplTypeId", "STANDARD_FEATURE"), null);
Iterator productFeatureAndApplIter = productFeatureAndAppls.iterator();
while (productFeatureAndApplIter.hasNext()) {
GenericValue productFeatureAndAppl = (GenericValue) productFeatureAndApplIter.next();
GenericPK productFeatureApplPK = delegator.makePK("ProductFeatureAppl", null);
productFeatureApplPK.setPKFields(productFeatureAndAppl);
delegator.removeByPrimaryKey(productFeatureApplPK);
}
}
List productFeatureAndAppls = product.getRelated("ProductFeatureAndAppl", UtilMisc.toMap("productFeatureTypeId", productFeatureTypeId, "productFeatureApplTypeId", "SELECTABLE_FEATURE"), null);