本文整理汇总了PHP中VmViewAdmin::display方法的典型用法代码示例。如果您正苦于以下问题:PHP VmViewAdmin::display方法的具体用法?PHP VmViewAdmin::display怎么用?PHP VmViewAdmin::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VmViewAdmin
的用法示例。
在下文中一共展示了VmViewAdmin::display方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
if (!class_exists('VmHTML')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
$this->vendorId = VmConfig::isSuperVendor();
// TODO add icon for media view
$this->SetViewTitle();
$model = VmModel::getModel('media');
$layoutName = vRequest::getCmd('layout', 'default');
if ($layoutName == 'edit') {
$this->media = $model->getFile();
$this->addStandardEditViewCommands();
} else {
$virtuemart_product_id = vRequest::getInt('virtuemart_product_id');
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;
}
$cat_id = vRequest::getInt('virtuemart_category_id', 0);
JToolBarHelper::custom('synchronizeMedia', 'new', 'new', vmText::_('COM_VIRTUEMART_TOOLS_SYNC_MEDIA_FILES'), false);
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model, null, null, 'searchMedia');
$options = array('' => vmText::_('COM_VIRTUEMART_LIST_ALL_TYPES'), 'product' => vmText::_('COM_VIRTUEMART_PRODUCT'), 'category' => vmText::_('COM_VIRTUEMART_CATEGORY'), 'manufacturer' => vmText::_('COM_VIRTUEMART_MANUFACTURER'), 'vendor' => vmText::_('COM_VIRTUEMART_VENDOR'));
$this->lists['search_type'] = VmHTML::selectList('search_type', vRequest::getVar('search_type'), $options, 1, '', 'onchange="this.form.submit();"');
$options = array('' => vmText::_('COM_VIRTUEMART_LIST_ALL_ROLES'), 'file_is_displayable' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_DISPLAYABLE'), 'file_is_downloadable' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_DOWNLOADABLE'), 'file_is_forSale' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_SET_FORSALE'));
$this->lists['search_role'] = VmHTML::selectList('search_role', vRequest::getVar('search_role'), $options, 1, '', 'onchange="this.form.submit();"');
$this->files = $model->getFiles(false, false, $virtuemart_product_id, $cat_id);
$this->pagination = $model->getPagination();
}
parent::display($tpl);
}
示例2: display
function display($tpl = null)
{
// Load the helper(s)
if (!class_exists('VmHTML')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
$model = VmModel::getModel();
$layoutName = $this->getLayout();
$task = vRequest::getCmd('task', $layoutName);
$this->assignRef('task', $task);
if ($layoutName == 'edit') {
//For shoppergroup specific price display
VmConfig::loadJLang('com_virtuemart_config');
VmConfig::loadJLang('com_virtuemart_shoppers', true);
$shoppergroup = $model->getShopperGroup();
$this->SetViewTitle('SHOPPERGROUP', $shoppergroup->shopper_group_name);
$vendors = ShopFunctions::renderVendorList($shoppergroup->virtuemart_vendor_id);
$this->assignRef('vendorList', $vendors);
$this->assignRef('shoppergroup', $shoppergroup);
$this->addStandardEditViewCommands();
} else {
$this->SetViewTitle();
$showVendors = $this->showVendors();
$this->assignRef('showVendors', $showVendors);
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model);
$shoppergroups = $model->getShopperGroups(false, true);
$this->assignRef('shoppergroups', $shoppergroups);
$pagination = $model->getPagination();
$this->assignRef('sgrppagination', $pagination);
}
parent::display($tpl);
}
示例3: display
function display($tpl = null)
{
// Load the helper(s)
if (!class_exists('VmHTML')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
$model = VmModel::getModel();
$config = JFactory::getConfig();
$layoutName = vRequest::getCmd('layout', 'default');
if ($layoutName == 'edit') {
$cid = vRequest::getInt('cid');
$task = vRequest::getCmd('task', 'add');
if ($task != 'add' && !empty($cid) && !empty($cid[0])) {
$cid = (int) $cid[0];
} else {
$cid = 0;
}
$model->setId($cid);
$this->currency = $model->getCurrency();
$this->SetViewTitle('', $this->currency->currency_name);
$this->addStandardEditViewCommands();
} else {
$this->SetViewTitle();
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model, 0, 'ASC');
$this->currencies = $model->getCurrenciesList(vRequest::getCmd('search', false));
$this->pagination = $model->getPagination();
}
parent::display($tpl);
}
示例4: display
function display ($tpl = null) {
// Load the helper(s)
jimport('joomla.filesystem.file');
$config = JFactory::getConfig();
$log_path = $config->get('log_path', VMPATH_ROOT . "/log");
$layoutName = vRequest::getCmd('layout', 'default');
VmConfig::loadJLang('com_virtuemart_log');
if ($layoutName == 'edit') {
$logFile = vRequest::getString('logfile', '');
$this->SetViewTitle('LOG', $logFile);
$fileContent = file_get_contents($log_path . DS . $logFile);
$fileContentByLine = explode("\n", $fileContent);
$this->assignRef('fileContentByLine', $fileContentByLine);
JToolBarHelper::cancel();
} else {
if(!class_exists('JFolder')) require(VMPATH_LIBS.DS.'joomla'.DS.'filesystem'.DS.'folder.php');
$logFiles = JFolder::files($log_path, $filter = '.', true, false, array('index.html'));
$this->SetViewTitle('LOG');
$this->assignRef('logFiles', $logFiles);
$this->assignRef('path', $log_path);
}
parent::display($tpl);
}
示例5: display
function display($tpl = null)
{
if (!class_exists('VmHTML')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
//$this->addStandardEditViewCommands();
parent::display($tpl);
}
示例6: display
function display($tpl = null)
{
if (!class_exists('VmHTML')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
$model = VmModel::getModel('calc');
//@todo should be depended by loggedVendor
$this->vendorId = vmAccess::getVendorId();
$this->SetViewTitle();
$layoutName = vRequest::getCmd('layout', 'default');
if ($layoutName == 'edit') {
$calc = $model->getCalc();
$this->assignRef('calc', $calc);
$isNew = $calc->virtuemart_calc_id < 1;
if ($isNew) {
$calc->virtuemart_vendor_id = $this->vendorId;
$db = JFactory::getDBO();
//get default currency of the vendor, if not set get default of the shop
$q = 'SELECT `vendor_currency` FROM `#__virtuemart_vendors` WHERE `virtuemart_vendor_id` = "' . $this->vendorId . '"';
$db->setQuery($q);
$currency = $db->loadResult();
if (empty($currency)) {
$q = 'SELECT `vendor_currency` FROM `#__virtuemart_vendors` WHERE `virtuemart_vendor_id` = "1" ';
$db->setQuery($q);
$currency = $db->loadResult();
$calc->calc_currency = $currency;
} else {
$calc->calc_currency = $currency;
}
}
$this->entryPointsList = self::renderEntryPointsList($calc->calc_kind);
$this->mathOpList = self::renderMathOpList($calc->calc_value_mathop);
if (empty($calc->calc_categories)) {
$calc->calc_categories = array();
} else {
if (!is_array($calc->calc_categories)) {
$calc->calc_categories = array($calc->calc_categories);
}
}
$calc_categories = $calc->calc_categories;
$this->categoryTree = ShopFunctions::categoryListTree($calc_categories);
$currencyModel = VmModel::getModel('currency');
$this->currencies = $currencyModel->getCurrencies();
$this->shopperGroupList = ShopFunctions::renderShopperGroupList($calc->virtuemart_shoppergroup_ids, True);
if (!class_exists('ShopFunctionsF')) {
require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
}
$this->countriesList = ShopFunctionsF::renderCountryList($calc->calc_countries, True);
$this->statesList = ShopFunctionsF::renderStateList($calc->virtuemart_state_ids, '', True);
$this->manufacturerList = ShopFunctions::renderManufacturerList($calc->virtuemart_manufacturers, true);
if ($this->showVendors()) {
$this->vendorList = ShopFunctions::renderVendorList($calc->virtuemart_vendor_id);
}
$this->addStandardEditViewCommands();
} else {
if ($this->showVendors()) {
JToolBarHelper::custom('toggle.shared.1', 'publish', 'yes', vmText::_('COM_VIRTUEMART_SHARED_TOGGLE_ON'), true);
JToolBarHelper::custom('toggle.shared.0', 'unpublish', 'no', vmText::_('COM_VIRTUEMART_SHARED_TOGGLE_OFF'), true);
}
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model);
$search = vRequest::getCmd('search', false);
$this->calcs = $model->getCalcs(false, false, $search);
VmConfig::loadJLang('com_virtuemart_shoppers', true);
foreach ($this->calcs as &$data) {
$data->calcCategoriesList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'categories', 'category_name', 'category', 'calc_categories', 'virtuemart_calc_id');
$data->calcShoppersList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'shoppergroups', 'shopper_group_name', 'shoppergroup', 'calc_shoppergroups', 'virtuemart_calc_id');
$data->calcCountriesList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'countries', 'country_name', 'country', 'calc_countries', 'virtuemart_calc_id');
$data->calcStatesList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'states', 'state_name', 'states', 'calc_states', 'virtuemart_calc_id');
$data->calcManufacturersList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'manufacturers', 'mf_name', 'manufacturer', 'calc_manufacturers', 'virtuemart_calc_id');
}
$this->pagination = $model->getPagination();
}
parent::display($tpl);
}
示例7: renderMail
/**
* This is wrong
*@deprecated
*/
function renderMail() {
$this->setLayout('mail_html_waitlist');
$this->subject = vmText::sprintf('COM_VIRTUEMART_PRODUCT_WAITING_LIST_EMAIL_SUBJECT', $this->productName);
$notice_body = vmText::sprintf('COM_VIRTUEMART_PRODUCT_WAITING_LIST_EMAIL_BODY', $this->productName, $this->url);
parent::display();
}
示例8: renderMailLayout
function renderMailLayout($doVendor = false)
{
$tpl = $doVendor ? 'mail_html_regvendor' : 'mail_html_reguser';
$this->setLayout($tpl);
$vendorModel = VmModel::getModel('vendor');
$vendorId = 1;
$vendorModel->setId($vendorId);
$vendor = $vendorModel->getVendor();
$vendorModel->addImages($vendor);
$this->assignRef('subject', $doVendor ? vmText::sprintf('COM_VIRTUEMART_NEW_USER_MESSAGE_VENDOR_SUBJECT', $this->user->get('email')) : vmText::sprintf('COM_VIRTUEMART_NEW_USER_MESSAGE_SUBJECT', $vendor->vendor_store_name));
parent::display();
}
示例9: display
function display($tpl = null)
{
// Load the helper(s)
$this->addHelperPath(VMPATH_ADMIN . DS . 'helpers');
if (!class_exists('vmPSPlugin')) {
require VMPATH_PLUGINLIBS . DS . 'vmpsplugin.php';
}
if (!class_exists('VmHTML')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
$model = VmModel::getModel();
$layoutName = vRequest::getCmd('layout', 'default');
$this->SetViewTitle();
$layoutName = vRequest::getCmd('layout', 'default');
if ($layoutName == 'edit') {
VmConfig::loadJLang('plg_vmpsplugin', false);
JForm::addFieldPath(VMPATH_ADMIN . DS . 'fields');
$shipment = $model->getShipment();
// Get the payment XML.
$formFile = vRequest::filterPath(VMPATH_ROOT . DS . 'plugins' . DS . 'vmshipment' . DS . $shipment->shipment_element . DS . $shipment->shipment_element . '.xml');
if (file_exists($formFile)) {
$shipment->form = JForm::getInstance($shipment->shipment_element, $formFile, array(), false, '//vmconfig | //config[not(//vmconfig)]');
$shipment->params = new stdClass();
$varsToPush = vmPlugin::getVarsToPushFromForm($shipment->form);
VmTable::bindParameterableToSubField($shipment, $varsToPush);
$shipment->form->bind($shipment->getProperties());
} else {
$shipment->form = null;
}
if (!class_exists('VmImage')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'image.php';
}
if (!class_exists('VirtueMartModelVendor')) {
require VMPATH_ADMIN . DS . 'models' . DS . 'vendor.php';
}
$vendor_id = 1;
$currency = VirtueMartModelVendor::getVendorCurrency($vendor_id);
$this->assignRef('vendor_currency', $currency->currency_symbol);
if ($this->showVendors()) {
$vendorList = ShopFunctions::renderVendorList($shipment->virtuemart_vendor_id);
$this->assignRef('vendorList', $vendorList);
}
$this->pluginList = self::renderInstalledShipmentPlugins($shipment->shipment_jplugin_id);
$this->assignRef('shipment', $shipment);
$this->shopperGroupList = ShopFunctions::renderShopperGroupList($shipment->virtuemart_shoppergroup_ids, true);
$this->addStandardEditViewCommands($shipment->virtuemart_shipmentmethod_id);
} else {
JToolBarHelper::custom('cloneshipment', 'copy', 'copy', vmText::_('COM_VIRTUEMART_SHIPMENT_CLONE'), true);
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model);
$this->shipments = $model->getShipments();
VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
foreach ($this->shipments as &$data) {
// Write the first 5 shoppergroups in the list
$data->shipmentShoppersList = shopfunctions::renderGuiList($data->virtuemart_shoppergroup_ids, 'shoppergroups', 'shopper_group_name', 'shopper');
}
$this->pagination = $model->getPagination();
}
parent::display($tpl);
}
示例10: display
function display($tpl = null)
{
//Load helpers
if (!class_exists('CurrencyDisplay')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php';
}
if (!class_exists('VmHTML')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
}
if (!class_exists('vmPSPlugin')) {
require JPATH_VM_PLUGINS . DS . 'vmpsplugin.php';
}
$orderStatusModel = VmModel::getModel('orderstatus');
$orderStates = $orderStatusModel->getOrderStatusList();
$shippingModel = VmModel::getModel('mds');
$curTask = JRequest::getWord('task');
if ($curTask == 'edit') {
$this->setLayout('order');
VmConfig::loadJLang('com_virtuemart_shoppers', true);
VmConfig::loadJLang('com_virtuemart_orders', true);
// Load addl models
$userFieldsModel = VmModel::getModel('userfields');
$productModel = VmModel::getModel('product');
// Get the data
$virtuemart_order_id = JRequest::getInt('virtuemart_order_id');
$order = $shippingModel->getOrder($virtuemart_order_id);
$tot_parcel = 0;
$total_weight = 0;
$total_vol_weight = 0;
foreach ($order['items'] as $item) {
$quantity = 1;
$product = $productModel->getProduct($item->virtuemart_product_id);
while ($quantity <= $item->product_quantity) {
// Length coversion, mds collivery only acceps CM
if (strtolower($product->product_lwh_uom) != 'çm') {
$length = $this->converter->convert($product->product_length, strtolower($product->product_lwh_uom), 'cm', 6);
$width = $this->converter->convert($product->product_width, strtolower($product->product_lwh_uom), 'cm', 6);
$height = $this->converter->convert($product->product_height, strtolower($product->product_lwh_uom), 'cm', 6);
} else {
$length = $product->product_length;
$width = $product->product_width;
$height = $product->product_height;
}
// Weight coversion, mds collivery only acceps KG'S
if (strtolower($product->product_weight_uom) != 'kg') {
$weight = $this->converter->convert($product->product_weight, strtolower($product->product_weight_uom), 'kg', 6);
} else {
$weight = $product->product_weight;
}
$parcels[] = array("length" => str_replace(",", "", $length), "width" => str_replace(",", "", $width), "height" => str_replace(",", "", $height), "weight" => str_replace(",", "", $weight));
$tot_parcel += 1;
$quantity++;
}
$total_weight += $product->product_weight * $item->product_quantity;
$total_vol_weight += $product->product_length * $item->product_quantity * ($product->product_width * $item->product_quantity) * ($product->product_height * $item->product_quantity);
}
$total_vweight = $total_vol_weight / 4000;
$deliver_info = array('vol_weight' => $total_vol_weight, 'weight' => $total_weight, 'parcels' => $parcels);
$_orderID = $order['details']['BT']->virtuemart_order_id;
$orderbt = $order['details']['BT'];
$orderst = array_key_exists('ST', $order['details']) ? $order['details']['ST'] : $orderbt;
$orderbt->invoiceNumber = $shippingModel->getInvoiceNumber($orderbt->virtuemart_order_id);
$currency = CurrencyDisplay::getInstance('', $order['details']['BT']->virtuemart_vendor_id);
$this->assignRef('currency', $currency);
// Create an array to allow orderlinestatuses to be translated
// We'll probably want to put this somewhere in ShopFunctions...
$_orderStatusList = array();
foreach ($orderStates as $orderState) {
//$_orderStatusList[$orderState->virtuemart_orderstate_id] = $orderState->order_status_name;
//When I use update, I have to use this?
$_orderStatusList[$orderState->order_status_code] = JText::_($orderState->order_status_name);
}
$_itemStatusUpdateFields = array();
$_itemAttributesUpdateFields = array();
foreach ($order['items'] as $_item) {
$_itemStatusUpdateFields[$_item->virtuemart_order_item_id] = JHTML::_('select.genericlist', $orderStates, "item_id[" . $_item->virtuemart_order_item_id . "][order_status]", 'class="selectItemStatusCode"', 'order_status_code', 'order_status_name', $_item->order_status, 'order_item_status' . $_item->virtuemart_order_item_id, true);
}
if (!isset($_orderStatusList[$orderbt->order_status])) {
if (empty($orderbt->order_status)) {
$orderbt->order_status = 'unknown';
}
$_orderStatusList[$orderbt->order_status] = JText::_('COM_VIRTUEMART_UNKNOWN_ORDER_STATUS');
}
/* Assign the data */
$this->assignRef('orderdetails', $order);
$this->assignRef('orderID', $_orderID);
$this->assignRef('userfields', $userfields);
$this->assignRef('shipmentfields', $shipmentfields);
$this->assignRef('orderstatuslist', $_orderStatusList);
$this->assignRef('itemstatusupdatefields', $_itemStatusUpdateFields);
$this->assignRef('itemattributesupdatefields', $_itemAttributesUpdateFields);
$this->assignRef('orderbt', $orderbt);
$this->assignRef('orderst', $orderst);
$this->assignRef('virtuemart_shipmentmethod_id', $orderbt->virtuemart_shipmentmethod_id);
/* Data for the Edit Status form popup */
$_currentOrderStat = $order['details']['BT']->order_status;
// used to update all item status in one time
$_orderStatusSelect = JHTML::_('select.genericlist', $orderStates, 'order_status', '', 'order_status_code', 'order_status_name', $_currentOrderStat, 'order_items_status', true);
$this->assignRef('orderStatSelect', $_orderStatusSelect);
$this->assignRef('currentOrderStat', $_currentOrderStat);
//.........这里部分代码省略.........
示例11: 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';
}
if (!class_exists('vmPSPlugin')) {
require VMPATH_PLUGINLIBS . DS . 'vmpsplugin.php';
}
// Load addl models
$orderModel = VmModel::getModel();
$userFieldsModel = VmModel::getModel('userfields');
$productModel = VmModel::getModel('product');
/* Get the data */
$virtuemart_order_id = vRequest::getvar('virtuemart_order_id');
$order = $orderModel->getOrder($virtuemart_order_id);
//$order = $this->get('Order');
$orderNumber = $order['details']['BT']->virtuemart_order_number;
$orderbt = $order['details']['BT'];
$orderst = array_key_exists('ST', $order['details']) ? $order['details']['ST'] : $orderbt;
$currency = CurrencyDisplay::getInstance('', $order['details']['BT']->virtuemart_vendor_id);
$this->assignRef('currency', $currency);
$_userFields = $userFieldsModel->getUserFields('account', array('captcha' => true, 'delimiters' => true), array('delimiter_userinfo', 'user_is_vendor', 'username', 'email', 'password', 'password2', 'agreed', 'address_type'));
$userfields = $userFieldsModel->getUserFieldsFilled($_userFields, $orderbt);
$_userFields = $userFieldsModel->getUserFields('shipment', array(), array('delimiter_userinfo', 'username', 'email', 'password', 'password2', 'agreed', 'address_type'));
$shipmentfields = $userFieldsModel->getUserFieldsFilled($_userFields, $orderst);
// Create an array to allow orderlinestatuses to be translated
// We'll probably want to put this somewhere in ShopFunctions...
$_orderStats = $this->get('OrderStatusList');
$_orderStatusList = array();
foreach ($_orderStats as $orderState) {
$_orderStatusList[$orderState->order_status_code] = vmText::_($orderState->order_status_name);
}
/*foreach($order['items'] as $_item) {
if (!empty($_item->product_attribute)) {
$_attribs = preg_split('/\s?<br\s*\/?>\s?/i', $_item->product_attribute);
$product = $productModel->getProduct($_item->virtuemart_product_id);
$_productAttributes = array();
$_prodAttribs = explode(';', $product->attribute);
foreach ($_prodAttribs as $_pAttr) {
$_list = explode(',', $_pAttr);
$_name = array_shift($_list);
$_productAttributes[$_item->virtuemart_order_item_id][$_name] = array();
foreach ($_list as $_opt) {
$_optObj = new stdClass();
$_optObj->option = $_opt;
$_productAttributes[$_item->virtuemart_order_item_id][$_name][] = $_optObj;
}
}
}
}*/
//$_shipmentInfo = ShopFunctions::getShipmentRateDetails($orderbt->virtuemart_shipmentmethod_id);
/* Assign the data */
$this->assignRef('orderdetails', $order);
$this->assignRef('orderNumber', $orderNumber);
$this->assignRef('userfields', $userfields);
$this->assignRef('shipmentfields', $shipmentfields);
$this->assignRef('orderstatuslist', $_orderStatusList);
$this->assignRef('orderbt', $orderbt);
$this->assignRef('orderst', $orderst);
$this->assignRef('virtuemart_shipmentmethod_id', $orderbt->virtuemart_shipmentmethod_id);
error_reporting(0);
parent::display($tpl);
}