本文整理汇总了PHP中ShopFunctions::renderWeightUnitList方法的典型用法代码示例。如果您正苦于以下问题:PHP ShopFunctions::renderWeightUnitList方法的具体用法?PHP ShopFunctions::renderWeightUnitList怎么用?PHP ShopFunctions::renderWeightUnitList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShopFunctions
的用法示例。
在下文中一共展示了ShopFunctions::renderWeightUnitList方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
//.........这里部分代码省略.........
$currency_model = tmsModel::getModel('currency');
$vendor_model->setId(vmAccess::isSuperVendor());
$this->vendor = $vendor_model->getVendor();
$currency = $currency_model->getItemList();
$this->vendor_currency_symb = $currency->currency_symbol;
$lists['manufacturers'] = shopFunctions::renderManufacturerList($product->tsmart_manufacturer_id, true);
if (!empty($product->product_weight_uom)) {
$product_weight_uom = $product->product_weight_uom;
} else {
if (!empty($product_parent)) {
$product_weight_uom = $product_parent->product_weight_uom;
} else {
$product_weight_uom = tsmConfig::get('weight_unit_default');
}
}
if (!empty($product->product_lwh_uom)) {
$product_lwh_uom = $product->product_lwh_uom;
} else {
if (!empty($product_parent)) {
$product_lwh_uom = $product_parent->product_lwh_uom;
} else {
$product_lwh_uom = tsmConfig::get('lwh_unit_default');
}
}
if (!empty($product->product_unit)) {
$product_unit = $product->product_unit;
} else {
if (!empty($product_parent)) {
$product_unit = $product_parent->product_unit;
} else {
$product_unit = tsmConfig::get('product_unit_default', 'KG');
}
}
$lists['product_weight_uom'] = ShopFunctions::renderWeightUnitList('product_weight_uom', $product_weight_uom);
$lists['product_iso_uom'] = ShopFunctions::renderUnitIsoList('product_unit', $product_unit);
$lists['product_lwh_uom'] = ShopFunctions::renderLWHUnitList('product_lwh_uom', $product_lwh_uom);
if (empty($product->product_available_date)) {
$product->product_available_date = date("Y-m-d");
}
$waitinglistmodel = tmsModel::getModel('waitinglist');
/* Load waiting list */
if ($product->tsmart_product_id) {
//$waitinglist = $this->get('waitingusers', 'waitinglist');
$waitinglist = $waitinglistmodel->getWaitingusers($product->tsmart_product_id);
$this->assignRef('waitinglist', $waitinglist);
}
$orderstatusModel = tmsModel::getModel('orderstatus');
$lists['OrderStatus'] = $orderstatusModel->renderOSList(array(), 'order_status', TRUE);
// Add the tsmart_shoppergroup_ids
$cid = JFactory::getUser()->id;
$this->activeShoppergroups = shopfunctions::renderGuiList($cid, 'shoppergroups', 'shopper_group_name', 'category', 'vmuser_shoppergroups', 'tsmart_user_id');
if (!empty($this->activeShoppergroups)) {
$shoppergroupModel = tmsModel::getModel('shoppergroup');
$this->activeShoppergroups = tsmText::_($shoppergroupModel->getDefault(0)->shopper_group_name);
}
// Load protocustom lists
$customModel = tmsModel::getModel('custom');
$this->fieldTypes = tsmartModelCustom::getCustomTypes();
$customsList = $customModel->getCustomsList();
$attribs = 'style= "width: 300px;"';
$customlist = JHtml::_('select.genericlist', $customsList, 'customlist', $attribs, 'value', 'text', null, false, true);
$this->assignRef('customsList', $customlist);
if ($product->product_parent_id > 0) {
// Set up labels
$info_label = tsmText::_('com_tsmart_PRODUCT_FORM_ITEM_INFO_LBL');
$status_label = tsmText::_('com_tsmart_PRODUCT_FORM_ITEM_STATUS_LBL');
示例2: display
//.........这里部分代码省略.........
$this->assignRef('product_currency', $currency->currency_symbol);
$currency = $currency_model->getCurrency($vendor->vendor_currency);
$this->assignRef('vendor_currency', $currency->currency_symbol);
if (count($manufacturers) > 0) {
$lists['manufacturers'] = JHTML::_('select.genericlist', $manufacturers, 'virtuemart_manufacturer_id', 'class="inputbox"', 'value', 'text', $product->virtuemart_manufacturer_id);
}
if (!empty($product->product_weight_uom)) {
$product_weight_uom = $product->product_weight_uom;
} else {
if (!empty($product_parent)) {
$product_weight_uom = $product_parent->product_weight_uom;
} else {
$product_weight_uom = VmConfig::get('weight_unit_default');
}
}
if (!empty($product->product_lwh_uom)) {
$product_lwh_uom = $product->product_lwh_uom;
} else {
if (!empty($product_parent)) {
$product_lwh_uom = $product_parent->product_lwh_uom;
} else {
$product_lwh_uom = VmConfig::get('lwh_unit_default');
}
}
if (!empty($product->product_unit)) {
$product_unit = $product->product_unit;
} else {
if (!empty($product_parent)) {
$product_unit = $product_parent->product_unit;
} else {
$product_unit = VmConfig::get('product_unit_default', 'KG');
}
}
$lists['product_weight_uom'] = ShopFunctions::renderWeightUnitList('product_weight_uom', $product_weight_uom);
$lists['product_iso_uom'] = ShopFunctions::renderUnitIsoList('product_unit', $product_unit);
$lists['product_lwh_uom'] = ShopFunctions::renderLWHUnitList('product_lwh_uom', $product_lwh_uom);
if (empty($product->product_available_date)) {
$product->product_available_date = date("Y-m-d");
}
$waitinglistmodel = VmModel::getModel('waitinglist');
/* Load waiting list */
if ($product->virtuemart_product_id) {
//$waitinglist = $this->get('waitingusers', 'waitinglist');
$waitinglist = $waitinglistmodel->getWaitingusers($product->virtuemart_product_id);
$this->assignRef('waitinglist', $waitinglist);
}
$productShoppers = $model->getProductShoppersByStatus($product->virtuemart_product_id, array('S'));
$this->assignRef('productShoppers', $productShoppers);
$orderstatusModel = VmModel::getModel('orderstatus');
$lists['OrderStatus'] = $orderstatusModel->renderOSList(array(), 'order_status', TRUE);
$field_model = VmModel::getModel('customfields');
$fieldTypes = $field_model->getField_types();
$this->assignRef('fieldTypes', $fieldTypes);
// Add the virtuemart_shoppergroup_ids
$cid = JFactory::getUser()->id;
$this->activeShoppergroups = shopfunctions::renderGuiList('virtuemart_shoppergroup_id', '#__virtuemart_vmuser_shoppergroups', 'virtuemart_user_id', $cid, 'shopper_group_name', '#__virtuemart_shoppergroups', 'virtuemart_shoppergroup_id', 'category', 4, 0);
if (!$this->activeShoppergroups or is_array($this->activeShoppergroups) and count($this->activeShoppergroups) == 0) {
//vmdebug('$this->activeShoppergroups',$this->activeShoppergroups);
$shoppergroupModel = VmModel::getModel('shoppergroup');
$this->activeShoppergroups = vmText::_($shoppergroupModel->getDefault(0)->shopper_group_name);
}
/* Load protocustom lists */
$customsList = $field_model->getCustomsList();
$attribs = 'style= "width: 300px;"';
$customlist = JHTML::_('select.genericlist', $customsList, 'customlist', $attribs);
$this->assignRef('customsList', $customlist);
示例3: array
<?php
echo VmHTML::row('booleanlist', 'COM_VIRTUEMART_DISPLAY_STOCK', 'display_stock', VmConfig::get('display_stock'));
?>
<?php
echo VmHTML::row('booleanlist', 'COM_VIRTUEMART_COUPONS_ENABLE', 'coupons_enable', VmConfig::get('coupons_enable', 0));
?>
<?php
echo VmHTML::row('booleanlist', 'COM_VIRTUEMART_UNCAT_CHILD_PRODUCTS_SHOW', 'show_uncat_child_products', VmConfig::get('show_uncat_child_products', 0));
?>
<?php
// TODO This must go to the view.html.php.... but then... that goes for most of the config sruff I'ld say :-S
$_defaultExpTime = array('1,D' => '1 ' . JText::_('COM_VIRTUEMART_DAY'), '1,W' => '1 ' . JText::_('COM_VIRTUEMART_WEEK'), '2,W' => '2 ' . JText::_('COM_VIRTUEMART_WEEK_S'), '1,M' => '1 ' . JText::_('COM_VIRTUEMART_MONTH'), '3,M' => '3 ' . JText::_('COM_VIRTUEMART_MONTH_S'), '6,M' => '6 ' . JText::_('COM_VIRTUEMART_MONTH_S'), '1,Y' => '1 ' . JText::_('COM_VIRTUEMART_YEAR'));
echo VmHTML::row('selectList', 'COM_VIRTUEMART_COUPONS_EXPIRE', 'coupons_default_expire', VmConfig::get('coupons_default_expire'), $_defaultExpTime, 1, '', '', 'input-medium');
?>
<?php
echo VmHTML::row('raw', 'COM_VIRTUEMART_WEIGHT_UNIT_DEFAULT', ShopFunctions::renderWeightUnitList('weight_unit_default', VmConfig::get('weight_unit_default')));
?>
<?php
echo VmHTML::row('raw', 'COM_VIRTUEMART_LWH_UNIT_DEFAULT', ShopFunctions::renderLWHUnitList('lwh_unit_default', VmConfig::get('lwh_unit_default')));
?>
<?php
echo VmHTML::row('input', 'COM_VIRTUEMART_LATEST_PRODUCTS_DAYS', 'latest_products_days', VmConfig::get('latest_products_days', 7), 'class="inputbox input-mini"');
?>
<tr>
<td class="key">
<div class="hasTooltip" title="<?php
echo JText::_('COM_VIRTUEMART_LATEST_PRODUCTS_ORDERBY_EXPLAIN');
?>
">
示例4:
<tr>
<td class="key">
<span class="hasTip" title="<?php
echo vmText::_('COM_VIRTUEMART_WEIGHT_UNIT_DEFAULT_EXPLAIN');
?>
">
<label for="weight_unit_default">
<?php
echo vmText::_('COM_VIRTUEMART_WEIGHT_UNIT_DEFAULT');
?>
</label>
</span>
</td>
<td>
<?php
echo ShopFunctions::renderWeightUnitList('weight_unit_default', VmConfig::get('weight_unit_default'));
?>
</td>
</tr>
<tr>
<td class="key">
<span class="hasTip" title="<?php
echo vmText::_('COM_VIRTUEMART_LWH_UNIT_DEFAULT_EXPLAIN');
?>
">
<label for="weight_unit_default">
<?php
echo vmText::_('COM_VIRTUEMART_LWH_UNIT_DEFAULT');
?>
</label>
</span>
示例5: display
function display($tpl = null)
{
// Get the task
$task = JRequest::getWord('task', $this->getLayout());
vmdebug('VirtuemartViewProduct ' . $task);
$this->task = $task;
// Load helpers
$this->loadHelper('currencydisplay');
$this->loadHelper('html');
$this->loadHelper('image');
$model = VmModel::getModel();
// Handle any publish/unpublish
switch ($task) {
case 'add':
case 'edit':
VmConfig::loadJLang('com_virtuemart_orders', TRUE);
VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
$this->jsonPath = JFactory::getApplication()->isSite() ? juri::root() : '';
$virtuemart_product_id = JRequest::getVar('virtuemart_product_id', array());
if (is_array($virtuemart_product_id) && count($virtuemart_product_id) > 0) {
$virtuemart_product_id = (int) $virtuemart_product_id[0];
} else {
$virtuemart_product_id = (int) $virtuemart_product_id;
}
$product = $model->getProductSingle($virtuemart_product_id, false);
$product_parent = $model->getProductParent($product->product_parent_id);
$mf_model = VmModel::getModel('manufacturer');
$manufacturers = $mf_model->getManufacturerDropdown($product->virtuemart_manufacturer_id);
$this->manufacturers = $manufacturers;
// set category in front edit link
if ($task == 'add') {
if ($category_id = jRequest::getInt('virtuemart_category_id', 0)) {
$product->categories = array($category_id);
}
}
// Get the category tree
if (isset($product->categories)) {
$this->category_tree = ShopFunctions::categoryListTree($product->categories);
} else {
$this->category_tree = ShopFunctions::categoryListTree();
}
//Get the shoppergoup list - Cleanshooter Custom Shopper Visibility
if (isset($product->shoppergroups)) {
$this->shoppergroupList = ShopFunctions::renderShopperGroupList($product->shoppergroups);
} else {
$this->shoppergroupList = '';
}
// Load the product price
$this->loadHelper('calculationh');
$product_childIds = $model->getProductChildIds($virtuemart_product_id);
$product_childs = array();
foreach ($product_childIds as $id) {
$product_childs[] = $model->getProductSingle($id, false);
}
$this->assignRef('product_childs', $product_childs);
JLoader::register('VirtueMartModelConfig', JPATH_VM_ADMINISTRATOR . '/models/config.php');
$this->productLayouts = VirtueMartModelConfig::getLayoutList('productdetails', $product->layout);
// Load Images
$model->addImages($product);
if (is_Dir(VmConfig::get('vmtemplate') . DS . 'images' . DS . 'availability' . DS)) {
$imagePath = VmConfig::get('vmtemplate') . '/images/availability/';
} else {
$imagePath = '/components/com_virtuemart/assets/images/availability/';
}
$this->imagePath = $imagePath;
// Load the vendors
$vendor_model = VmModel::getModel('vendor');
if (Vmconfig::get('multix', 'none') !== 'none') {
if ($task == 'add') {
$vendor_id = $this->adminVendor;
} else {
$vendor_id = $product->virtuemart_vendor_id;
}
$lists['vendors'] = Shopfunctions::renderVendorList($vendor_id);
}
// Load the currencies
$currency_model = VmModel::getModel('currency');
$this->loadHelper('permissions');
$vendor_model->setId(Permissions::getInstance()->isSuperVendor());
$vendor = $vendor_model->getVendor();
if (empty($product->product_currency)) {
$product->product_currency = $vendor->vendor_currency;
}
//STUDIO42 fix for currency, old method set 2 time same currency symbol
// TODO verify all others
$currencyModel = VmModel::getModel('currency');
$currencyModel->setId($vendor->vendor_currency);
$currency = $currencyModel->getData();
$this->vendor_currency = $currency->currency_symbol;
$currencyModel->setId($product->product_currency);
$currency = $currencyModel->getData();
$this->product_currency = $currency->currency_symbol;
if (count($manufacturers) > 0) {
$lists['manufacturers'] = JHTML::_('select.genericlist', $manufacturers, 'virtuemart_manufacturer_id', 'class="inputbox"', 'value', 'text', $product->virtuemart_manufacturer_id);
}
$lists['product_weight_uom'] = ShopFunctions::renderWeightUnitList('product_weight_uom', $task == 'add' ? VmConfig::get('weight_unit_default') : $product->product_weight_uom);
$lists['product_iso_uom'] = ShopFunctions::renderUnitIsoList('product_unit', $task == 'add' ? VmConfig::get('weight_unit_default') : $product->product_unit);
$lists['product_lwh_uom'] = ShopFunctions::renderLWHUnitList('product_lwh_uom', $task == 'add' ? VmConfig::get('lwh_unit_default') : $product->product_lwh_uom);
if (empty($product->product_available_date)) {
$product->product_available_date = date("Y-m-d");
//.........这里部分代码省略.........
示例6: fetchElement
//.........这里部分代码省略.........
$product->image->file_title = '';
$product->image->file_description = '';
$product->image->file_meta = '';
$product->image->file_url = '';
$product->image->file_url_thumb = '';
$product->image->file_title = '';
}
//Get manufacturers
$model = JModel::getInstance('Manufacturer', 'VirtuemartModel');
$manufacturers = $model->getManufacturerDropdown($product->virtuemart_manufacturer_id);
if (count($manufacturers) > 0) {
$lists['manufacturers'] = JHTML::_('select.genericlist', $manufacturers, 'virtuemart_manufacturer_id', 'class="inputbox"', 'value', 'text', $product->virtuemart_manufacturer_id);
}
//Get shopper groups
if (isset($product->shoppergroups)) {
$lists['shopperGroups'] = ShopFunctions::renderShopperGroupList($product->shoppergroups, true);
}
//Get product price
require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'calculationh.php';
$calculator = calculationHelper::getInstance();
$product->prices = $calculator->getProductPrices($product);
// Get product price override options
$options = array(0 => 'Disabled', 1 => 'Overwrite final', -1 => 'Overwrite price to tax');
$lists['price_override_options'] = VmHtml::radioList('override', $product->override, $options);
// Get tax rules
$dbTax = '';
foreach ($calculator->rules['DBTax'] as $rule) {
$dbTax .= $rule['calc_name'] . '<br />';
}
$dbTaxRules = $dbTax;
$tax = JText::_('COM_VIRTUEMART_TAX_EFFECTING');
foreach ($calculator->rules['Tax'] as $rule) {
$tax .= $rule['calc_name'] . '<br />';
}
$taxRules = $tax;
$daTax = '';
foreach ($calculator->rules['DATax'] as $rule) {
$daTax .= $rule['calc_name'] . '<br />';
}
$daTaxRules = $daTax;
// Removed in VM 2.0.4
//$override = $calculator->override;
//$product_override_price = $calculator->product_override_price;
if (!isset($product->product_tax_id)) {
$product->product_tax_id = 0;
}
$lists['taxrates'] = ShopFunctions::renderTaxList($product->product_tax_id, 'product_tax_id');
// Discounts
if (!isset($product->product_discount_id)) {
$product->product_discount_id = 0;
}
require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'models' . DS . 'calc.php';
$discounts = VirtueMartModelCalc::getDiscounts();
$discountrates = array();
$discountrates[] = JHTML::_('select.option', '-1', JText::_('COM_VIRTUEMART_PRODUCT_DISCOUNT_NONE'), 'product_discount_id');
$discountrates[] = JHTML::_('select.option', '0', JText::_('COM_VIRTUEMART_PRODUCT_DISCOUNT_NO_SPECIAL'), 'product_discount_id');
foreach ($discounts as $discount) {
$discountrates[] = JHTML::_('select.option', $discount->virtuemart_calc_id, $discount->calc_name, 'product_discount_id');
}
$lists['discounts'] = JHTML::_('select.genericlist', $discountrates, 'product_discount_id', '', 'product_discount_id', 'text', $product->product_discount_id);
//Define Virtuemart image path
if (is_Dir(VmConfig::get('vmtemplate') . DS . 'images' . DS . 'availability' . DS)) {
$imagePath = VmConfig::get('vmtemplate') . '/images/availability/';
} else {
$imagePath = '/components/com_virtuemart/assets/images/availability/';
}
// Get currencies
$model = JModel::getInstance('Currency', 'VirtuemartModel');
$vendorModel = JModel::getInstance('Vendor', 'VirtuemartModel');
$vendorModel->setId(1);
$vendor = $vendorModel->getVendor();
if (empty($product->product_currency)) {
$product->product_currency = $vendor->vendor_currency;
}
$lists['currencies'] = JHTML::_('select.genericlist', $model->getCurrencies(), 'product_currency', '', 'virtuemart_currency_id', 'currency_name', $product->product_currency);
$currency = $model->getCurrency($product->product_currency);
$productCurrency = $currency->currency_symbol;
$currency = $model->getCurrency($vendor->vendor_currency);
$vendorCurrency = $currency->currency_symbol;
//Get dimensions
$lists['product_weight_uom'] = ShopFunctions::renderWeightUnitList('product_weight_uom', !isset($product->product_weight_uom) ? $config->get('weight_unit_default') : $product->product_weight_uom);
$lists['product_lwh_uom'] = ShopFunctions::renderLWHUnitList('product_lwh_uom', !isset($product->product_lwh_uom) ? $config->get('lwh_unit_default') : $product->product_lwh_uom);
//Get custom fields
$model = JModel::getInstance('CustomFields', 'VirtuemartModel');
$fieldTypes = $model->getField_types();
$customsList = JHTML::_('select.genericlist', $model->getCustomsList(), 'customlist');
if (!isset($product->customfields)) {
$product->customfields = array();
}
//Set some script variables
$document->addScriptDeclaration('var k2martVmImagePath="' . JURI::root(true) . $imagePath . '"; var tip_image="' . JURI::root(true) . '/components/com_virtuemart/assets/js/images/vtip_arrow.png"; var k2martVmCustomFieldsNum = "' . count($product->customfields) . '";');
//Edit icon
$application = JFactory::getApplication('admin');
$editIcon = JURI::root(true) . '/administrator/templates/' . $application->getTemplate() . '/images/menu/icon-16-edit.png';
//Output
ob_start();
include JPATH_SITE . DS . 'plugins' . DS . 'k2' . DS . 'k2mart' . DS . 'tmpl' . DS . 'admin' . DS . 'form.php';
$contents = ob_get_clean();
return $contents;
}
示例7: defined
* @version $Id: default_shopfront.php 9035 2015-11-03 10:37:57Z Milbo $
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
?>
<table width="100%">
<tr>
<td valign="top" width="50%">
<fieldset>
<legend><?php
echo tsmText::_('com_tsmart_ADMIN_CFG_MORE_CORE_SETTINGS');
?>
</legend>
<table class="admintable">
<?php
echo VmHTML::row('raw', 'com_tsmart_WEIGHT_UNIT_DEFAULT', ShopFunctions::renderWeightUnitList('weight_unit_default', tsmConfig::get('weight_unit_default')));
echo VmHTML::row('raw', 'com_tsmart_LWH_UNIT_DEFAULT', ShopFunctions::renderLWHUnitList('lwh_unit_default', tsmConfig::get('lwh_unit_default')));
echo VmHTML::row('checkbox', 'com_tsmart_ADMIN_SHOW_PRINTICON', 'show_printicon', tsmConfig::get('show_printicon', 1));
echo VmHTML::row('checkbox', 'com_tsmart_PDF_ICON_SHOW', 'pdf_icon', tsmConfig::get('pdf_icon', 0));
?>
</table>
</fieldset>
<fieldset>
<legend><?php
echo tsmText::_('com_tsmart_CFG_RECOMMEND_ASK');
?>
</legend>
<table class="admintable">
<?php
echo VmHTML::row('checkbox', 'com_tsmart_ADMIN_SHOW_EMAILFRIEND', 'show_emailfriend', tsmConfig::get('show_emailfriend', 0));
echo VmHTML::row('checkbox', 'com_tsmart_RECCOMEND_UNATUH', 'recommend_unauth', tsmConfig::get('recommend_unauth', 0));
示例8: getInput
function getInput()
{
return ShopFunctions::renderWeightUnitList($this->name, $this->value);
}
示例9: display
//.........这里部分代码省略.........
}
$productLayouts = VirtueMartModelConfig::getLayoutList('productdetails');
$this->assignRef('productLayouts', $productLayouts);
// Load Images
$model->addImages($product);
if (is_Dir(VmConfig::get('vmtemplate') . DS . 'images' . DS . 'availability' . DS)) {
$imagePath = VmConfig::get('vmtemplate') . '/images/availability/';
} else {
$imagePath = '/components/com_virtuemart/assets/images/availability/';
}
$this->assignRef('imagePath', $imagePath);
// Load the vendors
$vendor_model = VmModel::getModel('vendor');
// $vendors = $vendor_model->getVendors();
// $lists['vendors'] = JHTML::_('select.genericlist', $vendors, 'virtuemart_vendor_id', '', 'virtuemart_vendor_id', 'vendor_name', $product->virtuemart_vendor_id);
if (Vmconfig::get('multix', 'none') !== 'none') {
$lists['vendors'] = Shopfunctions::renderVendorList($product->virtuemart_vendor_id);
}
// Load the currencies
$currency_model = VmModel::getModel('currency');
$vendor_model->setId(1);
$vendor = $vendor_model->getVendor();
if (empty($product->product_currency)) {
$product->product_currency = $vendor->vendor_currency;
}
$currencies = JHTML::_('select.genericlist', $currency_model->getCurrencies(), 'product_currency', '', 'virtuemart_currency_id', 'currency_name', $product->product_currency);
$currency = $currency_model->getCurrency($product->product_currency);
$this->assignRef('product_currency', $currency->currency_symbol);
$currency = $currency_model->getCurrency($vendor->vendor_currency);
$this->assignRef('vendor_currency', $currency->currency_symbol);
if (count($manufacturers) > 0) {
$lists['manufacturers'] = JHTML::_('select.genericlist', $manufacturers, 'virtuemart_manufacturer_id', 'class="inputbox"', 'value', 'text', $product->virtuemart_manufacturer_id);
}
$lists['product_weight_uom'] = ShopFunctions::renderWeightUnitList('product_weight_uom', $task == 'add' ? VmConfig::get('weight_unit_default') : $product->product_weight_uom);
$lists['product_lwh_uom'] = ShopFunctions::renderLWHUnitList('product_lwh_uom', $task == 'add' ? VmConfig::get('lwh_unit_default') : $product->product_lwh_uom);
if (empty($product->product_available_date)) {
$product->product_available_date = date("Y-m-d");
}
$waitinglistmodel = VmModel::getModel('waitinglist');
/* Load waiting list */
if ($product->virtuemart_product_id) {
//$waitinglist = $this->get('waitingusers', 'waitinglist');
$waitinglist = $waitinglistmodel->getWaitingusers($product->virtuemart_product_id);
$this->assignRef('waitinglist', $waitinglist);
}
$bookedUsers = $waitinglistmodel->getProductShoppersByStatus($product->virtuemart_product_id, array('S'));
$this->assignRef('customers', $bookedUsers);
$orderstatusModel = VmModel::getModel('orderstatus');
$lists['OrderStatus'] = $orderstatusModel->renderOrderStatusList(true, array('S'));
$field_model = VmModel::getModel('customfields');
$fieldTypes = $field_model->getField_types();
$this->assignRef('fieldTypes', $fieldTypes);
/* Load product types lists */
$customsList = $field_model->getCustomsList();
$this->assignRef('customsList', JHTML::_('select.genericlist', $customsList, 'customlist'));
$ChildCustomRelation = $field_model->getProductChildCustomRelation();
$this->assignRef('ChildCustomRelation', $ChildCustomRelation);
/* Set up labels */
if ($product->product_parent_id > 0) {
$info_label = JText::_('COM_VIRTUEMART_PRODUCT_FORM_ITEM_INFO_LBL');
$status_label = JText::_('COM_VIRTUEMART_PRODUCT_FORM_ITEM_STATUS_LBL');
$dim_weight_label = JText::_('COM_VIRTUEMART_PRODUCT_FORM_ITEM_DIM_WEIGHT_LBL');
$images_label = JText::_('COM_VIRTUEMART_PRODUCT_FORM_ITEM_IMAGES_LBL');
$delete_message = JText::_('COM_VIRTUEMART_PRODUCT_FORM_DELETE_ITEM_MSG');
} else {
if ($task == 'add') {
示例10:
</tr>
<tr>
<td class="key">
<span class="hasTip" title="<?php
echo JText::_('COM_VIRTUEMART_WEIGHT_UNIT_DEFAULT_EXPLAIN');
?>
">
<label for="weight_unit_default"><?php
echo JText::_('COM_VIRTUEMART_WEIGHT_UNIT_DEFAULT');
?>
</label>
</span>
</td>
<td>
<?php
echo ShopFunctions::renderWeightUnitList('weight_unit_default', $this->config->get('weight_unit_default'));
?>
</td>
</tr>
<tr>
<td class="key">
<span class="hasTip" title="<?php
echo JText::_('COM_VIRTUEMART_LWH_UNIT_DEFAULT_EXPLAIN');
?>
">
<label for="weight_unit_default"><?php
echo JText::_('COM_VIRTUEMART_LWH_UNIT_DEFAULT');
?>
</label>
</span>
示例11: fetchElement
function fetchElement($name, $value, &$node, $control_name)
{
return ShopFunctions::renderWeightUnitList($control_name . '[' . $name . ']', $value);
}
示例12: fetchElement
function fetchElement($name, $value, &$node, $control_name)
{
$class = $node->attributes('class') ? 'class="' . $node->attributes('class') . '"' : '';
return ShopFunctions::renderWeightUnitList($control_name . '[' . $name . ']', $value);
}