当前位置: 首页>>代码示例>>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;未经允许,请勿转载。