Delegator delegator = cart.getDelegator();
String productStoreId = cart.getProductStoreId();
GenericValue productStore = null;
try {
productStore = delegator.findByPrimaryKeyCache("ProductStore", UtilMisc.toMap("productStoreId", productStoreId));
} catch (GenericEntityException e) {
Debug.logError(e, "Error looking up store with id " + productStoreId, module);
}
if (productStore == null) {
Debug.logWarning(UtilProperties.getMessage(resource_error,"OrderNoStoreFoundWithIdNotDoingPromotions", UtilMisc.toMap("productStoreId",productStoreId), cart.getLocale()), module);