本文整理汇总了PHP中ShopFunctions::renderTaxList方法的典型用法代码示例。如果您正苦于以下问题:PHP ShopFunctions::renderTaxList方法的具体用法?PHP ShopFunctions::renderTaxList怎么用?PHP ShopFunctions::renderTaxList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShopFunctions
的用法示例。
在下文中一共展示了ShopFunctions::renderTaxList方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchElement
function fetchElement($name, $value, &$node, $control_name)
{
$class = $node->attributes('class') ? 'class="' . $node->attributes('class') . '"' : '';
return ShopFunctions::renderTaxList($value, $control_name . '[' . $name . ']', $class);
// $class = 'multiple="true" size="10"';
// return JHTML::_('select.genericlist', $taxrates, $control_name . '[' . $name . '][]', $class, 'value', 'text', $value, $control_name . $name);
}
示例2: getInput
protected function getInput() {
return ShopFunctions::renderTaxList($this->value, $this->name, '');
// $class = 'multiple="true" size="10"';
// return JHtml::_('select.genericlist', $taxrates, $control_name . '[' . $name . '][]', $class, 'value', 'text', $value, $control_name . $name);
}
示例3: foreach
$tax .= $rule['calc_name'] . '<br />';
}
foreach ($calculator->rules['VatTax'] as $rule) {
$tax .= $rule['calc_name'] . '<br />';
}
$this->taxRules = $tax;
$DATax = '';
//vmText::_('COM_VIRTUEMART_RULES_EFFECTING');
foreach ($calculator->rules['DATax'] as $rule) {
$DATax .= $rule['calc_name'] . '<br />';
}
$this->DATaxRules = $DATax;
if (!isset($this->tempProduct->product_tax_id)) {
$this->tempProduct->product_tax_id = 0;
}
$this->lists['taxrates'] = ShopFunctions::renderTaxList($this->tempProduct->product_tax_id, 'mprices[product_tax_id][' . $this->priceCounter . ']');
if (!isset($this->tempProduct->product_discount_id)) {
$this->tempProduct->product_discount_id = 0;
}
$this->lists['discounts'] = $this->renderDiscountList($this->tempProduct->product_discount_id, 'mprices[product_discount_id][' . $this->priceCounter . ']');
$this->lists['shoppergroups'] = ShopFunctions::renderShopperGroupList($this->tempProduct->virtuemart_shoppergroup_id, false, 'mprices[virtuemart_shoppergroup_id][' . $this->priceCounter . ']');
if ($this->priceCounter == $nbPrice) {
$tmpl = "productPriceRowTmpl";
} else {
$tmpl = "productPriceRowTmpl_" . $this->priceCounter;
}
?>
<tr id="<?php
echo $tmpl;
?>
" class="removable row<?php
示例4: 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;
}
示例5:
}
foreach ($calculator->rules['VatTax'] as $rule) {
$tax .= $rule['calc_name'] . '<br />';
}
$this->taxRules = $tax;
$DATax = ''; //vmText::_('COM_VIRTUEMART_RULES_EFFECTING');
foreach ($calculator->rules['DATax'] as $rule) {
$DATax .= $rule['calc_name'] . '<br />';
}
$this->DATaxRules = $DATax;
if (!isset($this->product->product_tax_id)) {
$this->product->product_tax_id = 0;
}
$this->lists['taxrates'] = ShopFunctions::renderTaxList ($this->product->allPrices[$k]['product_tax_id'], 'mprices[product_tax_id][' . $this->priceCounter . ']');
if (!isset($this->product->allPrices[$k]['product_discount_id'])) {
$this->product->allPrices[$k]['product_discount_id'] = 0;
}
$this->lists['discounts'] = $this->renderDiscountList ($this->product->allPrices[$k]['product_discount_id'], 'mprices[product_discount_id][' . $this->priceCounter . ']');
$this->lists['shoppergroups'] = ShopFunctions::renderShopperGroupList ($this->product->allPrices[$k]['virtuemart_shoppergroup_id'], false, 'mprices[virtuemart_shoppergroup_id][' . $this->priceCounter . ']');
if ($this->priceCounter == $nbPrice) {
$tmpl = "productPriceRowTmpl";
$this->product->allPrices[$k]['virtuemart_product_price_id'] = '';
} else {
$tmpl = "productPriceRowTmpl_" . $this->priceCounter;
}
?>
示例6: display
function display($tpl = null)
{
// Get the task
$task = JRequest::getWord('task');
// Load helpers
$this->loadHelper('currencydisplay');
$this->loadHelper('html');
$this->loadHelper('image');
//$category_model = VmModel::getModel('category');
$model = VmModel::getModel();
// Handle any publish/unpublish
switch ($task) {
case 'add':
case 'edit':
//this was in the controller for the edit tasks, I dont know if it is still needed,
$this->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'views' . DS . 'product' . DS . 'tmpl');
$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->assignRef('manufacturers', $manufacturers);
// Get the category tree
if (isset($product->categories)) {
$category_tree = ShopFunctions::categoryListTree($product->categories);
} else {
$category_tree = ShopFunctions::categoryListTree();
}
$this->assignRef('category_tree', $category_tree);
//Get the shoppergoup list - Cleanshooter Custom Shopper Visibility
if (isset($product->shoppergroups)) {
$shoppergroupList = ShopFunctions::renderShopperGroupList($product->shoppergroups, true);
}
$this->assignRef('shoppergroupList', $shoppergroupList);
// Load the product price
if (!class_exists('calculationHelper')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'calculationh.php';
}
$calculator = calculationHelper::getInstance();
$product->prices = $calculator->getProductPrices($product);
$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);
$DBTax = '';
//JText::_('COM_VIRTUEMART_RULES_EFFECTING') ;
foreach ($calculator->rules['DBTax'] as $rule) {
$DBTax .= $rule['calc_name'] . '<br />';
}
$this->assignRef('DBTaxRules', $DBTax);
$tax = '';
//JText::_('COM_VIRTUEMART_TAX_EFFECTING').'<br />';
foreach ($calculator->rules['Tax'] as $rule) {
$tax .= $rule['calc_name'] . '<br />';
}
foreach ($calculator->rules['VatTax'] as $rule) {
$tax .= $rule['calc_name'] . '<br />';
}
$this->assignRef('taxRules', $tax);
$DATax = '';
//JText::_('COM_VIRTUEMART_RULES_EFFECTING');
foreach ($calculator->rules['DATax'] as $rule) {
$DATax .= $rule['calc_name'] . '<br />';
}
$this->assignRef('DATaxRules', $DATax);
// $this->assignRef('override', $calculator->override);
// $this->assignRef('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');
if (!isset($product->product_discount_id)) {
$product->product_discount_id = 0;
}
$lists['discounts'] = $this->renderDiscountList($product->product_discount_id);
if (!class_exists('VirtueMartModelConfig')) {
require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'config.php';
}
$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') {
//.........这里部分代码省略.........
示例7: foreach
$tax .= $rule['calc_name'] . '<br />';
}
foreach ($calculator->rules['VatTax'] as $rule) {
$tax .= $rule['calc_name'] . '<br />';
}
$this->taxRules = $tax;
$DATax = '';
//JText::_('COM_VIRTUEMART_RULES_EFFECTING');
foreach ($calculator->rules['DATax'] as $rule) {
$DATax .= $rule['calc_name'] . '<br />';
}
$this->DATaxRules = $DATax;
if (!isset($this->tempProduct->product_tax_id)) {
$this->tempProduct->product_tax_id = 0;
}
$this->lists['taxrates'] = ShopFunctions::renderTaxList($this->tempProduct->product_tax_id, 'product_tax_id[]', '', 'product_tax_id' . $sPrices['virtuemart_product_price_id']);
if (!isset($this->tempProduct->product_discount_id)) {
$this->tempProduct->product_discount_id = 0;
}
$this->lists['discounts'] = $this->renderDiscountList($this->tempProduct->product_discount_id, 'product_discount_id[]', 'product_discount_id' . $sPrices['virtuemart_product_price_id']);
$this->lists['shoppergroups'] = ShopFunctions::renderShopperGroupList($this->tempProduct->virtuemart_shoppergroup_id, false, 'price_shoppergroup_id[]', 'price_shoppergroup_id' . $sPrices['virtuemart_product_price_id']);
?>
<div class="price-container removable">
<span class="icon-move price_ordering label"> </span> <span class="icon-remove price-remove label pull-right"> </span>
<?php
//echo JText::_ ('COM_VIRTUEMART_PRODUCT_PRICE_ORDER');
echo $this->loadTemplate('price');
?>
</div>
<?php
$this->priceCounter++;