当前位置: 首页>>代码示例>>PHP>>正文


PHP ModuleFrontController::display方法代码示例

本文整理汇总了PHP中ModuleFrontController::display方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleFrontController::display方法的具体用法?PHP ModuleFrontController::display怎么用?PHP ModuleFrontController::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ModuleFrontController的用法示例。


在下文中一共展示了ModuleFrontController::display方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 /**
  * Displays order confirmation page.
  */
 public function display()
 {
     $cart = $this->context->cart;
     $this->context->smarty->assign(array('order_total' => $cart->getOrderTotal(true, Cart::BOTH), 'is_empty' => $cart->nbProducts() == 0));
     $this->setTemplate('confirmation.tpl');
     parent::display();
 }
开发者ID:payneteasy,项目名称:php-plugin-prestashop,代码行数:10,代码来源:confirmation.php

示例2: displayTechnicalError

 /**
  * Displays message about occured technical error.
  *
  * @param       Exception       $ex     Error cause.
  */
 protected function displayTechnicalError(Exception $ex)
 {
     PrestaShopLogger::addLog((string) $ex, 50);
     $this->context->smarty->assign('error_message', $this->module->l('Technical error occured'));
     if ($this->context->customer->is_guest) {
         $this->context->smarty->assign(array('reference_order' => $this->module->currentOrderReference, 'email' => $this->context->customer->email));
         /* If guest we clear the cookie for security reason */
         $this->context->customer->mylogout();
     }
     $this->setTemplate('payment_error.tpl');
     parent::display();
 }
开发者ID:payneteasy,项目名称:php-plugin-prestashop,代码行数:17,代码来源:startsale.php

示例3: display

 /**
  * @see FrontController::initContent()
  */
 public function display()
 {
     if (!is_dir(_PS_ROOT_DIR_ . '/cache/' . $this->_nameModule)) {
         mkdir(_PS_ROOT_DIR_ . '/cache/' . $this->_nameModule, 0755);
     }
     $id_group = Tools::getValue('id_group');
     $id_lang = $this->context->language->id;
     //preview group
     if ($id_group) {
         $group = $this->getSliderGroupByID($id_group);
         if (!Tools::getValue('id_slider') && !Tools::getValue('preview')) {
             $sliders = $this->getSlides($id_group, $id_lang, 1);
         }
     }
     $id_slider = Tools::getValue('id_slide');
     if ($id_slider && !Tools::getValue('preview')) {
         $sliders = $this->getSlide($id_slider, $id_lang);
     }
     if (Tools::getValue('preview')) {
         $slider_preview_data = trim(html_entity_decode(Tools::getValue('slider_preview_data')));
         $slider_preview_data = Tools::jsonDecode($slider_preview_data);
         foreach ($slider_preview_data as $key => $val) {
             $sliders[0][$key] = $val;
         }
         $tmpSlider = array();
         $tmpSlider = $sliders[0]['params'];
         $sliders[0]['params'] = array();
         foreach ($tmpSlider as $key => $val) {
             $sliders[0]['params'][$key] = $val;
         }
         $tmpSlider = $sliders[0]['video'];
         $sliders[0]['video'] = array();
         foreach ($tmpSlider as $key => $val) {
             $sliders[0]['video'][$key] = $val;
         }
         $tmpSlider = $sliders[0]['layers'];
         $sliders[0]['layers'] = array();
         foreach ($tmpSlider as $key => $val) {
             foreach ($val as $k => $v) {
                 $sliders[0]['layersparams'][$key][$k] = $v;
             }
         }
     }
     if (!isset($group) || !$group) {
         return false;
     }
     if (!$sliders) {
         return false;
     }
     $sliderObj = new LeoSliderLayer();
     $groupData = $sliderObj->groupData;
     $this->_sliderData = $sliderObj->_sliderData;
     $sliderParams = Tools::jsonDecode(SliderLayer::base64Decode($group['params']), true);
     $sliderParams = array_merge($groupData, $sliderParams);
     if (isset($sliderParams['fullwidth']) && (!empty($sliderParams['fullwidth']) || $sliderParams['fullwidth'] == 'boxed')) {
         $sliderParams['image_cropping'] = false;
     }
     $sliderParams['hide_navigator_after'] = $sliderParams['show_navigator'] ? 0 : $sliderParams['hide_navigator_after'];
     $sliderParams['slider_class'] = trim(isset($sliderParams['fullwidth']) && !empty($sliderParams['fullwidth']) ? $sliderParams['fullwidth'] : 'boxed');
     $sliderFullwidth = $sliderParams['slider_class'] == 'boxed' ? 'off' : 'on';
     //generate back-ground
     if ($sliderParams['background_image']) {
         $sliderParams['background'] = 'background: url(' . __PS_BASE_URI__ . 'modules/' . $this->_nameModule . '/images/' . $sliderParams['background_url'] . ') no-repeat scroll left 0 ' . $sliderParams['background_color'] . ';';
     } else {
         $sliderParams['background'] = 'background-color:' . $sliderParams['background_color'];
     }
     //include library genimage
     if (!class_exists('PhpThumbFactory')) {
         require_once _PS_MODULE_DIR_ . 'leosliderlayer/libs/phpthumb/ThumbLib.inc.php';
     }
     //echo "<pre>";print_r($sliders);die;
     //process slider
     foreach ($sliders as $key => $slider) {
         if (!Tools::getValue('preview')) {
             $slider['layers'] = array();
             $slider['params'] = array_merge($this->_sliderData, Tools::jsonDecode(SliderLayer::base64Decode($slider['params']), true));
             $slider['layersparams'] = Tools::jsonDecode(SliderLayer::base64Decode($slider['layersparams']), true);
             $slider['video'] = Tools::jsonDecode(SliderLayer::base64Decode($slider['video']), true);
         }
         $slider['data_link'] = '';
         if ($slider['params']['enable_link'] && $slider['link']) {
             $slider['data_link'] = 'data-link="' . $slider['link'] . '"';
             $slider['data_target'] = 'data-target="' . SliderLayer::renderTarget($slider['params']['target']) . '"';
         } else {
             $slider['data_target'] = '';
         }
         $slider['data_delay'] = $slider['params']['delay'] ? 'data-delay="' . (int) $slider['params']['delay'] . '"' : '';
         //videoURL
         $slider['videoURL'] = '';
         if ($slider['video']['usevideo'] == 'youtube' || $slider['video']['usevideo'] == 'vimeo') {
             $slider['videoURL'] = 'http://player.vimeo.com/video/' . $slider['video']['videoid'] . '/';
             if ($slider['video']['usevideo'] == 'youtube') {
                 $slider['videoURL'] = 'http://www.youtube.com/embed/' . $slider['video']['videoid'] . '/';
             }
         }
         $slider['background_color'] = '';
         if (isset($slider['video']['background_color']) && $slider['video']['background_color']) {
//.........这里部分代码省略.........
开发者ID:ahmedonee,项目名称:morinella,代码行数:101,代码来源:preview.php

示例4: displayError

 /**
  * Displays message about occured error.
  *
  * @param       string      $message        Error message.
  */
 protected function displayError($message = 'Technical error occured')
 {
     PrestaShopLogger::addLog('Callback data: ' . print_r($_REQUEST, true), 4);
     $this->context->smarty->assign('error_message', $this->module->l($message));
     if ($this->context->customer->is_guest) {
         $this->context->smarty->assign(array('id_order' => $this->module->currentOrder, 'reference_order' => $this->module->currentOrderReference, 'id_order_formatted' => sprintf('#%06d', $this->module->currentOrder), 'email' => $this->context->customer->email));
         /* If guest we clear the cookie for security reason */
         $this->context->customer->mylogout();
     }
     $this->setTemplate('payment_error.tpl');
     parent::display();
 }
开发者ID:payneteasy,项目名称:php-plugin-prestashop,代码行数:17,代码来源:finishsale.php


注:本文中的ModuleFrontController::display方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。