function display($tpl = null) { $this->config = JBFactory::getConfig(); $input = JFactory::getApplication()->input; AImporter::model('tour'); $cart = JModelLegacy::getInstance('TourCart', 'bookpro'); $cart->load(); $cart->clear(); $model = new BookProModelTour(); $id = $input->getInt('id'); $this->tour = $model->getComplexItem($id); $this->itineraries = TourHelper::buildItinerary($id); //$this->packages = $packages; $date = TourHelper::getDateFirstInPackagerateFromTourid($this->tour->id); $this->date = JFactory::getDate($date)->format(DateHelper::getConvertDateFormat('P')); $this->tour->rdate = $this->date; $dispatcher = JDispatcher::getInstance(); //$this->_prepareDocument(); // $dispatcher = JDispatcher::getInstance(); // $this->event = new stdClass(); // JPluginHelper::importPlugin('bookpro'); // $results = $dispatcher->trigger('onBookproProductAfterTitle', array ($this->tour)); // $this->event->afterDisplayTitle=isset($results[0])?$results[0]:null; parent::display($tpl); }
<?php /** * @package Bookpro * @author Ngo Van Quan * @link http://joombooking.com * @copyright Copyright (C) 2011 - 2012 Ngo Van Quan * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html * @version $Id$ **/ defined('_JEXEC') or die('Restricted access'); $tour = $displayData; //$startarr = explode(',',JString::trim($tour->start)); $startarr = TourHelper::getDateInPackagerateFromTourid($tour->id); $date = TourHelper::getDateFirstInPackagerateFromTourid($tour->id); $firstdate = JFactory::getDate($date)->format('Y-m'); ?> <div class="responsive-calendar"> <div class="controls"> <a class="pull-left" data-go="prev"><div class="btn"><i class="icon-chevron-left"></i></div></a> <h4><span data-head-year></span> <span data-head-month></span></h4> <a class="pull-right" data-go="next"><div class="btn"><i class="icon-chevron-right"></i></div></a> </div><hr/> <div class="day-headers"> <div class="day header"><?php echo JText::_('MON'); ?> </div> <div class="day header"><?php echo JText::_('TUE'); ?>