コード例 #1
0
<?php

defined('_JEXEC') or die('Restricted access');
AImporter::model('addons');
AImporter::helper('bookpro');
$params = json_decode($this->tour->tour->params);
$model = new BookProModeladdons();
$addons = $model->getDataByIds($params->addon);
?>
<script type="text/javascript">

jQuery(document).ready(function($){	
    jQuery(".addonClick").click(function(){
           	var addon= new Array();
           	  $('.addonClick').each(function(){
           			if(jQuery(this).is(':checked')){
           				addon.push(jQuery(this).val());
	           		}
	          });
	          
     		  jQuery.ajax({
  				type : "POST",
  				 url: 'index.php?option=com_bookpro&controller=tour&task=ajaxcaculateaddon', 
  				data : {  					
  					addon:	addon,
  				},
				beforeSend : function() {
					$("#cart_total").html('...');
				},			  				
  				success : function(result) {	
  					$("#cart_total").html(result);	
コード例 #2
0
    if (!empty($service)) {
        $check = true;
    }
}
if ($this->cart->filter['roundtrip']) {
    $service_return = json_decode($this->trips['return']->params);
    foreach ($service_return as $service) {
        if (!empty($service)) {
            $check = true;
        }
    }
}
if (!$check) {
    return;
}
$model = new BookProModeladdons();
?>
<script type="text/javascript">

jQuery(document).ready(function($){	
    jQuery(".addonClick").click(function(){
           var addon= new Array();
           	  $('.addonClick').each(function(){
           			if(jQuery(this).is(':checked')){
           				addon.push(jQuery(this).val());
	           		}
	          });
	          
     		  jQuery.ajax({
  				type : "POST",
  				 url: 'index.php?option=com_bookpro&controller=transport&task=ajaxcaculateaddon', 
コード例 #3
0
    ?>
				<div class="row-fluid">
	  				<div class="span5">
	  				  <?php 
    $layout = new JLayoutFile('calendar', $basePath = JPATH_ROOT . '/components/com_bookpro/layouts');
    $html = $layout->render($this->tour);
    echo $html;
    ?>
					</div>
					<div class="span7">
							<span id="tourpackagefordate">
							</span>	
							
								<?php 
    AImporter::model('addons');
    $model = new BookProModeladdons();
    if ($this->tour->addon) {
        $addons = $model->getDataByIds($this->tour->addon);
    }
    $html_addon = null;
    if (count($addons) > 0) {
        foreach ($addons as $key => $addon) {
            $checked = $addon->params ? json_decode($addon->params)->type : null;
            if ($checked == 1) {
                $html_addon .= "<li>" . $addon->title . '-' . JText::sprintf('COM_BOOKPRO_PRICE_TXT', CurrencyHelper::displayPrice($addon->price, 0)) . "</li>";
            }
        }
    }
    if (count($html_addon) > 0) {
        ?>
										<div>