form.setSingleCheckout(false);
if (site.getSingleCheckout() == Constants.VALUE_YES) {
form.setSingleCheckout(true);
}
SiteDomainParamBean siteDomainParamBean = (SiteDomainParamBean) Utility.joxUnMarshall(SiteDomainParamBean.class, siteDomain.getSiteDomainLanguage().getSiteDomainParam());
form.setModuleDisplaySize(siteDomainParamBean.getModuleDisplaySize());
form.setMailFromContactUs(siteDomainParamBean.getMailFromContactUs());
form.setMailFromNotification(siteDomainParamBean.getMailFromNotification());
form.setSubjectNotification(siteDomainParamBean.getSubjectNotification());
form.setMailFromPwdReset(siteDomainParamBean.getMailFromPwdReset());
form.setSubjectPwdReset(siteDomainParamBean.getSubjectPwdReset());
form.setMailFromCustSales(siteDomainParamBean.getMailFromCustSales());
form.setSubjectCustSales(siteDomainParamBean.getSubjectCustSales());
form.setMailFromShippingQuote(siteDomainParamBean.getMailFromShippingQuote());
form.setSubjectShippingQuote(siteDomainParamBean.getSubjectShippingQuote());
form.setTemplateFooter(siteDomainParamBean.getTemplateFooter());
form.setCheckoutNotificationEmail(siteDomainParamBean.getCheckoutNotificationEmail());;
form.setCheckoutIncludePickup(false);
form.setCheckoutAllowsShippingQuote(false);
if (siteDomainParamBean.getCheckoutIncludeShippingPickup() != null) {
if (siteDomainParamBean.getCheckoutIncludeShippingPickup().equals(String.valueOf(Constants.VALUE_YES))) {
form.setCheckoutIncludePickup(true);
}
}
if (siteDomainParamBean.getCheckoutAllowsShippingQuote() != null) {
if (siteDomainParamBean.getCheckoutAllowsShippingQuote().equals(String.valueOf(Constants.VALUE_YES))) {
form.setCheckoutAllowsShippingQuote(true);
}
}
form.setCategoryPageSize(siteDomainParamBean.getCategoryPageSize());
form.setPaymentProcessType(siteDomainParamBean.getPaymentProcessType());
form.setBusinessContactName(siteDomainParamBean.getBusinessContactName());
form.setBusinessCompany(siteDomainParamBean.getBusinessCompany());
form.setBusinessAddress1(siteDomainParamBean.getBusinessAddress1());
form.setBusinessAddress2(siteDomainParamBean.getBusinessAddress2());
form.setBusinessCity(siteDomainParamBean.getBusinessCity());
form.setBusinessStateCode(siteDomainParamBean.getBusinessStateCode());
form.setBusinessCountryCode(siteDomainParamBean.getBusinessCountryCode());
form.setBusinessPostalCode(siteDomainParamBean.getBusinessPostalCode());
form.setBusinessPhone(siteDomainParamBean.getBusinessPhone());
form.setBusinessFax(siteDomainParamBean.getBusinessFax());
form.setBusinessEmail(siteDomainParamBean.getBusinessEmail());
form.setCheckoutShoppingCartMessage(siteDomainParamBean.getCheckoutShoppingCartMessage());
if (Format.isNullOrEmpty(form.getCheckoutShoppingCartMessage())) {
form.setCheckoutShoppingCartMessage("");
}
form.setSiteLogoContentType(siteDomain.getSiteDomainLanguage().getSiteLogoContentType());
form.setSiteNameLang(siteDomain.getSiteDomainLanguage().getSiteName());
form.setSiteNameLangFlag(false);
form.setTemplateFooterLang(Format.getNonNullString(siteDomainParamBean.getTemplateFooter()));
form.setTemplateFooterLangFlag(false);
form.setCheckoutShoppingCartMessageLang(Format.getNonNullString(siteDomainParamBean.getCheckoutShoppingCartMessage()));
form.setCheckoutShoppingCartMessageLangFlag(false);
form.setSubjectPwdResetLang(Format.getNonNullString(siteDomainParamBean.getSubjectPwdReset()));
form.setSubjectPwdResetLangFlag(false);
form.setSubjectCustSalesLang(Format.getNonNullString(siteDomainParamBean.getSubjectCustSales()));
form.setSubjectCustSalesLangFlag(false);
form.setSubjectShippingQuoteLang(Format.getNonNullString(siteDomainParamBean.getSubjectShippingQuote()));
form.setSubjectShippingQuoteLangFlag(false);
form.setSubjectNotificationLang(Format.getNonNullString(siteDomainParamBean.getSubjectNotification()));
form.setSubjectNotificationLangFlag(false);
form.setSiteLogoContentTypeLang(Format.getNonNullString(siteDomain.getSiteDomainLanguage().getSiteLogoContentType()));
form.setSiteLogoFlag(false);
form.setDefaultSiteDomainLangId(siteDomain.getSiteDomainLanguage().getSiteDomainLangId().toString());
if (!form.isSiteProfileClassDefault()) {
SiteDomainLanguage siteDomainLanguage = null;
for (SiteDomainLanguage language : siteDomain.getSiteDomainLanguages()) {
if (language.getSiteProfileClass().getSiteProfileClassId().equals(form.getSiteProfileClassId())) {
siteDomainLanguage = language;
break;
}
}
if (siteDomainLanguage == null) {
siteDomainLanguage = new SiteDomainLanguage();
SiteProfileClass siteProfileClass = SiteProfileClassDAO.load(form.getSiteProfileClassId());
siteDomainParamBean = new SiteDomainParamBean();
siteDomainLanguage.setSiteDomainParam(Utility.joxMarshall("SiteDomainParamBean", siteDomainParamBean));
siteDomainLanguage.setSiteProfileClass(siteProfileClass);
siteDomain.getSiteDomainLanguages().add(siteDomainLanguage);
}
form.setSiteDomainLangId(siteDomainLanguage.getSiteDomainLangId().toString());
if (siteDomainLanguage.getSiteName() != null) {
form.setSiteNameLang(siteDomainLanguage.getSiteName());
form.setSiteNameLangFlag(true);
}
if (siteDomainLanguage.getSiteLogoContentType() != null) {
form.setSiteLogoContentTypeLang(siteDomainLanguage.getSiteLogoContentType());
form.setSiteLogoFlag(true);
}
SiteDomainParamBean profileParamBean = (SiteDomainParamBean) Utility.joxUnMarshall(SiteDomainParamBean.class, siteDomainLanguage.getSiteDomainParam());
String value = null;
value = profileParamBean.getTemplateFooter();
if (value != null) {
form.setTemplateFooterLang(value);
form.setTemplateFooterLangFlag(true);
}
value = profileParamBean.getCheckoutShoppingCartMessage();
if (value != null) {
form.setCheckoutShoppingCartMessageLang(value);
form.setCheckoutShoppingCartMessageLangFlag(true);
}
value = profileParamBean.getSubjectPwdReset();
if (value != null) {
form.setSubjectPwdResetLang(value);
form.setSubjectPwdResetLangFlag(true);
}
value = profileParamBean.getSubjectCustSales();
if (value != null) {
form.setSubjectCustSalesLang(value);
form.setSubjectCustSalesLangFlag(true);
}
value = profileParamBean.getSubjectShippingQuote();
if (value != null) {
form.setSubjectShippingQuoteLang(value);
form.setSubjectShippingQuoteLangFlag(true);
}
}