Example #1
0
?>
</h2><br/>
<div class=""> 
<a class="ui-dir-button ui-dir-button-grey" href="<?php 
echo JRoute::_('index.php?option=com_jbusinessdirectory&view=useroptions');
?>
">
		<span class="ui-button-text"><i class="dir-icon-dashboard"></i> <?php 
echo JText::_("LNG_CONTROL_PANEL");
?>
</span>
	</a>
</div>
<br/>
<?php 
$a = SzamlaLetrehozas(5);
?>
<div id="orders-holder">
	<?php 
foreach ($this->orders as $order) {
    ?>
		<div class="order-container">
			<div class="order-details">
				<h3> <?php 
    echo $order->order_id;
    ?>
</h3>
				<h4> <?php 
    echo $order->businessName;
    ?>
</h4>
Example #2
0
 function updateOrder($data, $processor)
 {
     $orderTable = JTable::getInstance("Order", "JTable", array());
     $orderTable->load($data->order_id);
     $orderTable->transaction_id = $data->transaction_id;
     $orderTable->amount_paid = $data->amount;
     $orderTable->paid_at = date("Y-m-d h:m:s");
     // set start_date
     $packageTable = JTable::getInstance("Package", "JTable", array());
     $lastPaidPackage = $packageTable->getLastPaidPackage($orderTable->company_id);
     if ($processor->type == "paypalsubscriptions") {
         $orderTable->start_date = date("Y-m-d");
     }
     $orderTable->state = 1;
     if (!$orderTable->store()) {
         throw new Exception(JText::_("LNG_ERROR_ADDING_ORDER") . $this->_db->getErrorMsg());
         $this->log->LogError("Error updating order. Order ID: " . $data->order_id);
     }
     $this->log->LogDebug("Order has been successfully updated. Order ID: " . $data->order_id);
     /* benji  -- ide kell bekotni a szamlazast */
     $myuser = JFactory::getUser();
     $debug = var_export($myuser, true);
     file_put_contents('mylog.txt', $debug);
     SzamlaLetrehozas($data->order_id, $myuser->id);
     //file_put_contents('log.txt', 'function updateOrder(data, processor)', FILE_APPEND);
     return $orderTable;
 }