/** * Processes the input, e.g. store given values. * A view must be available and this method doesn't generate any output * besides setting view variables. */ public function process() { $context = $this->getContext(); $view = $this->getView(); try { $site = $context->getLocale()->getSite()->getCode(); $params = $this->getClientParams($view->param()); $context->getSession()->set('aimeos/catalog/detail/params/last' . $site, $params); parent::process(); } catch (\Aimeos\Client\Html\Exception $e) { $error = array($context->getI18n()->dt('client', $e->getMessage())); $view->detailErrorList = $view->get('detailErrorList', array()) + $error; } catch (\Aimeos\Controller\Frontend\Exception $e) { $error = array($context->getI18n()->dt('controller/frontend', $e->getMessage())); $view->detailErrorList = $view->get('detailErrorList', array()) + $error; } catch (\Aimeos\MShop\Exception $e) { $error = array($context->getI18n()->dt('mshop', $e->getMessage())); $view->detailErrorList = $view->get('detailErrorList', array()) + $error; } catch (\Exception $e) { $context->getLogger()->log($e->getMessage() . PHP_EOL . $e->getTraceAsString()); $error = array($context->getI18n()->dt('client', 'A non-recoverable error occured')); $view->detailErrorList = $view->get('detailErrorList', array()) + $error; } }
/** * Modifies the cached body content to replace content based on sessions or cookies. * * @param string $content Cached content * @param string $uid Unique identifier for the output if the content is placed more than once on the same page * @return string Modified body content */ public function modifyBody($content, $uid) { $content = parent::modifyBody($content, $uid); return $this->replaceSection($content, $this->getView()->csrf()->formfield(), 'catalog.lists.items.csrf'); }