Example #1
0
 public static function displayPrice($value, $discount = 0)
 {
     if ($discount > 0) {
         return '<span class="old_price">' . CurrencyHelper::formatprice($value) . '</span>' . '<span class="discount_price">' . CurrencyHelper::formatprice($value - $value * $discount / 100) . '</span>';
     } else {
         return CurrencyHelper::formatprice($value);
     }
 }
    ?>
			</td>
			<td><?php 
    echo JFactory::getDate($subject->start)->format('d-m-Y');
    ?>
</td>			
			<td><a target="blank" href="<?php 
    echo 'index.php?option=com_bookpro&view=customer&layout=edit&id=' . $subject->user_id;
    ?>
"><?php 
    echo $subject->firstname . ' ' . $subject->lastname;
    ?>
</a></td>
			
			<td><?php 
    echo CurrencyHelper::formatprice($subject->total);
    ?>
</td>
			
			<td>
			 	<?php 
    echo $this->td_getPayStatusSelect($subject->pay_status, 'tdpayment' . $subject->id);
    ?>
			 	<br/>
				<label class="label"><?php 
    echo $subject->pay_method;
    ?>
</label>
			</td>
			<td>
				<?php 
Example #3
0
	<div class="span<?php 
    echo 12 / $products_per_row;
    ?>
">

		<strong>
			<a href="<?php 
    echo $tour->link;
    ?>
"><?php 
    echo $tour->title;
    ?>
 </a>
			<?php 
    if ($showprices) {
        echo "<em>" . JText::sprintf('MOD_BOOKPRO_TOUR_FROM_PRICE', CurrencyHelper::formatprice($tour->price)) . "</em>";
    }
    ?>
		</strong>

		<div class="row-fluid">
			<?php 
    if ($showimages) {
        ?>
			<div class="span6">
				<?php 
        echo $tour->image_html;
        ?>
			</div>
			<?php 
    }
Example #4
0
					<?php 
        echo $tour->cat_title;
        ?>
				</p>
				<?php 
    }
    ?>
				
				
			
				<?php 
    if ($showprices) {
        ?>
					<div class="price_listour">
					<?php 
        echo JText::sprintf(CurrencyHelper::formatprice($tour->price));
        ?>
					</div>
					<?php 
    }
    ?>
									
			</div>

		</div>
	</div>
	<?php 
    if (($i + 1) % $products_per_row == 0) {
        echo '</div>';
        echo '<div class="row-fluid">';
    }
Example #5
0
<?php

$price = $displayData;
$roundtrip = JFactory::getApplication()->getUserState('filter.roundtrip');
$prices[] = '<span>' . JText::sprintf('COM_BOOKPRO_PRICE_ADULT', CurrencyHelper::displayPrice($price->price)) . '</span>';
if ($price->child_price) {
    $prices[] = '<span>' . JText::sprintf('COM_BOOKPRO_PRICE_CHILD', CurrencyHelper::formatprice($price->child_price)) . '</span>';
}
echo implode($prices, ",");
Example #6
0
        ?>
">
								<?php 
        echo $this->escape($item->title);
        ?>
							</a>
						</td>
						<td class="left">
							<?php 
        echo CurrencyHelper::formatprice($item->price);
        ?>
						</td>
						
						<td class="left">
							<?php 
        echo CurrencyHelper::formatprice($item->child_price);
        ?>
						</td>
						
						<td class="left">
							<?php 
        echo BookProHelper::formatTypeForAddon($item->params ? json_decode($item->params)->type : null);
        ?>
						</td>
						
						<td class="center">
						<?php 
        echo (int) $item->id;
        ?>
					</td>
					</tr>
</td>
				
				
		</tr>

	<?php 
    foreach ($addons as $addon) {
        $params = json_decode($addon->params);
        ?>
	
	<tr>
		<td class="tdorder"><?php 
        echo $params->title;
        ?>
</td>
			<td class="tdorder"><?php 
        echo CurrencyHelper::formatprice($params->price);
        ?>
</td>
			<td class="tdorder"><?php 
        echo CurrencyHelper::formatprice($params->child_price);
        ?>
</td>
			
	</tr>	
	<?php 
    }
    ?>
</table>
<?php 
}
        if ($config->ps_group) {
            ?>
		<td style="border: 1px #ccc solid;"><?php 
            echo BookProHelper::formatAge($pass->group_id);
            ?>
</td>
		<?php 
        }
        ?>
		<!-- 
		<td style="border: 1px #ccc solid;">
		<?php 
        //if($pass->price) {
        ?>
			<?php 
        echo CurrencyHelper::formatprice($pass->price);
        ?>
		<?php 
        //}
        ?>
		</td>
		 -->
	</tr>	
	<?php 
    }
    ?>
</table>
<?php 
}
?>
            ?>
	                			<?php 
            echo CurrencyHelper::formatprice($addon->price);
            ?>
/<?php 
            echo JText::_('COM_BOOKPRO_ADULT');
            ?>
	                	<?php 
        }
        ?>
	                	
	                	<?php 
        if ($addon->child_price) {
            ?>
	                			,&nbsp<?php 
            echo CurrencyHelper::formatprice($addon->child_price);
            ?>
/<?php 
            echo JText::_('COM_BOOKPRO_CHILD');
            ?>
	                	<?php 
        }
        ?>
	                	
	                </div>      
                </div>

            <?php 
    }
}
?>
Example #10
0
    ?>
</td>
				
				
				<td>
					<?php 
    echo JFactory::getDate($item->start)->format($php_dateformat);
    ?>
				</td>
				<td><?php 
    echo $item->firstname . ' ' . $item->lastname;
    ?>
</td>
				<td>
					<?php 
    echo CurrencyHelper::formatprice($item->total);
    ?>
<br>
					
					<label class="label"><?php 
    echo $item->pay_method;
    ?>
</label>
				</td>				
				<td>
			 	<?php 
    echo $this->td_getPayStatusSelect($item->pay_status, 'tdpayment' . $item->id);
    ?>
			 	
				</td>
				<td>
 /**
  * Send email when cancelling order
  */
 protected function sendEmailOrder($id)
 {
     AImporter::helper('currency');
     //get data
     $model = $this->getModel();
     $data = $model->getComplexItem($id);
     //get Pay status
     $pay_status = '';
     switch ($data->order->pay_status) {
         case 'REFUND':
             $pay_status = 'Refund';
             break;
         case 'SUCCESS':
             $pay_status = 'Paid';
             break;
         default:
             $pay_status = 'Not paid';
             break;
     }
     $mailer = JFactory::getMailer();
     //set sender
     $config = JFactory::getConfig();
     $flight_config = JComponentHelper::getParams('com_bookpro');
     $user = JFactory::getUser();
     if ($flight_config->get('company_name')) {
         $sender = array($config->get(mailfrom), $flight_config->get('company_name'));
     } else {
         $sender = array($config->get(mailfrom), $data->customer->firstname . ' ' . $data->customer->lastname);
     }
     $mailer->setSender($sender);
     //set Recipient
     $recipient = $config->get(mailfrom);
     $mailer->addRecipient($recipient);
     /*
      * Add cc
      */
     $isSuperAdmin = $user->authorise('core.admin');
     $customer_mail = $data->customer->email;
     //to avoid send duplicate mail for super admin
     if (!$isSuperAdmin) {
         $agent_mail = $user->email;
         $ccmail = array($customer_mail, $agent_mail);
     } else {
         $ccmail = $customer_mail;
     }
     $mailer->AddCC($ccmail);
     /*
      * set content	
      */
     //set subject
     $subject = JText::_('COM_BOOKPRO_AGENTS') . ' ' . $data->customer->firstname . ' ' . $data->customer->lastname . ' ' . JText::_('COM_BOOKPRO_CANCEL_ORDER') . ': ' . $data->order->order_number;
     //set body
     $body = '<b>' . JText::_('COM_BOOKPRO_ORDER_INFO') . '</b><br>';
     $body .= JText::_('COM_BOOKPRO_ORDER_NUMBER') . ': ' . $data->order->order_number . '<br>';
     $body .= JText::_('COM_BOOKPRO_ORDER_CREATED_DATE') . ': ' . $data->order->created . '<br>';
     $body .= JText::_('COM_BOOKPRO_ORDER_PAY_STATUS') . ': ' . $pay_status . '<br>';
     $body .= JText::_('COM_BOOKPRO_FLIGHT_ORDER_TOTAL') . ': ' . CurrencyHelper::formatprice($data->order->total) . '<br><hr>';
     $body .= '<b>' . JText::_('COM_BOOKPRO_AGENTS') . '</b><br>';
     $body .= JText::_('COM_BOOKPRO_AGENT_NAME') . ': ' . $data->customer->firstname . ' ' . $data->customer->lastname . '<br>';
     $body .= JText::_('COM_BOOKPRO_AGENT_EMAIL') . ': ' . $data->customer->email . '<br>';
     $body .= JText::_('COM_BOOKPRO_AGENT_TELPHONE') . ': ' . $data->customer->telephone . '<br>';
     $mailer->setSubject($subject);
     $mailer->isHTML(true);
     $mailer->Encoding = 'base64';
     $mailer->setBody($body);
     $send = $mailer->Send();
     return $send;
 }
</td>
	</tr>
	
	<tr>
		<td><?php 
echo JText::_('COM_BOOKPRO_VAT');
?>
</td>
		<td><?php 
echo JText::sprintf(CurrencyHelper::formatprice($displayData->vat));
?>
</td>
	</tr>
	
	-->
	<tr>
		<td><span class="lead"><?php 
echo JText::_('COM_BOOKPRO_ORDER_TOTAL');
?>
</span></td>
		<td><span class="lead"><?php 
echo JText::sprintf(CurrencyHelper::formatprice($displayData->total));
?>
</span></td>
	</tr>
</table>
			

	

Example #13
0
 private function fillOrder($input)
 {
     $input = str_replace('{order_number}', $this->order->order_number, $input);
     $input = str_replace('{total}', CurrencyHelper::formatprice($this->order->total), $input);
     $input = str_replace('{note}', $this->order->notes, $input);
     $input = str_replace('{payment_status}', $this->formatPaymentStatus($this->order->pay_status), $input);
     $input = str_replace('{deposit}', $this->order->deposit, $input);
     $input = str_replace('{fee}', $this->order->service_fee, $input);
     $input = str_replace('{tax}', $this->order->tax, $input);
     $input = str_replace('{pay_method}', $this->order->pay_method, $input);
     $input = str_replace('{created}', DateHelper::formatDate($this->order->created), $input);
     $input = str_replace('{order_status}', $this->order->order_status, $input);
     $order_link = JURI::root() . 'index.php?option=com_bookpro&view=orderdetail&order_number=' . $this->order->order_number . '&email=' . $this->customer->email;
     $input = str_replace('{order_link}', $order_link, $input);
     $input = str_replace('{adults}', $this->orderComplex->orderinfo[0]->adult, $input);
     $input = str_replace('{children}', $this->orderComplex->orderinfo[0]->child, $input);
     $input = str_replace('{infants}', $this->orderComplex->orderinfo[0]->infant, $input);
     $orderparams = json_decode($this->order->params);
     $input = str_replace('{card_number}', $orderparams->payment->number, $input);
     return $input;
 }
Example #14
0
echo JText::_('COM_BOOKPRO_FARE');
?>
</td>
							<td><?php 
echo JText::sprintf(CurrencyHelper::formatprice($this->cart->subtotal));
?>
</td>
						</tr>
										
					<tr>
						<td><span class="lead"><?php 
echo JText::_('COM_BOOKPRO_ORDER_TOTAL');
?>
</span></td>
						<td><span class="lead"><?php 
echo JText::sprintf(CurrencyHelper::formatprice($this->cart->total));
?>
</span></td>
					</tr>
				</table>
			</div>

		</div>
		
			
			<div class="span8">
				<div ><?php 
echo $this->loadTemplate('addon');
?>
</div>
				
Example #15
0
        echo CurrencyHelper::formatprice($order->tax);
        ?>
					</td>										
				<?php 
        if ($customer->agent_comission_mode == 2) {
            ?>
					<td style="border: 1px #ccc solid;"><?php 
            echo CurrencyHelper::formatprice($order->total * $customer->discount / 100);
            ?>
					</td>
				<?php 
        }
        ?>
	
					<td style="border: 1px #ccc solid;"><?php 
        echo CurrencyHelper::formatprice($order->total);
        ?>
					</td>					
					<td style="border: 1px #ccc solid"><?php 
        echo DateHelper::toLongDate($order->created);
        ?>
					</td>		
					
				
										
				</tr>
				<?php 
    }
} else {
    ?>
				<tr>
Example #16
0
 * @version 	$Id$
 **/
/**
 * Display flight rate after search flight
 */
AImporter::helper('currency');
$rates = $displayData->rates;
$row = $displayData->tour;
$config = JComponentHelper::getParams('com_bookpro');
$cart = JModelLegacy::getInstance('TourCart', 'BookPro');
$cart->load();
$pax_count = $cart->filter['adult'] + $cart->filter['child'];
//+$cart->infant; infant not need seat
$price_adult = CurrencyHelper::formatprice($rates['BASE']->adult);
$price_child = CurrencyHelper::formatprice($rates['BASE']->child);
$price_infant = CurrencyHelper::formatprice($rates['BASE']->infant);
?>

<td class="jbflights_rate"><b>
	<label class="strong float-left">
		<?php 
$avail_seat = $rates['BASE']->seat - $rates['BASE']->booked;
if ($avail_seat >= $pax_count) {
    ?>
			<input style="margin:0" type="radio" tourcode="<?php 
    echo $row->code;
    ?>
" availseat="<?php 
    echo $avail_seat - $pax_count;
    ?>
" name="tour"	value="<?php 
Example #17
0
		<?php 
if ($this->order->deposit && (int) $this->order->deposit > 0) {
    ?>
	
		    <div class="form-inline">
			            <label class="checkbox inline check_payment"> <input name="deposit"	type="radio" id="fullpayment" value="0" checked="true"> <?php 
    echo CurrencyHelper::formatprice($this->order->total);
    ?>
 
			                <?php 
    echo JText::_('COM_BOOKPRO_FULL_PAYMENT');
    ?>
			            </label> 
	           		
		                <label class="checkbox inline check_payment"> <input name="deposit" type="radio" id="deposit" value="1"> <?php 
    echo CurrencyHelper::formatprice($this->order->deposit);
    ?>
 
		                        <?php 
    echo JText::_('COM_BOOKPRO_DEPOSIT');
    ?>
		                </label>
	                
	        </div>
	         <hr>
        <?php 
}
?>
       
			<?php 
if ($this->plugins) {
Example #18
0
	<div class="span<?php 
    echo 12 / $products_per_row;
    ?>
">

		<strong>
			<a href="<?php 
    echo $tour->link;
    ?>
"><?php 
    echo $tour->title;
    ?>
 </a>
			<?php 
    if ($showprices) {
        echo '<em>' . JText::sprintf('COM_BOOKPRO_TOUR_FROM_PRICE', CurrencyHelper::formatprice($tour->price)) . '</em>';
    }
    ?>
		</strong>
		
	</div>
	<?php 
    if (($i + 1) % $products_per_row == 0) {
        echo '</div>';
        echo '<div class="row-fluid">';
    }
    if ($i + 1 == $count) {
        echo "</div>";
    }
    if ($total < $count) {
        if ($i + 1 == $total) {