本文整理汇总了PHP中GetCountryList函数的典型用法代码示例。如果您正苦于以下问题:PHP GetCountryList函数的具体用法?PHP GetCountryList怎么用?PHP GetCountryList使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetCountryList函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SetPanelSettings
public function SetPanelSettings()
{
$selectedCountry = GetConfig('CompanyCountry');
$selectedState = 0;
if (isset($GLOBALS['SavedAddress']) && is_array($GLOBALS['SavedAddress'])) {
$address = $GLOBALS['SavedAddress'];
$selectedCountry = $address['shipcountry'];
$addressVars = array('account_email' => 'AccountEmail', 'shipfirstname' => 'AddressFirstName', 'shiplastname' => 'AddressLastName', 'shipcompany' => 'AddressCompany', 'shipaddress1' => 'AddressLine1', 'shipaddress2' => 'AddressLine2', 'shipcity' => 'AddressCity', 'shipstate' => 'AddressState', 'shipzip' => 'AddressZip', 'shipphone' => 'AddressPhone');
if (isset($address['shipstateid'])) {
$selectedState = $address['shipstateid'];
}
foreach ($addressVars as $addressField => $formField) {
if (isset($address[$addressField])) {
$GLOBALS[$formField] = isc_html_escape($address[$addressField]);
}
}
}
$country_id = GetCountryIdByName($selectedCountry);
$GLOBALS['CountryList'] = GetCountryList(GetConfig('CompanyCountry'), true);
$GLOBALS['StateList'] = GetStateListAsOptions($country_id, $selectedState);
// If there are no states for the country then
// hide the dropdown and show the textbox instead
if (GetNumStatesInCountry($country_id) == 0) {
$GLOBALS['HideStateList'] = "none";
} else {
$GLOBALS['HideStateBox'] = "none";
}
}
示例2: TestQuoteForm
/**
* Test the shipping method by displaying a simple HTML form
*/
public function TestQuoteForm()
{
// Load up the module variables
$this->SetCustomVars();
// Which countries has the user chosen to ship orders to?
$GLOBALS['Countries'] = GetCountryList(GetConfig('CompanyCountry'));
$GLOBALS['StateList'] = GetStatesByCountryNameAsOptions(GetConfig('CompanyCountry'), $numStates);
$GLOBALS['WeightMeasurement'] = GetConfig('WeightMeasurement');
if (!$GLOBALS['StateList']) {
$GLOBALS['StateNameAppend'] = '2';
$GLOBALS['HideStatesList'] = 'display: none';
}
$GLOBALS['Image'] = $this->GetImage();
$this->ParseTemplate("module.upsonline.test");
}
示例3: CreateView
/**
* Create a view for customers. 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()
{
if (GetConfig('CurrencyLocation') == 'right') {
$GLOBALS['CurrencyTokenLeft'] = '';
$GLOBALS['CurrencyTokenRight'] = GetConfig('CurrencyToken');
} else {
$GLOBALS['CurrencyTokenLeft'] = GetConfig('CurrencyToken');
$GLOBALS['CurrencyTokenRight'] = '';
}
$GLOBALS['CountryList'] = GetCountryList("", false);
$GLOBALS['HideStateList'] = "none";
if (gzte11(ISC_MEDIUMPRINT)) {
$GLOBALS['CustomerGroups'] = $this->GetCustomerGroupsAsOptions();
} else {
$GLOBALS['HideCustomerGroups'] = "none";
}
$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate("customers.view");
$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();
}
示例4: _getCurrencyOriginOptions
private function _getCurrencyOriginOptions($countryid = null, $regionid = null)
{
$html = '<optgroup id="currencyorigintype-region" label="' . isc_html_escape(GetLang('CurrencyRegions')) . '">';
$html .= GetRegionList($regionid, false, "AllRegions", 0, true);
$html .= '</optgroup>';
$html .= '<optgroup id="currencyorigintype-country" label="' . isc_html_escape(GetLang('CurrencyCountries')) . '">';
$html .= GetCountryList($countryid, false, "AllCountries", 0, true);
$html .= '</optgroup>';
return $html;
}
示例5: TestQuoteForm
/**
* Test the shipping method by displaying a simple HTML form
*/
public function TestQuoteForm()
{
$GLOBALS['DeliveryTypes'] = "";
$del_types = $this->GetValue("deliverytypes");
if (!is_array($del_types)) {
$del_types = array($del_types);
}
// Load up the module variables
$this->SetCustomVars();
foreach ($this->_variables['deliverytypes']['options'] as $k => $v) {
if (in_array($v, $del_types)) {
$sel = 'selected="selected"';
} else {
$sel = "";
}
$GLOBALS['DeliveryTypes'] .= sprintf("<option %s value='%s'>%s</option>", $sel, $v, $k);
}
// Which countries has the user chosen to ship orders to?
$GLOBALS['Countries'] = GetCountryList("Australia");
$GLOBALS['WeightUnit'] = GetConfig('WeightMeasurement');
$GLOBALS['Image'] = $this->_image;
$this->ParseTemplate("module.royalmail.test");
}
示例6: setUpShippingAndHandling
/**
* Set up everything pertaining to the display of the 'Estimate Shipping'
* feature, as well as the shipping cost of all items in the cart if it is
* known.
*/
public function setUpShippingAndHandling()
{
$GLOBALS['HideShoppingCartShippingCost'] = 'none';
$GLOBALS['HideShoppingCartHandlingCost'] = 'none';
$GLOBALS['HideShoppingCartShippingEstimator'] = 'display: none';
$this->quote->setIsSplitShipping(false);
$handling = $this->quote->getHandlingCost($this->displayIncludingTax);
if($handling > 0) {
$handlingFormatted = currencyConvertFormatPrice($handling);
$GLOBALS['HandlingCost'] = $handlingFormatted;
$GLOBALS['HideShoppingCartHandlingCost'] = '';
}
// All products in the cart are digital downloads so the shipping doesn't apply
if($this->quote->isDigital()) {
return;
}
// If we're still here, shipping applies to this order
$GLOBALS['HideShoppingCartShippingEstimator'] = '';
$selectedCountry = GetCountryIdByName(GetConfig('CompanyCountry'));
$selectedState = 0;
$selectedStateName = '';
// Retain the country, stae and zip code selections if we have them
$shippingAddress = $this->quote->getShippingAddress(0);
if($shippingAddress->getCountryId()) {
$selectedCountry = $shippingAddress->getCountryId();
$selectedState = $shippingAddress->getStateId();
$GLOBALS['ShippingZip'] = $shippingAddress->getZip();
}
$GLOBALS['ShippingCountryList'] = GetCountryList($selectedCountry);
$GLOBALS['ShippingStateList'] = GetStateListAsOptions($selectedCountry, $selectedState);
$GLOBALS['ShippingStateName'] = isc_html_escape($selectedStateName);
// If there are no states for the country then hide the dropdown and show the textbox instead
if (GetNumStatesInCountry($selectedCountry) == 0) {
$GLOBALS['ShippingHideStateList'] = "none";
}
else {
$GLOBALS['ShippingHideStateBox'] = "none";
}
// Show the stored shipping estimate if we have one
if($shippingAddress->hasShippingMethod()) {
$GLOBALS['HideShoppingCartShippingCost'] = '';
$cost = $shippingAddress->getNonDiscountedShippingCost($this->displayIncludingTax);
if($cost == 0) {
$GLOBALS['ShippingCost'] = getLang('Free');
}
else {
$GLOBALS['ShippingCost'] = currencyConvertFormatPrice($cost);
}
$GLOBALS['ShippingProvider'] = isc_html_escape($shippingAddress->getShippingProvider());
}
}
示例7: TestQuoteForm
/**
* Test the shipping method by displaying a simple HTML form
*/
public function TestQuoteForm()
{
// Which countries has the user chosen to ship orders to?
$GLOBALS['Countries'] = GetCountryList($this->_origin_country['country_name']);
$GLOBALS['WeightMeasurement'] = GetConfig('WeightMeasurement');
$GLOBALS['Image'] = $this->GetImage();
$this->ParseTemplate("module.usps.test");
}
示例8: GetVariables
/**
* GetVariables
* This is step 1 of the installation process. It checks all the right files
* and folders have write permissions and prompts the user for all install variables.
*
* @param Boolean $Error defaults to false, if its set to true, something went wrong!
*
* @return Void
*/
private function GetVariables($Error = false, $Message = "")
{
if(defined('INSTALL_WARNING_MSG') && INSTALL_WARNING_MSG) {
$GLOBALS['InstallWarning'] = INSTALL_WARNING_MSG;
}
else {
$GLOBALS['HideInstallWarning'] = 'display: none';
}
// Check the prerequisites
$this->CheckInstallationPrerequisites();
if($Error) {
$GLOBALS['Message'] = "<h3 style='padding-bottom:10px; color:red'>" . GetLang("Oops") . "</h3>" . $Message;
$GLOBALS['LicenseKey'] = $_POST['LK'];
$GLOBALS['ShopPath'] = $_POST['ShopPath'];
$GLOBALS['StoreCountryLocationId'] = $_POST['StoreCountryLocationId'];
$GLOBALS['StoreCurrencyCode'] = $_POST['StoreCurrencyCode'];
$GLOBALS['InstallSampleData'] = '';
if(isset($_POST['installSampleData'])) {
$GLOBALS['InstallSampleData'] = 'checked="checked"';
}
$GLOBALS['UserEmail'] = $_POST['UserEmail'];
$GLOBALS['UserPass'] = $_POST['UserPass'];
$GLOBALS['dbUser'] = $_POST['dbUser'];
$GLOBALS['dbPass'] = $_POST['dbPass'];
$GLOBALS['dbServer'] = $_POST['dbServer'];
$GLOBALS['dbDatabase'] = $_POST['dbDatabase'];
$GLOBALS['tablePrefix'] = $_POST['tablePrefix'];
$GLOBALS['AutoJS'] = "window.setTimeout(\"$('#dbChoice1').click(); $('.DBDetails').show();\", 100);";
}
else {
$GLOBALS['Message'] = "<h3 style='padding-bottom:10px'>" . GetLang("InstallInterspireShoppingCart") . "</h3>" . GetLang("InstallIntro");
$GLOBALS['InstallSampleData'] = 'checked="checked"';
$GLOBALS['StoreCountryLocationId'] = 0;
}
if(isset($GLOBALS['LicenseKey']) && isset($GLOBALS['LE'])) {
$GLOBALS['serverStamp'] = $GLOBALS['LicenseKey'];
getClass('ISC_ADMIN_AUTH')->SavePerms("");
if(isset($GLOBALS['KM'])) {
$GLOBALS['Message'] = "<h3 style='padding-bottom:10px; color:red'>" . GetLang("Oops") . "</h3>" . $Message;
}
}
if (!isset($GLOBALS['dbServer']) || $GLOBALS['dbServer'] == "") {
if (isset($_ENV['DATABASE_SERVER'])) {
// mediatemple.net kindly sets an environment variable with the
// correct mysql host, so if it exists, lets make use of it!
$GLOBALS['dbServer'] = isc_html_escape($_ENV['DATABASE_SERVER']);
} else {
$GLOBALS['dbServer'] = "localhost";
}
}
if(!isset($GLOBALS['tablePrefix']) || $GLOBALS['tablePrefix'] == "") {
$GLOBALS['tablePrefix'] = "isc_";
}
$app_path = dirname(dirname($_SERVER['PHP_SELF']))."/";
if(!isset($GLOBALS['ShopPath']) || $GLOBALS['ShopPath'] == "" || $GLOBALS['ShopPath'] == "http://") {
$GLOBALS['ShopPath'] = rtrim("http://" . $_SERVER["HTTP_HOST"] . $app_path, '/').'/';
}
$GLOBALS['StoreCountryList'] = GetCountryList($GLOBALS['StoreCountryLocationId'], false, "AllCountries", 0, true, false);
$this->template->assign('PCIPasswordMinLen', GetConfig('PCIPasswordMinLen'));
$this->template->display('install.form.tpl');
}
示例9: SetupPreCheckoutShipping
//.........这里部分代码省略.........
$GLOBALS['CartRuleMessage'] .= $message;
$GLOBALS['CartRuleMessage'] .= '</p>';
}
// If all of the products in the cart have free shipping, then we automatically qualify
if ($freeShippingProductCount == count($cartProducts) || $this->api->GetCartFreeShipping()) {
$GLOBALS['ShippingCost'] = GetLang('Free');
$freeShippingQualified = true;
$GLOBALS['HideCartFreeShippingPanel'] = "";
$GLOBALS['FreeShippingMessage'] = GetLang('OrderQualifiesForFreeShipping');
return;
}
// Show the estimation box
$GLOBALS['HideShoppingCartShippingEstimator'] = '';
// If we have a shipping zone already stored, we can show a little more
if (isset($_SESSION['OFFERCART']['SHIPPING']['ZONE'])) {
$zone = GetShippingZoneById($_SESSION['OFFERCART']['SHIPPING']['ZONE']);
// The zone no longer exists
if (!isset($zone['zoneid'])) {
unset($_SESSION['OFFERCART']['SHIPPING']);
return;
}
// If the contents of the cart have changed since their last known values (based off a unique hash of the cart contents)
// then invalidate the shipping costs
if (isset($_SESSION['OFFERCART']['SHIPPING']['CART_HASH']) && $this->api->GenerateCartHash() != $_SESSION['OFFERCART']['SHIPPING']['CART_HASH']) {
// Remove any existing shipping costs
$this->InvalidateCartShippingCosts();
}
// If we have a shipping cost saved, store it too
if (isset($_SESSION['OFFERCART']['SHIPPING']['SHIPPING_COST'])) {
$GLOBALS['HideShoppingCartShippingCost'] = '';
if ($_SESSION['OFFERCART']['SHIPPING']['SHIPPING_COST'] == 0) {
$GLOBALS['ShippingCost'] = GetLang('Free');
} else {
$GLOBALS['ShippingCost'] = CurrencyConvertFormatPrice($_SESSION['OFFERCART']['SHIPPING']['SHIPPING_COST']);
$subtotal += $_SESSION['OFFERCART']['SHIPPING']['SHIPPING_COST'];
$GLOBALS['ShippingProvider'] = isc_html_escape($_SESSION['OFFERCART']['SHIPPING']['SHIPPING_PROVIDER']);
}
}
// If there is a handling fee, we need to show it too
if (isset($_SESSION['OFFERCART']['SHIPPING']['HANDLING_FEE']) && $_SESSION['OFFERCART']['SHIPPING']['HANDLING_FEE'] > 0) {
$GLOBALS['HideShoppingCartHandlingCost'] = '';
$GLOBALS['HandlingCost'] = CurrencyConvertFormatPrice($_SESSION['OFFERCART']['SHIPPING']['HANDLING_FEE']);
$subtotal += $_SESSION['OFFERCART']['SHIPPING']['HANDLING_FEE'];
}
// This zone has free shipping set up. Do we qualify?
if ($zone['zonefreeshipping'] == 1) {
$GLOBALS['HideCartFreeShippingPanel'] = "";
// We don't have enough to qualify - but still show the "spend x more for free shipping" message
if ($GLOBALS['CartSubTotal'] < $zone['zonefreeshippingtotal']) {
$diff = CurrencyConvertFormatPrice($zone['zonefreeshippingtotal'] - $GLOBALS['CartSubTotal']);
if ($zone['zonehandlingfee'] > 0 && !$zone['zonehandlingseparate']) {
$GLOBALS['FreeShippingMessage'] = sprintf(GetLang('SpendXMoreXShipping'), $diff, CurrencyConvertFormatPrice($zone['zonehandlingfee']));
} else {
$GLOBALS['FreeShippingMessage'] = sprintf(GetLang('SpendXMoreFreeShipping'), $diff);
}
} else {
// Setup the shipping message - if a handling fee is to be applied, then they actually qualify for $X shipping, not free shipping
if ($zone['zonehandlingfee'] > 0 && !$zone['zonehandlingseparate']) {
$GLOBALS['FreeShippingMessage'] = sprintf(GetLang('OrderQualifiesForXShipping'), CurrencyConvertFormatPrice($zone['zonehandlingfee']));
} else {
$GLOBALS['FreeShippingMessage'] = GetLang('OrderQualifiesForFreeShipping');
}
}
}
}
$selectedCountry = GetCountryIdByName(GetConfig('CompanyCountry'));
$selectedState = 0;
$selectedStateName = '';
$zipCode = '';
// Retain the country, stae and zip code selections if we have them
if (isset($_SESSION['OFFERCART']['SHIPPING']['COUNTRY_ID'])) {
$selectedCountry = (int) $_SESSION['OFFERCART']['SHIPPING']['COUNTRY_ID'];
if (isset($_SESSION['OFFERCART']['SHIPPING']['STATE_ID'])) {
$selectedState = (int) $_SESSION['OFFERCART']['SHIPPING']['STATE_ID'];
}
if (isset($_SESSION['OFFERCART']['SHIPPING']['STATE'])) {
$selectedStateName = $_SESSION['OFFERCART']['SHIPPING']['STATE'];
}
if (isset($_SESSION['OFFERCART']['SHIPPING']['ZIP_CODE'])) {
$GLOBALS['ShippingZip'] = isc_html_escape($_SESSION['OFFERCART']['SHIPPING']['ZIP_CODE']);
}
}
$GLOBALS['ShippingCountryList'] = GetCountryList($selectedCountry);
$GLOBALS['ShippingStateList'] = GetStateListAsOptions($selectedCountry, $selectedState);
$GLOBALS['ShippingStateName'] = isc_html_escape($selectedStateName);
// If there are no states for the country then hide the dropdown and show the textbox instead
if (GetNumStatesInCountry($selectedCountry) == 0) {
$GLOBALS['ShippingHideStateList'] = "none";
} else {
$GLOBALS['ShippingHideStateBox'] = "none";
}
// if (isset($_SESSION['the_offered_price']))
// {
// $GLOBALS['CartSubTotal'] = $_SESSION['the_offered_price'];
// }
// else
// {
$GLOBALS['CartSubTotal'] = $subtotal;
// }
}
示例10: TestQuoteForm
/**
* Test the shipping method by displaying a simple HTML form
*/
public function TestQuoteForm()
{
// Which countries has the user chosen to ship orders to?
$GLOBALS['Countries'] = GetCountryList("United States");
$GLOBALS['Image'] = $this->_image;
$GLOBALS['WeightUnit'] = GetConfig('WeightMeasurement');
$GLOBALS['LengthUnit'] = GetConfig('LengthMeasurement');
$this->ParseTemplate("module.usps.test");
}
示例11: TestQuoteForm
/**
* Test the shipping method by displaying a simple HTML form
*/
public function TestQuoteForm()
{
$GLOBALS['Carriers'] = "";
$carriers = $this->GetValue("carriers");
if(!is_array($carriers)) {
$carriers = array($carriers);
}
// Load up the module variables
$this->SetCustomVars();
foreach($this->_variables['carriers']['options'] as $k => $v) {
if(in_array($v, $carriers)) {
$sel = 'selected="selected"';
} else {
$sel = "";
}
$GLOBALS['Carriers'] .= sprintf("<option %s value='%s'>%s</option>", $sel, $v, $k);
}
// Which countries has the user chosen to ship orders to?
$GLOBALS['Countries'] = GetCountryList("United States");
$GLOBALS['Measurement'] = isc_strtolower(GetConfig('WeightMeasurement'));
$GLOBALS['Image'] = $this->_image;
$this->ParseTemplate("module.intershipper.test");
}
示例12: TestQuoteForm
/**
* Test the shipping method by displaying a simple HTML form
*/
public function TestQuoteForm()
{
$GLOBALS['ServiceTypes'] = "";
$service_types = $this->GetValue("service");
if (!is_array($service_types)) {
$service_types = array($service_types);
}
// Load up the module variables
$this->SetCustomVars();
foreach ($this->_variables['service']['options'] as $k => $v) {
if (in_array($v, $service_types)) {
$sel = 'selected="selected"';
} else {
$sel = "";
}
$GLOBALS['ServiceTypes'] .= sprintf("<option %s value='%s'>%s</option>", $sel, $v, $k);
}
$GLOBALS['DeliveryTypes'] = "";
$del_types = $this->GetValue("carriercode");
if (!is_array($del_types)) {
$del_types = array($del_types);
}
foreach ($this->_variables['carriercode']['options'] as $k => $v) {
if (in_array($v, $del_types)) {
$sel = 'selected="selected"';
} else {
$sel = "";
}
$GLOBALS['DeliveryTypes'] .= sprintf("<option %s value='%s'>%s</option>", $sel, $v, $k);
}
// Which countries has the user chosen to ship orders to?
$first_country = "United States";
$GLOBALS['Countries'] = GetCountryList("United States");
$GLOBALS['WeightUnit'] = GetConfig('WeightMeasurement');
$num_states = 0;
$GLOBALS['StateList'] = $state_options = GetStatesByCountryNameAsOptions($first_country, $num_states);
$GLOBALS['Image'] = $this->_image;
$this->ParseTemplate("module.fedex.test");
}
示例13: ShowPaymentForm
/**
* ShowPaymentForm
* Show a payment form for this particular gateway if there is one.
* This is useful for gateways that require things like credit card details
* to be submitted and then processed on the site.
*/
public function ShowPaymentForm()
{
$GLOBALS['PayflowProMonths'] = "";
$GLOBALS['PayflowProYears'] = "";
for ($i = 1; $i <= 12; $i++) {
$stamp = mktime(0, 0, 0, $i, 15, isc_date("Y"));
$i = str_pad($i, 2, "0", STR_PAD_LEFT);
if (@$_POST['PayflowPro_ccexpm'] == $i) {
$sel = "SELECTED";
} else {
$sel = "";
}
$GLOBALS['PayflowProMonths'] .= sprintf("<option %s value='%s'>%s</option>", $sel, $i, isc_date("M", $stamp));
}
for ($i = isc_date("Y"); $i < isc_date("Y") + 10; $i++) {
if (@$_POST['PayflowPro_ccexpy'] == substr($i, 2, 2)) {
$sel = 'selected="selected"';
} else {
$sel = "";
}
$GLOBALS['PayflowProYears'] .= sprintf("<option %s value='%s'>%s</option>", $sel, substr($i, 2, 2), $i);
}
$requireCVV2 = $this->GetValue("requirecvv2");
if ($requireCVV2 == "YES") {
if (isset($_POST['PayflowPro_cccode'])) {
$GLOBALS['PayflowProCCV2'] = (int) $_POST['PayflowPro_cccode'];
}
$GLOBALS['PayflowProHideCVV2'] = '';
} else {
$GLOBALS['PayflowProHideCVV2'] = 'none';
}
// Grab the billing details for the order
$billingDetails = $this->GetBillingDetails();
$GLOBALS['PayflowProName'] = isc_html_escape($billingDetails['ordbillfirstname'] . ' ' . $billingDetails['ordbilllastname']);
$GLOBALS['PayflowProBillingAddress'] = isc_html_escape($billingDetails['ordbillstreet1']);
if ($billingDetails['ordbillstreet2'] != "") {
$GLOBALS['PayflowProBillingAddress'] .= " " . isc_html_escape($billingDetails['ordbillstreet2']);
}
$GLOBALS['PayflowProCity'] = isc_html_escape($billingDetails['ordbillsuburb']);
if ($billingDetails['ordbillstateid'] != 0 && GetStateISO2ById($billingDetails['ordbillstateid'])) {
$GLOBALS['PayflowProState'] = GetStateISO2ById($billingDetails['ordbillstateid']);
} else {
$GLOBALS['PayflowProState'] = isc_html_escape($billingDetails['ordbillstate']);
}
$GLOBALS['PayflowProCountry'] = GetCountryList($billingDetails['ordbillcountry'], false);
$GLOBALS['PayflowProBillingZip'] = $billingDetails['ordbillzip'];
// Format the amount that's going to be going through the gateway
$GLOBALS['OrderAmount'] = FormatPrice($this->GetGatewayAmount());
// Was there an error validating the payment? If so, pre-fill the form fields with the already-submitted values
if ($this->HasErrors()) {
$GLOBALS['PayflowProName'] = isc_html_escape($_POST['PayflowPro_name']);
$GLOBALS['PayflowProNum'] = isc_html_escape($_POST['PayflowPro_ccno']);
$GLOBALS['PayflowProBillingAddress'] = isc_html_escape($_POST['PayflowPro_ccaddress']);
$GLOBALS['PayflowProCity'] = isc_html_escape($_POST['PayflowPro_cccity']);
$GLOBALS['PayflowProState'] = isc_html_escape($_POST['PayflowPro_ccstate']);
$GLOBALS['PayflowProBillingZip'] = isc_html_escape($_POST['PayflowPro_zip']);
$GLOBALS['PayflowProErrorMessage'] = implode("<br />", $this->GetErrors());
$GLOBALS['PayflowProCountry'] = GetCountryList(isc_html_escape($_POST['PayflowPro_country']), false);
} else {
// Hide the error message box
$GLOBALS['HidePayflowProError'] = "none";
}
// Collect their details to send through to Payflow Pro
$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate("payflowpro");
return $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate(true);
}
示例14: EditTaxRate
/**
* Show the form to update an existing tax rate.
*/
private function EditTaxRate()
{
$GLOBALS['FormAction'] = "SettingsSaveUpdatedTaxRate";
$GLOBALS['TaxRateTitle'] = GetLang('EditTaxRate');
$GLOBALS['CancelMessage'] = GetLang('CancelAddTaxRate');
if (isset($_GET['taxRateId'])) {
$taxRateId = (int) $_GET['taxRateId'];
$query = sprintf("select * from [|PREFIX|]tax_rates where taxrateid='%d'", $taxRateId);
$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
$GLOBALS['hiddenFields'] = sprintf("<input type='hidden' name='taxrateid' value='%d' />", $taxRateId);
if ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
$GLOBALS['TaxRateName'] = isc_html_escape($row['taxratename']);
if ($row['taxratebasedon'] == "subtotal") {
$GLOBALS['BasedOnSubTotal'] = 'selected="selected"';
} else {
$GLOBALS['BasedOnSubTotalAndShipping'] = 'selected="selected"';
}
if ($row['taxaddress'] == 'shipping') {
$GLOBALS['TaxAddressShipping'] = 'selected="selected"';
} else {
$GLOBALS['TaxAddressBilling'] = 'selected="selected"';
}
$GLOBALS['CountryList'] = GetCountryList($row['taxratecountry'], true, "AllCountries", 0, true);
$row['taxratestates'] = trim($row['taxratestates'], ',');
if ($row['taxratestates'] == "0") {
$sel_first = true;
} else {
$sel_first = false;
}
// If there's at least one state for this country in the database, show the list
if (GetNumStatesInCountry($row['taxratecountry']) > 0) {
$GLOBALS['StateList'] = GetStateListAsOptions($row['taxratecountry'], explode(",", $row['taxratestates']), true, "AllStates", "0", $sel_first);
} else {
$GLOBALS['HideStateList'] = "none";
}
if ($row['taxratestatus'] == 1) {
$GLOBALS['TaxEnabled'] = 'checked="checked"';
}
$GLOBALS['TaxRatePercent'] = FormatPrice($row['taxratepercent'], false, false);
$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate("tax.form");
$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();
} else {
$this->ManageTaxSettings();
}
} else {
$this->ManageTaxSettings();
}
}
示例15: CreateView
/**
* Create a view for customers. 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()
{
if (GetConfig('CurrencyLocation') == 'right') {
$GLOBALS['CurrencyTokenLeft'] = '';
$GLOBALS['CurrencyTokenRight'] = GetConfig('CurrencyToken');
} else {
$GLOBALS['CurrencyTokenLeft'] = GetConfig('CurrencyToken');
$GLOBALS['CurrencyTokenRight'] = '';
}
$GLOBALS['CountryList'] = GetCountryList("", false);
$GLOBALS['HideStateList'] = "none";
if (gzte11(ISC_MEDIUMPRINT)) {
$GLOBALS['CustomerGroups'] = $this->GetCustomerGroupsAsOptions();
}
else {
$GLOBALS['HideCustomerGroups'] = "none";
}
$this->template->display('customers.view.tpl');
}