function getOrderShipmentHtml($virtuemart_order_id) { $db = JFactory::getDBO(); $q = 'SELECT * FROM `' . $this->_tablename . '` ' . 'WHERE `virtuemart_order_id` = ' . $virtuemart_order_id; $db->setQuery($q); if (!($method = $db->loadObject())) { vmWarn(500, $q . " " . $db->getErrorMsg()); return ''; } if (!class_exists('CurrencyDisplay')) { require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php'; } $currency = CurrencyDisplay::getInstance(); $tax = ShopFunctions::getTaxByID($method->tax_id); $taxDisplay = is_array($tax) ? $tax['calc_value'] . ' ' . $tax['calc_value_mathop'] : $method->tax_id; $taxDisplay = $taxDisplay == -1 ? JText::_('COM_VIRTUEMART_PRODUCT_TAX_NONE') : $taxDisplay; //geting selected parcel $parcels = $this->_quote(); $title = $parcels[$method->selected_parcel]['title']; $html = '<table class="adminlist">' . "\n"; $html .= $this->getHtmlHeaderBE(); $html .= $this->getHtmlRowBE('POST24_SM', 'Omniva'); $html .= $this->getHtmlRowBE('POST24_SELECTED_PARCEL', $title); $html .= $this->getHtmlRowBE('POST24_TOPHONE', $method->phone); $html .= '</table>' . "\n"; return $html; }
/** * @param $virtuemart_order_id * @return string * @author zasilkovna */ function getOrderShipmentHtml($virtuemart_order_id) { $db = JFactory::getDBO(); $q = 'SELECT * FROM `' . $this->_tablename . '` ' . 'WHERE `virtuemart_order_id` = ' . $virtuemart_order_id; $db->setQuery($q); if (!($shipinfo = $db->loadObject())) { vmWarn(500, $q . " " . $db->getErrorMsg()); return ''; } if (!class_exists('CurrencyDisplay')) { require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php'; } $currency = CurrencyDisplay::getInstance(); $tax = ShopFunctions::getTaxByID($shipinfo->tax_id); $taxDisplay = is_array($tax) ? $tax['calc_value'] . ' ' . $tax['calc_value_mathop'] : $shipinfo->tax_id; $taxDisplay = $taxDisplay == -1 ? JText::_('COM_VIRTUEMART_PRODUCT_TAX_NONE') : $taxDisplay; $html = '<table class="adminlist">' . "\n"; $html .= $this->getHtmlHeaderBE(); $html .= $this->getHtmlRowBE('WEIGHT_COUNTRIES_SHIPPING_NAME', $shipinfo->shipment_name); $html .= $this->getHtmlRowBE('BRANCH', $shipinfo->branch_name_street); $html .= $this->getHtmlRowBE('CURRENCY', $shipinfo->branch_currency); $html .= '</table>' . "\n"; return $html; }
/** * @param $virtuemart_order_id * @return string */ function getOrderShipmentHtml ($virtuemart_order_id) { $db = JFactory::getDBO (); $q = 'SELECT * FROM `' . $this->_tablename . '` ' . 'WHERE `virtuemart_order_id` = ' . $virtuemart_order_id; $db->setQuery ($q); if (!($shipinfo = $db->loadObject ())) { vmWarn (500, $q . " " . $db->getErrorMsg ()); return ''; } if (!class_exists ('CurrencyDisplay')) { require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php'); } $currency = CurrencyDisplay::getInstance (); $tax = ShopFunctions::getTaxByID ($shipinfo->tax_id); $taxDisplay = is_array ($tax) ? $tax['calc_value'] . ' ' . $tax['calc_value_mathop'] : $shipinfo->tax_id; $taxDisplay = ($taxDisplay == -1) ? vmText::_ ('COM_VIRTUEMART_PRODUCT_TAX_NONE') : $taxDisplay; $html = '<table class="adminlist table">' . "\n"; $html .= $this->getHtmlHeaderBE (); $html .= $this->getHtmlRowBE ('WEIGHT_COUNTRIES_SHIPPING_NAME', $shipinfo->shipment_name); $html .= $this->getHtmlRowBE ('WEIGHT_COUNTRIES_WEIGHT', $shipinfo->order_weight . ' ' . ShopFunctions::renderWeightUnit ($shipinfo->shipment_weight_unit)); $html .= $this->getHtmlRowBE ('WEIGHT_COUNTRIES_COST', $currency->priceDisplay ($shipinfo->shipment_cost)); $html .= $this->getHtmlRowBE ('WEIGHT_COUNTRIES_PACKAGE_FEE', $currency->priceDisplay ($shipinfo->shipment_package_fee)); $html .= $this->getHtmlRowBE ('WEIGHT_COUNTRIES_TAX', $taxDisplay); $html .= '</table>' . "\n"; return $html; }