getOrder($virtuemart_order_id); //$order = $this->get('Order'); $orderNumber = $order['details']['BT']->virtuemart_order_number; $orderbt = $order['details']['BT']; $orderst = (array_key_exists('ST', $order['details'])) ? $order['details']['ST'] : $orderbt; $currency = CurrencyDisplay::getInstance('',$order['details']['BT']->virtuemart_vendor_id); $this->assignRef('currency', $currency); $_userFields = $userFieldsModel->getUserFields( 'account' , array('captcha' => true, 'delimiters' => true) // Ignore these types , array('delimiter_userinfo','user_is_vendor' ,'username', 'email', 'password', 'password2', 'agreed', 'address_type') // Skips ); $userfields = $userFieldsModel->getUserFieldsFilled( $_userFields ,$orderbt ); $_userFields = $userFieldsModel->getUserFields( 'shipment' , array() // Default switches , array('delimiter_userinfo', 'username', 'email', 'password', 'password2', 'agreed', 'address_type') // Skips ); $shipmentfields = $userFieldsModel->getUserFieldsFilled( $_userFields ,$orderst ); // Create an array to allow orderlinestatuses to be translated // We'll probably want to put this somewhere in ShopFunctions... $_orderStats = $this->get('OrderStatusList'); $_orderStatusList = array(); foreach ($_orderStats as $orderState) { $_orderStatusList[$orderState->order_status_code] = vmText::_($orderState->order_status_name); } /*foreach($order['items'] as $_item) { if (!empty($_item->product_attribute)) { $_attribs = preg_split('/\s?\s?/i', $_item->product_attribute); $product = $productModel->getProduct($_item->virtuemart_product_id); $_productAttributes = array(); $_prodAttribs = explode(';', $product->attribute); foreach ($_prodAttribs as $_pAttr) { $_list = explode(',', $_pAttr); $_name = array_shift($_list); $_productAttributes[$_item->virtuemart_order_item_id][$_name] = array(); foreach ($_list as $_opt) { $_optObj = new stdClass(); $_optObj->option = $_opt; $_productAttributes[$_item->virtuemart_order_item_id][$_name][] = $_optObj; } } } }*/ //$_shipmentInfo = ShopFunctions::getShipmentRateDetails($orderbt->virtuemart_shipmentmethod_id); /* Assign the data */ $this->assignRef('orderdetails', $order); $this->assignRef('orderNumber', $orderNumber); $this->assignRef('userfields', $userfields); $this->assignRef('shipmentfields', $shipmentfields); $this->assignRef('orderstatuslist', $_orderStatusList); $this->assignRef('orderbt', $orderbt); $this->assignRef('orderst', $orderst); $this->assignRef('virtuemart_shipmentmethod_id', $orderbt->virtuemart_shipmentmethod_id); error_reporting(0); parent::display($tpl); } }