use of com.salesmanager.shop.model.shop.ContactForm in project shopizer by shopizer-ecommerce.
the class ContactController method display.
@RequestMapping("/shop/store/contactus.html")
public String display(Model model, HttpServletRequest request, HttpServletResponse response, Locale locale) throws Exception {
MerchantStore store = (MerchantStore) request.getAttribute(Constants.MERCHANT_STORE);
model.addAttribute("googleMapsKey", googleMapsKey);
request.setAttribute(Constants.LINK_CODE, CONTACT_LINK);
Language language = (Language) request.getAttribute("LANGUAGE");
ContactForm contact = new ContactForm();
model.addAttribute("contact", contact);
model.addAttribute("recapatcha_public_key", siteKeyKey);
Content content = contentService.getByCode(Constants.CONTENT_CONTACT_US, store, language);
ContentDescription contentDescription = null;
if (content != null && content.isVisible()) {
contentDescription = content.getDescription();
}
if (contentDescription != null) {
// meta information
PageInformation pageInformation = new PageInformation();
pageInformation.setPageDescription(contentDescription.getMetatagDescription());
pageInformation.setPageKeywords(contentDescription.getMetatagKeywords());
pageInformation.setPageTitle(contentDescription.getTitle());
pageInformation.setPageUrl(contentDescription.getName());
request.setAttribute(Constants.REQUEST_PAGE_INFORMATION, pageInformation);
model.addAttribute("content", contentDescription);
}
/**
* template *
*/
StringBuilder template = new StringBuilder().append(ControllerConstants.Tiles.Content.contactus).append(".").append(store.getStoreTemplate());
return template.toString();
}
Aggregations