本文整理汇总了PHP中GetAvailableModules函数的典型用法代码示例。如果您正苦于以下问题:PHP GetAvailableModules函数的具体用法?PHP GetAvailableModules怎么用?PHP GetAvailableModules使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetAvailableModules函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetCheckoutModulesThatCustomerHasAccessTo
/**
* Get a list of checkout modules that are enabled, configured and that the customer has access to.
*
* @param boolean Set to true if we're on the 'confirm order' page.
* @return array An array of available modules.
*/
function GetCheckoutModulesThatCustomerHasAccessTo($confirmPage=false)
{
$modules = GetAvailableModules('checkout', true, true);
$availableModules = array();
foreach($modules as $module) {
// Is the module accessible and supported?
if(!$module['object']->IsAccessible() || !$module['object']->IsSupported()) {
$module['object']->ResetErrors();
continue;
}
// If we have a vendor order, does the module support these?
if(!defined('ISC_ADMIN_CP')) {
// Maybe we're on the "Confirm Order" page
if($confirmPage && !$module['object']->showOnConfirmPage) {
continue;
}
}
// Otherwise, the module is available soo add it to the list
$availableModules[] = $module;
$module['object']->ResetErrors();
}
return $availableModules;
}
示例2: manageOptimizer
/**
* Display the store-wide GWO tests list
*
*/
private function manageOptimizer()
{
$Tests = GetAvailableModules('optimizer');
$Output = "";
$EnabledModules = array();
$GLOBALS['Message'] = GetFlashMessageBoxes();
$EnabledModules = GetConfig('OptimizerMethods');
$GLOBALS['OptimizerRow'] = '';
foreach ($Tests as $Test) {
$GLOBALS['ModuleName'] = isc_html_escape($Test['name']);
$GLOBALS['ModuleId'] = $Test['id'];
$GLOBALS['ConfiguredIcon'] = 'cross';
$GLOBALS['ConfiguredDate'] = 'N/A';
$GLOBALS['ActiveReset'] = 'inactive';
if($Test['enabled']) {
$GLOBALS['ActiveReset'] = 'active';
$GLOBALS['ConfiguredIcon'] = 'tick';
if(isset($EnabledModules[$Test['id']]) && $EnabledModules[$Test['id']] != '') {
$GLOBALS['ConfiguredDate'] = isc_date('jS M Y',$EnabledModules[$Test['id']]);
}
}
$GLOBALS['OptimizerRow'] .= $this->template->render('Snippets/OptimizerRow.html');
}
$this->template->display('optimizer.manage.tpl');
}
示例3: manageCommentSystemSettings
private function manageCommentSystemSettings()
{
$GLOBALS['BreadcrumEntries'][GetLang('CommentSettingsTitle')] = '';
$this->template->assign('Message', GetFlashMessageBoxes());
$tabs = array('general' => GetLang('GeneralSettings'));
$moduleTabContent = '';
$systemModules = GetAvailableModules('comments');
$commentSystems = array();
foreach ($systemModules as $module) {
$commentSystems[] = array('label' => $module['name'], 'value' => $module['id'], 'selected' => $module['enabled']);
// add the module to the list of tabs so it can be configured
if ($module['enabled']) {
$tabs[$module['id']] = $module['name'];
$moduleTabContent .= sprintf('<div id="%s" style="padding-top: 10px;" class="tabContent">%s</div>', $module['id'], $module['object']->GetPropertiesSheet($module['id']));
}
}
$currentTab = 0;
if (isset($_GET['tab'])) {
$currentTab = $_GET['tab'];
}
$this->template->assign('currentTab', $currentTab);
$this->template->assign('tabs', $tabs);
$this->template->assign('commentSystems', $commentSystems);
$this->template->assign('moduleTabContent', $moduleTabContent);
$this->engine->PrintHeader();
$this->template->display('settings.comments.manage.tpl');
$this->engine->PrintFooter();
}
示例4: SetPanelSettings
public function SetPanelSettings()
{
// Setup the cart values
$total = $count = 0;
$GLOBALS['SNIPPETS']['SideCartItems'] = '';
if (!isset($_SESSION['CART']['ITEMS']) || empty($_SESSION['CART']['ITEMS'])) {
$this->DontDisplay = true;
return;
}
if (isset($_SESSION['CART']['ITEMS'])) {
foreach ($_SESSION['CART']['ITEMS'] as $item) {
$total += $item['product_price'] * $item['quantity'];
$count += $item['quantity'];
if (!isset($item['type']) || $item['type'] != "giftcertificate") {
$GLOBALS['ProductName'] = "<a href=\"" . ProdLink($item['product_name']) . "\">" . isc_html_escape($item['product_name']) . "</a>";
} else {
$GLOBALS['ProductName'] = isc_html_escape($item['product_name']);
}
// Is this product a variation?
$GLOBALS['ProductOptions'] = '';
if (isset($item['options']) && !empty($item['options'])) {
$GLOBALS['ProductOptions'] .= "<br /><small>(";
$comma = '';
foreach ($item['options'] as $name => $value) {
if (!trim($name) || !trim($value)) {
continue;
}
$GLOBALS['ProductOptions'] .= $comma . isc_html_escape($name) . ": " . isc_html_escape($value);
$comma = ', ';
}
$GLOBALS['ProductOptions'] .= ")</small>";
}
$GLOBALS['ProductPrice'] = CurrencyConvertFormatPrice($item['product_price'] * $item['quantity']);
$GLOBALS['ProductQuantity'] = $item['quantity'];
$GLOBALS['SNIPPETS']['SideCartItems'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SideCartItem");
}
}
if ($count == 1) {
$GLOBALS['SideCartItemCount'] = GetLang('SideCartYouHave1Item');
} else {
$GLOBALS['SideCartItemCount'] = sprintf(GetLang('SideCartYouHaveXItems'), $count);
}
$GLOBALS['ISC_LANG']['SideCartTotalCost'] = sprintf(GetLang('SideCartTotalCost'), CurrencyConvertFormatPrice($total));
// Go through all the checkout modules looking for one with a GetSidePanelCheckoutButton function defined
$GLOBALS['AdditionalCheckoutButtons'] = '';
$HideCheckout = false;
foreach (GetAvailableModules('checkout', true, true) as $module) {
if (method_exists($module['object'], 'GetSidePanelCheckoutButton')) {
$GLOBALS['AdditionalCheckoutButtons'] .= $module['object']->GetSidePanelCheckoutButton();
}
if ($module['object']->disableNonCartCheckoutButtons) {
$HideCheckout = true;
}
}
if ($HideCheckout) {
$GLOBALS['SNIPPETS']['SideCartContentsCheckoutLink'] = '';
} else {
$GLOBALS['SNIPPETS']['SideCartContentsCheckoutLink'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('SideCartContentsCheckoutLink');
}
}
示例5: GetCheckoutModulesThatCustomerHasAccessTo
/**
* Get a list of checkout modules that are enabled, configured and that the customer has access to.
*
* @param boolean Set to true if we're on the 'confirm order' page.
* @return array An array of available modules.
*/
function GetCheckoutModulesThatCustomerHasAccessTo($confirmPage = false)
{
$modules = GetAvailableModules('checkout', true, true);
$availableModules = array();
foreach ($modules as $module) {
// Is the module accessible and supported?
if (!$module['object']->IsAccessible() || !$module['object']->IsSupported()) {
$module['object']->ResetErrors();
continue;
}
// If we have a vendor order, does the module support these?
if (!defined('ISC_ADMIN_CP')) {
$cart = GetClass('ISC_CART');
$cartVendors = $cart->api->GetCartVendorIds();
if (count($cartVendors) > 1 && $module['object']->IsVendorCompatible() == false) {
continue;
}
// Compatible with split shipping?
$checkout = GetClass('ISC_CHECKOUT');
$shippingAddresses = $checkout->GetOrderShippingAddresses();
if (count($shippingAddresses) > 1 && $module['object']->IsMultiShippingCompatible() == false) {
continue;
}
// Maybe we're on the "Confirm Order" page
if ($confirmPage && !$module['object']->showOnConfirmPage) {
continue;
}
}
// Otherwise, the module is available soo add it to the list
$availableModules[] = $module;
$module['object']->ResetErrors();
}
return $availableModules;
}
示例6: SetPanelSettings
public function SetPanelSettings()
{
$numItems = getCustomerQuote()->getNumItems();
$ShowCheckoutButton = false;
if($numItems > 0) {
foreach (GetAvailableModules('checkout', true, true) as $module) {
if ($module['object']->disableNonCartCheckoutButtons) {
$GLOBALS['HideCheckoutButton'] = 'display: none';
$ShowCheckoutButton = false;
break;
}
if (!method_exists($module['object'], 'GetCheckoutButton')) {
$ShowCheckoutButton = true;
}
}
}
$GLOBALS['HideCheckoutButton'] = '';
if (!$ShowCheckoutButton) {
$GLOBALS['HideCheckoutButton'] = 'display: none';
}
$this->insertOptimizerLinkScript();
}
示例7: GetTrackingCodeForAllPackages
/**
* Return the tracking code for all of the enabled analytics modules.
*
* @return string The tracking code to be inserted on pages.
*/
function GetTrackingCodeForAllPackages()
{
$packages = GetAvailableModules('analytics', true, true);
$code = "";
foreach ($packages as $package) {
if (GetModuleById('analytics', $module, $package['id'])) {
$trackingCode = $module->GetTrackingCode();
}
$code .= "<!-- Start Tracking Code for " . $package['id'] . " -->\n\n" . $trackingCode . "\n\n<!-- End Tracking Code for " . $package['id'] . " -->\n\n";
}
return $code;
}
示例8: SetPanelSettings
public function SetPanelSettings()
{
$ShowCheckoutButton = false;
if (isset($_SESSION['CART']['NUM_ITEMS']) && $_SESSION['CART']['NUM_ITEMS'] != 0) {
foreach (GetAvailableModules('checkout', true, true) as $module) {
if ($module['object']->disableNonCartCheckoutButtons) {
$GLOBALS['HideCheckoutButton'] = 'display: none';
$ShowCheckoutButton = false;
break;
}
if (!method_exists($module['object'], 'GetCheckoutButton')) {
$ShowCheckoutButton = true;
}
}
}
$GLOBALS['HideCheckoutButton'] = '';
if (!$ShowCheckoutButton) {
$GLOBALS['HideCheckoutButton'] = 'display: none';
}
}
示例9: manageShippingManagerSettings
private function manageShippingManagerSettings()
{
$GLOBALS['BreadcrumEntries'][GetLang('ShippingManagerSettings')] = '';
$this->template->assign('Message', GetFlashMessageBoxes());
$tabs = array('general' => GetLang('GeneralSettings'));
$moduleTabContent = '';
$managerModules = GetAvailableModules('shippingmanager');
$shippingManagers = array();
$enabledShippingManagers = array();
foreach ($managerModules as $module) {
$shippingManagers[$module['id']] = $module['name'];
// add the module to the list of tabs so it can be configured
if ($module['enabled']) {
$tabs[$module['id'] ] = $module['name'];
$moduleTabContent .= sprintf('<div id="%s" style="padding-top: 10px;" class="tabContent">%s</div>', $module['id'], $module['object']->GetPropertiesSheet($module['id']));
$enabledShippingManagers[] = $module['id'];
}
}
$currentTab = 'general';
if (isset($_GET['tab'])) {
$currentTab = $_GET['tab'];
}
$this->template->assign('currentTab', $currentTab);
$this->template->assign('tabs', $tabs);
$this->template->assign('shippingManagers', $shippingManagers);
$this->template->assign('enabledShippingManagers', $enabledShippingManagers);
$this->template->assign('moduleTabContent', $moduleTabContent);
$this->engine->PrintHeader();
$this->template->display('settings.shippingmanager.manage.tpl');
$this->engine->PrintFooter();
}
示例10: SetPanelSettings
public function SetPanelSettings()
{
$_SESSION['you_save'] = 0;
//blessen
$GLOBALS['SNIPPETS']['CartItems'] = "";
$count = 0;
$subtotal = 0;
$_SESSION['CHECKOUT'] = array();
// Get a list of all products in the cart
$GLOBALS['ISC_CLASS_CART'] = GetClass('ISC_CART');
$product_array = $GLOBALS['ISC_CLASS_CART']->api->GetProductsInCart();
$GLOBALS['AdditionalCheckoutButtons'] = '';
// Go through all the checkout modules looking for one with a GetSidePanelCheckoutButton function defined
$ShowCheckoutButton = false;
if (!empty($product_array)) {
foreach (GetAvailableModules('checkout', true, true) as $module) {
if (isset($module['object']->_showBothButtons) && $module['object']->_showBothButtons) {
$ShowCheckoutButton = true;
$GLOBALS['AdditionalCheckoutButtons'] .= $module['object']->GetCheckoutButton();
} elseif (method_exists($module['object'], 'GetCheckoutButton')) {
$GLOBALS['AdditionalCheckoutButtons'] .= $module['object']->GetCheckoutButton();
} else {
$ShowCheckoutButton = true;
}
}
}
$GLOBALS['HideMultipleAddressShipping'] = 'display: none';
if (gzte11(ISC_MEDIUMPRINT) && $GLOBALS['ISC_CLASS_CART']->api->GetNumPhysicalProducts() > 1 && $ShowCheckoutButton && GetConfig("MultipleShippingAddresses")) {
$GLOBALS['HideMultipleAddressShipping'] = '';
}
$GLOBALS['HideCheckoutButton'] = '';
if (!$ShowCheckoutButton) {
$GLOBALS['HideCheckoutButton'] = 'display: none';
$GLOBALS['HideMultipleAddressShippingOr'] = 'display: none';
}
$wrappingOptions = $GLOBALS['ISC_CLASS_DATA_STORE']->Read('GiftWrapping');
if (empty($wrappingOptions)) {
$publicWrappingOptions = false;
} else {
$publicWrappingOptions = true;
}
if (!GetConfig('ShowThumbsInCart')) {
$GLOBALS['HideThumbColumn'] = 'display: none';
$GLOBALS['ProductNameSpan'] = 2;
} else {
$GLOBALS['HideThumbColumn'] = '';
$GLOBALS['ProductNameSpan'] = 1;
}
$wrappingAdjustment = 0;
$itemTotal = 0;
foreach ($product_array as $k => $product) {
$GLOBALS['CartItemId'] = (int) $product['cartitemid'];
// If the item in the cart is a gift certificate, we need to show a special type of row
if (isset($product['type']) && $product['type'] == "giftcertificate") {
$GLOBALS['GiftCertificateName'] = isc_html_escape($product['data']['prodname']);
$GLOBALS['GiftCertificateAmount'] = CurrencyConvertFormatPrice($product['giftamount']);
$GLOBALS['GiftCertificateTo'] = isc_html_escape($product['certificate']['to_name']);
$GLOBALS["Quantity" . $product['quantity']] = 'selected="selected"';
$GLOBALS['ProductPrice'] = CurrencyConvertFormatPrice($product['giftamount']);
$GLOBALS['ProductTotal'] = CurrencyConvertFormatPrice($product['giftamount'] * $product['quantity']);
$itemTotal += $product['giftamount'] * $product['quantity'];
$GLOBALS['SNIPPETS']['CartItems'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("CartItemGiftCertificate");
} else {
$GLOBALS['ProductLink'] = ProdLink($product['data']['prodname']);
$GLOBALS['ProductAvailability'] = isc_html_escape($product['data']['prodavailability']);
$GLOBALS['ItemId'] = (int) $product['data']['productid'];
$GLOBALS['VariationId'] = (int) $product['variation_id'];
$GLOBALS['ProductQuantity'] = (int) $product['quantity'];
//blessen
$GLOBALS['prodretailprice'] = CurrencyConvertFormatPrice($product['data']['prodretailprice']);
if ($product['data']['prodretailprice'] > $product['data']['prodcalculatedprice']) {
$_SESSION['you_save'] += ($product['data']['prodretailprice'] - $product['data']['prodcalculatedprice']) * $product['quantity'];
}
//$GLOBALS['saveprice'] = CurrencyConvertFormatPrice($product['data']['prodretailprice'] - $product['data']['prodcalculatedprice']);
//blessen
// Should we show thumbnails in the cart?
if (GetConfig('ShowThumbsInCart')) {
$GLOBALS['ProductImage'] = ImageThumb($product['data']['imagefile'], ProdLink($product['data']['prodname']));
}
$GLOBALS['UpdateCartQtyJs'] = "Cart.UpdateQuantity(this.options[this.selectedIndex].value);";
$GLOBALS['HideCartProductFields'] = 'display:none;';
$GLOBALS['CartProductFields'] = '';
$this->GetProductFieldDetails($product['product_fields'], $k);
$GLOBALS['EventDate'] = '';
if (isset($product['event_date'])) {
$GLOBALS['EventDate'] = '<div style="font-style: italic; font-size:10px; color:gray">(' . $product['event_name'] . ': ' . isc_date('M jS Y', $product['event_date']) . ')</div>';
}
// Can this product be wrapped?
$GLOBALS['GiftWrappingName'] = '';
$GLOBALS['HideGiftWrappingAdd'] = '';
$GLOBALS['HideGiftWrappingEdit'] = 'display: none';
$GLOBALS['HideGiftWrappingPrice'] = 'display: none';
$GLOBALS['GiftWrappingPrice'] = '';
$GLOBALS['GiftMessagePreview'] = '';
$GLOBALS['HideGiftMessagePreview'] = 'display: none';
$GLOBALS['HideWrappingOptions'] = 'display: none';
if ($product['data']['prodtype'] == PT_PHYSICAL && $product['data']['prodwrapoptions'] != -1 && $publicWrappingOptions == true) {
$GLOBALS['HideWrappingOptions'] = '';
if (isset($product['wrapping'])) {
$GLOBALS['GiftWrappingName'] = isc_html_escape($product['wrapping']['wrapname']);
//.........这里部分代码省略.........
示例11: handleViewEmailIntegrationSettings
/**
* Displays the settings for this module type
*
* @return void
*/
protected function handleViewEmailIntegrationSettings()
{
if (isset($_REQUEST['currentTab'])) {
$this->template->assign('tab', $_REQUEST['currentTab']);
}
$this->engine->addBreadcrumb(GetLang('EmailMarketing'), 'index.php?ToDo=viewEmailIntegrationSettings');
$this->engine->stylesheets[] = 'Styles/settings.emailintegration.manage.css';
$this->engine->bodyScripts[] = '../javascript/json2.js';
$this->engine->bodyScripts[] = 'script/linker.js';
$this->engine->bodyScripts[] = '../javascript/ajaxDataProvider.js';
$this->engine->bodyScripts[] = 'script/emailintegration.js';
$this->engine->bodyScripts[] = 'script/settings.emailintegration.manage.js';
// full list of modules; for tabs, divs and js
$modules = GetAvailableModules('emailintegration');
// for visual purposes, place the export only module at the end
foreach ($modules as $index => $module) {
if ($module['id'] == 'emailintegration_exportonly') {
array_splice($modules, $index, 1);
$modules[] = $module;
break;
}
}
// flag to store whether or not there are selectable modules which are enabled -- used to show/hide some form elements
$enabledSelectableModules = false;
// add some data to the array returned by GetAvailableModules for display purposes
foreach ($modules as &$module) {
$module['provider'] = str_replace('emailintegration_', '', $module['id']);
}
unset($module);
$this->template->assign('modules', $modules);
// for the twig form builder; a list of selectable modules
$selectableModules = array();
foreach ($modules as $module) {
if ($module['object']->isSelectable()) {
$selectableModules[$module['id']] = $module['name'];
}
}
$this->template->assign('selectableModules', $selectableModules);
// for the twig form builder; a list of module tab id / labels and selected modules
$tabs = array('modules' => GetLang('GeneralSettings'));
$selectedModules = array();
foreach ($modules as $module) {
if (!$module['enabled']) {
continue;
}
$tabs[$module['id']] = $module['name'];
if ($module['object']->isSelectable()) {
$enabledSelectableModules = true;
$selectedModules[] = $module['id'];
}
if ($module['object']->getSettingsJavascript()) {
$this->engine->bodyScripts[] = '../modules/emailintegration/' . $module['provider'] . '/javascript/' . $module['object']->getSettingsJavascript();
}
}
$this->template->assign('enabledSelectableModules', $enabledSelectableModules);
$this->template->assign('tabs', $tabs);
$this->template->assign('selectedModules', $selectedModules);
$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader();
$this->template->display('settings.emailintegration.manage.tpl');
$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter();
}
示例12: GetEnabledModules
/**
* Return a list of the enabled live chat modules.
*
* @return array An array containing the enabled live chat modules.
*/
public function GetEnabledModules()
{
return GetAvailableModules('livechat', true);
}
示例13: UpdateTrackingNo
/**
* Update the tracking number of an order from the manage orders page
*
* @return void
**/
private function UpdateTrackingNo()
{
if (isset($_REQUEST['o']) && isset($_REQUEST['tn'])) {
$order_id = (int) $_REQUEST['o'];
$order = GetOrder($order_id);
if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId() && $order['ordvendorid'] != $GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId()) {
echo 0;
exit;
}
$trackingno = $GLOBALS['ISC_CLASS_DB']->Quote($_REQUEST['tn']);
$updatedOrder = array("ordtrackingno" => $_REQUEST['tn']);
if ($GLOBALS['ISC_CLASS_DB']->UpdateQuery("orders", $updatedOrder, "orderid='" . $GLOBALS['ISC_CLASS_DB']->Quote($order_id) . "'")) {
echo "1";
} else {
echo "0";
}
// If the checkout module that was used for an order is still enabled and has a function
// to handle a status change, then call that function
$valid_checkout_modules = GetAvailableModules('checkout', true, true);
$valid_checkout_module_ids = array();
foreach ($valid_checkout_modules as $valid_module) {
$valid_checkout_module_ids[] = $valid_module['id'];
}
$query = "SELECT *\n\t\t\t\tFROM [|PREFIX|]orders\n\t\t\t\tWHERE orderid = '" . $GLOBALS['ISC_CLASS_DB']->Quote($order_id) . "'";
$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
$order = $GLOBALS['ISC_CLASS_DB']->Fetch($result);
if (in_array($order['orderpaymentmodule'], $valid_checkout_module_ids)) {
GetModuleById('checkout', $checkout_module, $order['orderpaymentmodule']);
if (method_exists($checkout_module, 'HandleUpdateTrackingNum')) {
call_user_func(array($checkout_module, 'HandleUpdateTrackingNum'), $order_id, $trackingno);
}
}
// Log this action
$GLOBALS['ISC_CLASS_LOG']->LogAdminAction($order_id, $trackingno);
}
}
示例14: CreateView
/**
* Create a view for orders. Uses the same form as searching but puts the
* name of the view at the top and it's mandatory instead of optional.
*/
protected function CreateView()
{
$GLOBALS['OrderPaymentOptions'] = "";
$GLOBALS['OrderShippingOptions'] = "";
$GLOBALS['OrderTypeOptions'] = "";
if (GetConfig('CurrencyLocation') == 'right') {
$GLOBALS['CurrencyTokenLeft'] = '';
$GLOBALS['CurrencyTokenRight'] = GetConfig('CurrencyToken');
} else {
$GLOBALS['CurrencyTokenLeft'] = GetConfig('CurrencyToken');
$GLOBALS['CurrencyTokenRight'] = '';
}
$checkout_providers = GetCheckoutModulesThatCustomerHasAccessTo();
$shipping_providers = GetAvailableModules('shipping', false, true, false);
foreach($checkout_providers as $provider) {
$GLOBALS['OrderPaymentOptions'] .= sprintf("<option value='%s'>%s</option>", $provider['object']->GetId(), $provider['object']->GetName());
}
if($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Ebay_Selling) && gzte11(ISC_LARGEPRINT)) {
$GLOBALS['OrderTypeOptions'] = $this->GetOrderTypeOptions();
}
foreach($shipping_providers as $provider) {
$GLOBALS['OrderShippingOptions'] .= sprintf("<option value='%s'>%s</option>", $provider['object']->GetId(), $provider['object']->GetName());
}
$GLOBALS['OrderStatusOptions'] = $this->GetOrderStatusOptions();
$this->template->display('orders.view.tpl');
}
示例15: CreateView
/**
* Create a view for orders. Uses the same form as searching but puts the
* name of the view at the top and it's mandatory instead of optional.
*/
private function CreateView()
{
$GLOBALS['OrderPaymentOptions'] = "";
$GLOBALS['OrderShippingOptions'] = "";
if (GetConfig('CurrencyLocation') == 'right') {
$GLOBALS['CurrencyTokenLeft'] = '';
$GLOBALS['CurrencyTokenRight'] = GetConfig('CurrencyToken');
} else {
$GLOBALS['CurrencyTokenLeft'] = GetConfig('CurrencyToken');
$GLOBALS['CurrencyTokenRight'] = '';
}
$checkout_providers = GetCheckoutModulesThatCustomerHasAccessTo();
$shipping_providers = GetAvailableModules('shipping', false, true, false);
foreach ($checkout_providers as $provider) {
$GLOBALS['OrderPaymentOptions'] .= sprintf("<option value='%s'>%s</option>", $provider['object']->GetId(), $provider['object']->GetName());
}
foreach ($shipping_providers as $provider) {
$GLOBALS['OrderShippingOptions'] .= sprintf("<option value='%s'>%s</option>", $provider['object']->GetId(), $provider['object']->GetName());
}
$GLOBALS['OrderStatusOptions'] = $this->GetOrderStatusOptions();
$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate("orders.view");
$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();
}