本文整理汇总了PHP中ShopFunctions::getTaxByID方法的典型用法代码示例。如果您正苦于以下问题:PHP ShopFunctions::getTaxByID方法的具体用法?PHP ShopFunctions::getTaxByID怎么用?PHP ShopFunctions::getTaxByID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShopFunctions
的用法示例。
在下文中一共展示了ShopFunctions::getTaxByID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getOrderShipmentHtml
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;
}
示例2: getOrderShipmentHtml
/**
* @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;
}
示例3: getOrderShipmentHtml
/**
* @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;
}