예제 #1
0
 /**
  *Function used to get Oder HTML
  *
  * @param   INT  $order_id  Order ID
  * @param   INT  $data      Order data
  *
  * @return  Array
  *
  * @since  1.0.0
  */
 public function getorderHTML($order_id, $data)
 {
     $comquick2cartHelper = new comquick2cartHelper();
     $order = $orderWholeDetail = $comquick2cartHelper->getOrderInfo($order_id);
     $this->payhtml = "";
     // Paymodel is uesed in included layout
     JLoader::import('payment', JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'models');
     $paymodel = new Quick2cartModelpayment();
     if (!empty($order)) {
         $this->order_authorized = $comquick2cartHelper->getorderAuthorization($order["order_info"][0]->user_id);
         if (is_array($order)) {
             $this->orderinfo = $order['order_info'];
             $this->orderitems = $order['items'];
             /* $payhtml = $model->getpayHTML($order['order_info'][0]->processor,$order_id);
             			if($this->orderinfo[0]->processor=="FreeCheckout")
             			{
             			$plgname = JText::_('COM_QUICK2CART_FREE_CHCKOUT');
             			$this->orderinfo[0]->processor = JText::_('COM_QUICK2CART_FREE_CHCKOUT');
             			@$this->payhtml=$this->getFreeOrderHtml($order_id);
             			}
             			else
             			{
             			$payhtml = $paymodel->getHTML($this->orderinfo[0]->processor,$order_id);
             			@$this->payhtml=$payhtml[0];
             			}*/
             $data['payhtml'] = $this->payhtml;
             // used in payment.php
         } elseif ($order == 0) {
             $this->undefined_orderid_msg = 1;
         }
     } else {
         $this->noOrderDetails = 1;
     }
     $orders_site = '1';
     $this->orders_site = $orders_site;
     $user = JFactory::getUser();
     $this->qtcSystemEmails = 1;
     $app = JFactory::getApplication();
     $view = $comquick2cartHelper->getViewpath('cartcheckout', 'ordersummary');
     ob_start();
     include $view;
     $html = ob_get_contents();
     ob_end_clean();
     $data['orderHTML'] = $html;
     return $data;
 }