當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ShopFunctions::renderWeightUnit方法代碼示例

本文整理匯總了PHP中ShopFunctions::renderWeightUnit方法的典型用法代碼示例。如果您正苦於以下問題:PHP ShopFunctions::renderWeightUnit方法的具體用法?PHP ShopFunctions::renderWeightUnit怎麽用?PHP ShopFunctions::renderWeightUnit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ShopFunctions的用法示例。


在下文中一共展示了ShopFunctions::renderWeightUnit方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: display

 function display($tpl = null)
 {
     //Load helpers
     $this->loadHelper('currencydisplay');
     $this->loadHelper('html');
     // Get the data
     $model = VmModel::getModel('product');
     // Create filter
     $this->addStandardDefaultViewLists($model);
     $inventorylist = $model->getProductListing(false, false);
     $pagination = $model->getPagination();
     $this->assignRef('pagination', $pagination);
     // Apply currency
     $currencydisplay = CurrencyDisplay::getInstance();
     foreach ($inventorylist as $virtuemart_product_id => $product) {
         //TODO oculd be interesting to show the price for each product, and all stored ones $product->product_in_stock
         $product->product_instock_value = $currencydisplay->priceDisplay($product->product_price, '', $product->product_in_stock, false);
         $product->product_price_display = $currencydisplay->priceDisplay($product->product_price, '', 1, false);
         $product->weigth_unit_display = ShopFunctions::renderWeightUnit($product->product_weight_uom);
     }
     $this->assignRef('inventorylist', $inventorylist);
     $options = array();
     $options[] = JHTML::_('select.option', '', JText::_('COM_VIRTUEMART_DISPLAY_STOCK') . ':');
     $options[] = JHTML::_('select.option', 'stocklow', JText::_('COM_VIRTUEMART_STOCK_LEVEL_LOW'));
     $options[] = JHTML::_('select.option', 'stockout', JText::_('COM_VIRTUEMART_STOCK_LEVEL_OUT'));
     $this->lists['stockfilter'] = JHTML::_('select.genericlist', $options, 'search_type', 'onChange="document.adminForm.submit(); return false;"', 'value', 'text', JRequest::getVar('search_type'));
     $this->lists['filter_product'] = JRequest::getVar('filter_product');
     // $this->assignRef('lists', $lists);
     /* Toolbar */
     $this->SetViewTitle('PRODUCT_INVENTORY');
     JToolBarHelper::publish();
     JToolBarHelper::unpublish();
     parent::display($tpl);
 }
開發者ID:Gskflute,項目名稱:joomla25,代碼行數:34,代碼來源:view.html.php

示例2: display

 function display($tpl = null)
 {
     //Load helpers
     if (!class_exists('CurrencyDisplay')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'currencydisplay.php';
     }
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     // Get the data
     $model = VmModel::getModel('product');
     // Create filter
     $this->addStandardDefaultViewLists($model);
     $this->inventorylist = $model->getProductListing();
     $this->pagination = $model->getPagination();
     // Apply currency
     $currencydisplay = CurrencyDisplay::getInstance();
     foreach ($this->inventorylist as $virtuemart_product_id => $product) {
         //TODO oculd be interesting to show the price for each product, and all stored ones $product->product_in_stock
         $price = isset($product->allPrices[$product->selectedPrice]['product_price']) ? $product->allPrices[$product->selectedPrice]['product_price'] : 0;
         $product->product_instock_value = $currencydisplay->priceDisplay($price, '', $product->product_in_stock, false);
         $product->product_price_display = $currencydisplay->priceDisplay($price, '', 1, false);
         $product->weigth_unit_display = ShopFunctions::renderWeightUnit($product->product_weight_uom);
     }
     $options = array();
     $options[] = JHtml::_('select.option', '', vmText::_('COM_VIRTUEMART_DISPLAY_STOCK') . ':');
     $options[] = JHtml::_('select.option', 'stocklow', vmText::_('COM_VIRTUEMART_STOCK_LEVEL_LOW'));
     $options[] = JHtml::_('select.option', 'stockout', vmText::_('COM_VIRTUEMART_STOCK_LEVEL_OUT'));
     $this->lists['stockfilter'] = JHtml::_('select.genericlist', $options, 'search_type', 'onChange="document.adminForm.submit(); return false;"', 'value', 'text', vRequest::getVar('search_type'));
     $this->lists['filter_product'] = vRequest::getVar('filter_product');
     /* Toolbar */
     $this->SetViewTitle('PRODUCT_INVENTORY');
     JToolBarHelper::publish();
     JToolBarHelper::unpublish();
     parent::display($tpl);
 }
開發者ID:cybershocik,項目名稱:Darek,代碼行數:36,代碼來源:view.html.php

示例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;
	}
開發者ID:kosmosby,項目名稱:medicine-prof,代碼行數:35,代碼來源:weight_countries.php


注:本文中的ShopFunctions::renderWeightUnit方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。