本文整理汇总了PHP中CurrencyConvertFormatPrice函数的典型用法代码示例。如果您正苦于以下问题:PHP CurrencyConvertFormatPrice函数的具体用法?PHP CurrencyConvertFormatPrice怎么用?PHP CurrencyConvertFormatPrice使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CurrencyConvertFormatPrice函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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');
}
}
示例2: SetPanelSettings
public function SetPanelSettings()
{
if ($GLOBALS['ISC_CLASS_PRODUCT']->IsPurchasingAllowed()) {
if (!GetConfig('ShowProductShipping')) {
$GLOBALS['HideShipping'] = 'none';
} else {
if ($GLOBALS['ISC_CLASS_PRODUCT']->GetProductType() == PT_PHYSICAL) {
if ($GLOBALS['ISC_CLASS_PRODUCT']->GetFixedShippingCost() != 0) {
// Is there a fixed shipping cost?
$GLOBALS['ShippingPrice'] = sprintf("%s %s", CurrencyConvertFormatPrice($GLOBALS['ISC_CLASS_PRODUCT']->GetFixedShippingCost()), GetLang('FixedShippingCost'));
} else {
if ($GLOBALS['ISC_CLASS_PRODUCT']->HasFreeShipping()) {
// Does this product have free shipping?
$GLOBALS['ShippingPrice'] = GetLang('FreeShipping');
} else {
// Shipping calculated at checkout
$GLOBALS['ShippingPrice'] = GetLang('CalculatedAtCheckout');
}
}
} else {
$GLOBALS['ShippingPrice'] = GetLang('CalculatedAtCheckout');
}
}
}
}
示例3: SetPanelSettings
public function SetPanelSettings()
{
$output = "";
$lastend = 0;
if (isset($GLOBALS['ISC_CLASS_CATEGORY'])) {
$categorySql = $GLOBALS['ISC_CLASS_CATEGORY']->GetCategoryAssociationSQL();
} else {
if (isset($GLOBALS['ISC_CLASS_PRICE'])) {
$categorySql = $GLOBALS['ISC_CLASS_PRICE']->GetCategoryAssociationSQL();
}
}
$query = "\n\t\t\t\tSELECT\n\t\t\t\t\tMIN(prodcalculatedprice) AS pmin,\n\t\t\t\t\tMAX(prodcalculatedprice) AS pmax\n\t\t\t\tFROM\n\t\t\t\t\t[|PREFIX|]products p\n\t\t\t\tWHERE\n\t\t\t\t\tp.prodvisible='1' AND\n\t\t\t\t\tp.prodhideprice=0 " . $categorySql . "\n\t\t\t\tORDER BY\n\t\t\t\t\tp.productid DESC\n\t\t\t";
$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
if ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
$min = ceil($row['pmin']);
$max = ceil($row['pmax']);
// Is there enough of a variation to show a shop by price panel?
if ($max - $min > $min) {
$diff = ($max - $min) / 5;
if ($diff == 0) {
$diff = 1;
}
for ($i = 0; $i < 5; $i++) {
if ($lastend == 0) {
$start = $min + $diff * $i;
} else {
$start = $lastend;
}
$end = $start + $diff;
if ($end == $lastend) {
break;
}
if ($lastend == 0) {
$start = 0;
}
$lastend = $end;
$start = round($start);
$end = round($end);
$GLOBALS['PriceLow'] = CurrencyConvertFormatPrice($start);
$GLOBALS['PriceHigh'] = CurrencyConvertFormatPrice($end);
if (is_array($GLOBALS['CatPath'])) {
$GLOBALS['CatPath'] = implode("/", $GLOBALS['CatPath']);
}
$GLOBALS['PriceLink'] = PriceLink($start, $end, $GLOBALS['CatId'], $GLOBALS['CatPath']);
$output .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByPriceItem");
}
} else {
$GLOBALS['HideSideCategoryShopByPricePanel'] = "none";
$this->DontDisplay = true;
}
} else {
$GLOBALS['HideSideCategoryShopByPricePanel'] = "none";
$this->DontDisplay = true;
}
$GLOBALS['SNIPPETS']['SideCategoryShopByPrice'] = $output;
}
示例4: SetPanelSettings
function SetPanelSettings()
{
$GLOBALS['ISC_CLASS_CUSTOMER'] = GetClass('ISC_CUSTOMER');
$customer = $GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerDataByToken();
if ($customer['custstorecredit'] > 0) {
$GLOBALS['StoreCreditAmount'] = CurrencyConvertFormatPrice($customer['custstorecredit']);
} else {
$GLOBALS['HideStoreCredit'] = "none";
}
}
示例5: SetPanelSettings
public function SetPanelSettings()
{
$count = 0;
$GLOBALS['SNIPPETS']['HomeSaleProducts'] = '';
if (GetConfig('HomeNewProducts') == 0) {
$this->DontDisplay = true;
return;
}
if (GetConfig('EnableProductReviews') == 0) {
$GLOBALS['HideProductRating'] = "display: none";
}
$query = "\n\t\t\t\tSELECT p.*, FLOOR(prodratingtotal/prodnumratings) AS prodavgrating, imageisthumb, imagefile, " . GetProdCustomerGroupPriceSQL() . "\n\t\t\t\tFROM [|PREFIX|]products p\n\t\t\t\tLEFT JOIN [|PREFIX|]product_images pi ON (p.productid=pi.imageprodid)\n\t\t\t\tWHERE p.prodsaleprice != 0 AND p.prodsaleprice < p.prodprice AND p.prodvisible='1' AND (imageisthumb=1 OR ISNULL(imageisthumb))\n\t\t\t\t" . GetProdCustomerGroupPermissionsSQL() . "\n\t\t\t\tORDER BY RAND()\n\t\t\t";
$query .= $GLOBALS['ISC_CLASS_DB']->AddLimit(0, GetConfig('HomeNewProducts'));
$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
$GLOBALS['AlternateClass'] = '';
while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
if ($GLOBALS['AlternateClass'] == 'Odd') {
$GLOBALS['AlternateClass'] = 'Even';
} else {
$GLOBALS['AlternateClass'] = 'Odd';
}
$GLOBALS['ProductCartQuantity'] = '';
if (isset($GLOBALS['CartQuantity' . $row['productid']])) {
$GLOBALS['ProductCartQuantity'] = (int) $GLOBALS['CartQuantity' . $row['productid']];
}
$GLOBALS['ProductId'] = $row['productid'];
$GLOBALS['ProductName'] = isc_html_escape($row['prodname']);
$GLOBALS['ProductLink'] = ProdLink($row['prodname']);
// Determine the price of this product
$originalPrice = CalcRealPrice(CalcProdCustomerGroupPrice($row, $row['prodprice']), 0, 0, $row['prodistaxable']);
$GLOBALS['OriginalProductPrice'] = CurrencyConvertFormatPrice($originalPrice);
$GLOBALS['ProductPrice'] = CalculateProductPrice($row);
$GLOBALS['ProductRating'] = (int) $row['prodavgrating'];
// Workout the product description
$desc = strip_tags($row['proddesc']);
if (isc_strlen($desc) < 120) {
$GLOBALS['ProductSummary'] = $desc;
} else {
$GLOBALS['ProductSummary'] = isc_substr($desc, 0, 120) . "...";
}
$GLOBALS['ProductThumb'] = ImageThumb($row['imagefile'], ProdLink($row['prodname']));
$GLOBALS['SNIPPETS']['HomeSaleProducts'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("HomeSaleProductsItem");
if (!$GLOBALS['SNIPPETS']['HomeSaleProducts']) {
$this->DontDisplay = true;
return;
}
}
}
示例6: ShowPaymentForm
public function ShowPaymentForm()
{
// Was there an error validating the payment? If so, pre-fill the form fields with the already-submitted values
if ($this->HasErrors()) {
$fields = array("CreditCardNum" => 'creditcard_ccno');
foreach ($fields as $global => $post) {
if (isset($_POST[$post])) {
$GLOBALS[$global] = isc_html_escape($_POST[$post]);
}
}
$errorMessage = implode("<br />", $this->GetErrors());
$GLOBALS['CreditCardErrorMessage'] = $errorMessage;
} else {
// Hide the error message box
$GLOBALS['HideCreditCardError'] = "none";
}
$pendingOrder = LoadPendingOrderByToken();
$GLOBALS['OrderAmount'] = CurrencyConvertFormatPrice($pendingOrder['ordgatewayamount'], $pendingOrder['ordcurrencyid'], $pendingOrder['ordcurrencyexchangerate']);
// Collect their details to send through to CreditCard
$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate("valuteccard");
return $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate(true);
}
示例7: GenerateOrderItemRow
//.........这里部分代码省略.........
// down below in the summary table
$productPrice = isset($product['discount_price']) && $product['discount_price'] < $product['product_price'] ? $product['discount_price'] : $product['product_price'];
//20110503 alandy add resetprice.
if ($resetPrices) {
$GLOBALS['PriceReadonly'] = '';
$GLOBALS['ResetChecked'] = 'checked';
$GLOBALS['ResetStatus'] = '1';
} else {
$GLOBALS['PriceReadonly'] = 'readonly class="Field50 ItemPrice ReadonlyText"';
$GLOBALS['ResetChecked'] = '';
$GLOBALS['ResetStatus'] = '0';
}
$GLOBALS['ProductPrice'] = FormatPrice($productPrice, false, false, true);
$GLOBALS['ProductTotal'] = FormatPrice($productPrice * $product['quantity']);
// Initialize the configurable product fields
$GLOBALS['HideProductFields'] = 'display: none;';
$GLOBALS['ProductFields'] = '';
if (!empty($product['product_fields']) && is_array($product['product_fields'])) {
$GLOBALS['HideProductFields'] = '';
foreach ($product['product_fields'] as $fieldId => $field) {
switch ($field['fieldType']) {
case 'file':
if (isset($field['fieldExisting'])) {
$fileDirectory = 'configured_products';
} else {
$fileDirectory = 'configured_products_tmp';
}
$fieldValue = '<a href="' . GetConfig('ShopPath') . '/' . GetConfig('ImageDirectory') . '/' . $fileDirectory . '/' . $field['fileName'] . '" target="_blank">' . isc_html_escape($field['fileOriginName']) . '</a>';
break;
case 'checkbox':
$fieldValue = GetLang('Checked');
break;
default:
if (isc_strlen($field['fieldValue']) > 50) {
$field['fieldValue'] = isc_substr($field['fieldValue'], 0, 50) . " ..";
}
$fieldValue = isc_html_escape($field['fieldValue']);
// browser is decoding the entities in the ajax response which prevents the row from loading so we need to double encode
if (isset($_REQUEST['ajaxFormUpload'])) {
$fieldValue = isc_html_escape($fieldValue);
}
}
if (!trim($fieldValue)) {
continue;
}
$GLOBALS['ProductFields'] .= '
<dt>' . isc_html_escape($field['fieldName']) . ':</dt>
<dd>' . $fieldValue . '</dd>
';
}
}
// Can this item be wrapped?
$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']);
$GLOBALS['HideGiftWrappingAdd'] = 'display: none';
$GLOBALS['HideGiftWrappingEdit'] = '';
$GLOBALS['HideGiftWrappingPrice'] = '';
$GLOBALS['GiftWrappingPrice'] = CurrencyConvertFormatPrice($product['wrapping']['wrapprice']);
} else {
$GLOBALS['GiftWrappingName'] = '';
$GLOBALS['HideGiftWrappingAdd'] = '';
$GLOBALS['HideGiftWrappingEdit'] = 'display: none';
$GLOBALS['HideGiftWrappingPrice'] = 'display: none';
$GLOBALS['GiftWrappingPrice'] = '';
}
}
// Is this product a variation?
$GLOBALS['ProductOptions'] = '';
$GLOBALS['HideProductVariation'] = 'display: none';
if (isset($product['options']) && !empty($product['options'])) {
$comma = '';
$GLOBALS['HideProductVariation'] = '';
foreach ($product['options'] as $name => $value) {
if (!trim($name) || !trim($value)) {
continue;
}
$GLOBALS['ProductOptions'] .= $comma . isc_html_escape($name) . ": " . isc_html_escape($value);
$comma = ' / ';
}
} else {
if (isset($product['data']['prodvariationid']) && $product['data']['prodvariationid'] > 0) {
$GLOBALS['HideProductVariation'] = '';
$GLOBALS['ProductOptions'] = GetLang('xNone');
}
}
if (isset($product['data']['prodeventdaterequired']) && $product['data']['prodeventdaterequired']) {
$GLOBALS['HideEventDate'] = '';
$GLOBALS['EventDate'] = '<dl><dt>' . $product['data']['prodeventdatefieldname'] . ': </dt><dd>' . isc_date('jS M Y', $product['event_date']) . '</dd></dl>';
} else {
$GLOBALS['HideEventDate'] = 'display : none;';
$GLOBALS['EventDate'] = '';
}
$GLOBALS['ResetPrice'] = $GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Reset_Price) ? "<input {$GLOBALS['ResetChecked']} value=\"{$GLOBALS['ResetStatus']}\" type='checkbox' name='cartItem[{$GLOBALS['CartItemId']}][resetPrice]' onclick='ResetPrice(this)'/> reset price" : '';
$this->setOtherinfo($product['data'], true);
return $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('OrderItem');
}
}
示例8: 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']);
//.........这里部分代码省略.........
示例9: SetPanelSettings
//.........这里部分代码省略.........
$GLOBALS['ProductLink'] .= "&refer=true" . $ext_links;
}
### Added by Simha for onsale addition
// Determine the price of this product
//$GLOBALS['ProductPrice'] = CalculateProductPrice_retail($row);
$GLOBALS['ProductPrice'] = CalculateProductPriceRetail($row);
$FinalPrice = $GLOBALS['ProductPrice'];
$SalePrice = $row['prodsaleprice'];
//$DiscountAmount = $FinalPrice;
if ((double) $SalePrice > 0 && $SalePrice < $FinalPrice) {
$DiscountPrice = $SalePrice;
} else {
$DiscountPrice = $FinalPrice;
$DiscountPrice = CalculateDiscountPrice($FinalPrice, $DiscountPrice, $row['categoryid'], $row['brandseriesid']);
}
/*
foreach($DiscountInfo as $DiscountInfoSub) {
if(isset($DiscountInfoSub['catids'])) {
$catids = explode(",", $DiscountInfoSub['catids']);
foreach($catids as $catid) {
if($catid == $row['categoryid']) {
$DiscountAmount = $FinalPrice * ((int)$DiscountInfoSub['amount']/100);
if ($DiscountAmount < 0) {
$DiscountAmount = 0;
}
$DiscountPrice = $FinalPrice - $DiscountAmount;
}
}
}
}
*/
if (isset($DiscountPrice) && $DiscountPrice < $FinalPrice) {
//&& GetConfig('ShowOnSale')
$GLOBALS['ProductPrice'] = '<strike>' . CurrencyConvertFormatPrice($FinalPrice) . '</strike>';
$GLOBALS['ProductPrice'] .= '<br>' . CurrencyConvertFormatPrice($DiscountPrice) . '';
$GLOBALS['ShowOnSaleImage'] = '<img id="OnSale" src="' . GetConfig('ShopPath') . '/templates/default/images/onsale.gif" alt="">';
if (GetConfig('ShowOnSale')) {
$GLOBALS['ProductPrice'] .= '<br>' . $GLOBALS['ShowOnSaleImage'] . '';
}
} else {
$GLOBALS['ProductPrice'] = '' . CurrencyConvertFormatPrice($FinalPrice) . '';
}
### Added by Simha Ends
// commented the below line by vikas
//$GLOBALS['ProductThumb'] = ImageThumb($row['imagefile'], ProdLink($row['prodname']));
$GLOBALS['ProductThumb'] = ImageThumb($row['imagefile'], $GLOBALS['ProductLink']);
if (isId($row['prodvariationid']) || trim($row['prodconfigfields']) != '' || $row['prodeventdaterequired'] == 1) {
//$GLOBALS['ProductURL'] = ProdLink($row['prodname']); // commented by vikas
$GLOBALS['ProductURL'] = $GLOBALS['ProductLink'];
$GLOBALS['ProductAddText'] = GetLang('ProductChooseOptionLink');
} else {
//$GLOBALS['ProductURL'] = CartLink($row['productid']);
//$GLOBALS['ProductURL'] = ProdLink($row['prodname']); // commented by vikas
$GLOBALS['ProductURL'] = $GLOBALS['ProductLink'];
//blessen
if (intval($row['prodretailprice']) <= 0) {
//$GLOBALS['ProductAddText'] = GetLang('ProductAddToCartLink'); // commented by vikas on 15-7-09
$GLOBALS['ProductAddText'] = "<img src='{$path}/templates/default/images/view.gif' border=0>";
} else {
//$GLOBALS['ProductAddText'] = GetLang('ProductAddToCartLink1'); // commented by vikas on 15-7-09
$GLOBALS['ProductAddText'] = "<img src='{$path}/templates/default/images/view.gif' border=0>";
}
//blessen
// original $GLOBALS['ProductAddText'] = GetLang('ProductAddToCartLink');
}
if (CanAddToCart($row) && GetConfig('ShowAddToCartLink')) {
示例10: GenerateOrderItemRow
//.........这里部分代码省略.........
$GLOBALS['ProductCode'] = GetLang('NA');
$GLOBALS['ProductName'] = isc_html_escape($product['product_name']);
$GLOBALS['ProductQuantity'] = (int) $product['quantity'];
$GLOBALS['ProductPrice'] = FormatPrice($product['product_price']);
$GLOBALS['ProductTotal'] = FormatPrice($product['product_price'] * $product['quantity']);
return $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('OrderItemGiftCertificate');
} else {
$GLOBALS['ProductId'] = $product['product_id'];
$GLOBALS['ProductName'] = isc_html_escape($product['product_name']);
$GLOBALS['ProductQuantity'] = (int) $product['quantity'];
$GLOBALS['ProductCode'] = $product['product_code'];
// Don't use the discount price here as we'll be showing the coupon codes
// down below in the summary table
$productPrice = $product['product_price'];
$GLOBALS['ProductPrice'] = FormatPrice($productPrice, false, false, true);
$GLOBALS['ProductTotal'] = FormatPrice($productPrice * $product['quantity']);
// Initialize the configurable product fields
$GLOBALS['HideProductFields'] = 'display: none;';
$GLOBALS['ProductFields'] = '';
if (!empty($product['product_fields']) && is_array($product['product_fields'])) {
$GLOBALS['HideProductFields'] = '';
foreach ($product['product_fields'] as $fieldId => $field) {
switch ($field['fieldType']) {
case 'file':
if (isset($field['fieldExisting'])) {
$fileDirectory = 'configured_products';
} else {
$fileDirectory = 'configured_products_tmp';
}
$fieldValue = '<a href="' . GetConfig('ShopPath') . '/' . GetConfig('ImageDirectory') . '/' . $fileDirectory . '/' . $field['fileName'] . '" target="_blank">' . isc_html_escape($field['fileOriginName']) . '</a>';
break;
case 'checkbox':
$fieldValue = GetLang('Checked');
break;
default:
if (isc_strlen($field['fieldValue']) > 50) {
$field['fieldValue'] = isc_substr($field['fieldValue'], 0, 50) . " ..";
}
$fieldValue = isc_html_escape($field['fieldValue']);
// browser is decoding the entities in the ajax response which prevents the row from loading so we need to double encode
if (isset($_REQUEST['ajaxFormUpload'])) {
$fieldValue = isc_html_escape($fieldValue);
}
}
if (!trim($fieldValue)) {
continue;
}
$GLOBALS['ProductFields'] .= '
<dt>' . isc_html_escape($field['fieldName']) . ':</dt>
<dd>' . $fieldValue . '</dd>
';
}
}
// Can this item be wrapped?
$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']);
$GLOBALS['HideGiftWrappingAdd'] = 'display: none';
$GLOBALS['HideGiftWrappingEdit'] = '';
$GLOBALS['HideGiftWrappingPrice'] = '';
$GLOBALS['GiftWrappingPrice'] = CurrencyConvertFormatPrice($product['wrapping']['wrapprice']);
} else {
$GLOBALS['GiftWrappingName'] = '';
$GLOBALS['HideGiftWrappingAdd'] = '';
$GLOBALS['HideGiftWrappingEdit'] = 'display: none';
$GLOBALS['HideGiftWrappingPrice'] = 'display: none';
$GLOBALS['GiftWrappingPrice'] = '';
}
}
// Is this product a variation?
$GLOBALS['ProductOptions'] = '';
$GLOBALS['HideProductVariation'] = 'display: none';
if (isset($product['options']) && !empty($product['options'])) {
$comma = '';
$GLOBALS['HideProductVariation'] = '';
foreach ($product['options'] as $name => $value) {
if (!trim($name) || !trim($value)) {
continue;
}
$GLOBALS['ProductOptions'] .= $comma . isc_html_escape($name) . ": " . isc_html_escape($value);
$comma = ' / ';
}
} else {
if (isset($product['data']['prodvariationid']) && $product['data']['prodvariationid'] > 0) {
$GLOBALS['HideProductVariation'] = '';
$GLOBALS['ProductOptions'] = GetLang('xNone');
}
}
if (isset($product['data']['prodeventdaterequired']) && $product['data']['prodeventdaterequired']) {
$GLOBALS['HideEventDate'] = '';
$GLOBALS['EventDate'] = '<dl><dt>' . $product['data']['prodeventdatefieldname'] . ': </dt><dd>' . isc_date('jS M Y', $product['event_date']) . '</dd></dl>';
} else {
$GLOBALS['HideEventDate'] = 'display : none;';
$GLOBALS['EventDate'] = '';
}
return $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('OrderItem');
}
}
示例11: 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['CreditCardMonths'] = $GLOBALS['CreditCardYears'] = '';
$GLOBALS['CreditCardIssueDateMonths'] = $GLOBALS['CreditCardIssueDateYears'] = '';
$cc_type = "";
if(isset($_POST['creditcard_cctype'])) {
$cc_type = $_POST['creditcard_cctype'];
}
$GLOBALS['CCTypes'] = $this->_GetCCTypes($cc_type);
for ($i = 1; $i <= 12; $i++) {
$stamp = mktime(0, 0, 0, $i, 15, date("Y"));
$i = str_pad($i, 2, "0", STR_PAD_LEFT);
if (isset($_POST['creditcard_ccexpm']) && $_POST['creditcard_ccexpm'] == $i) {
$sel = 'selected="selected"';
} else {
$sel = "";
}
if(isset($_POST['creditcard_issuedatem']) && $_POST['creditcard_issuedatem'] == $i) {
$issueSel = 'selected="selected"';
}
else {
$issueSel = '';
}
$GLOBALS['CreditCardMonths'] .= sprintf("<option %s value='%s'>%s</option>", $sel, $i, date("M", $stamp));
$GLOBALS['CreditCardIssueDateMonths'] .= sprintf("<option %s value='%s'>%s</option>", $issueSel, $i, date("M", $stamp));
}
for ($i = date("Y"); $i <= date("Y")+10; $i++) {
if(isset($_POST['creditcard_ccexpy']) && $_POST['creditcard_ccexpy'] == isc_substr($i, 2, 2)) {
$sel = 'selected="selected"';
}
else {
$sel = "";
}
$GLOBALS['CreditCardYears'] .= sprintf("<option %s value='%s'>%s</option>", $sel, isc_substr($i, 2, 2), $i);
}
for ($i = date("Y"); $i > date("Y")-5; --$i) {
if(isset($_POST['creditcard_issuedatey']) && $_POST['creditcard_issuedatey'] == isc_substr($i, 2, 2)) {
$sel = 'selected="selected"';
}
else {
$sel = "";
}
$GLOBALS['CreditCardIssueDateYears'] .= sprintf("<option %s value='%s'>%s</option>", $sel, isc_substr($i, 2, 2), $i);
}
if ($this->CardTypeRequiresCVV2($cc_type)) {
$GLOBALS['CreditCardHideCardCode'] = '';
}
else {
$GLOBALS['CreditCardHideCardCode'] = 'none';
}
// Was there an error validating the payment? If so, pre-fill the form fields with the already-submitted values
if($this->HasErrors()) {
$fields = array(
"CreditCardName" => 'creditcard_name',
"CreditCardNum" => 'creditcard_ccno',
"CreditCardCardCode" => 'creditcard_cccvd',
"CreditCardIssueNo" => 'creditcard_issueno'
);
foreach($fields as $global => $post) {
if(isset($_POST[$post])) {
$GLOBALS[$global] = isc_html_escape($_POST[$post]);
}
}
$errorMessage = implode("<br />", $this->GetErrors());
$GLOBALS['CreditCardErrorMessage'] = $errorMessage;
}
else {
// Hide the error message box
$GLOBALS['HideCreditCardError'] = "none";
}
$pendingOrder = LoadPendingOrderByToken();
$GLOBALS['OrderAmount'] = CurrencyConvertFormatPrice($pendingOrder['total_inc_tax'], $pendingOrder['ordcurrencyid'], $pendingOrder['ordcurrencyexchangerate']);
// Get additional payment page contents if there is any
if(method_exists($this, 'GetAdditionalPaymentPageContents')) {
$GLOBALS['AdditionalPaymentPageContents'] = $this->GetAdditionalPaymentPageContents();
}
// Collect their details to send through to CreditCard
$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate("genericcreditcard");
//.........这里部分代码省略.........
示例12: setUpAppliedGiftCertificates
/**
* Setup the list of gift certificates that have been applied to the
* shopping cart.
*/
public function setUpAppliedGiftCertificates()
{
if (!gzte11(ISC_LARGEPRINT)) {
$GLOBALS['HidePanels'][] = "SideGiftCertificateCodeBox";
return;
}
$GLOBALS['SNIPPETS']['GiftCertificates'] = '';
$giftCertificates = $this->quote->getAppliedGiftCertificates();
if(empty($giftCertificates)) {
return;
}
foreach ($giftCertificates as $certificate) {
$GLOBALS['GiftCertificateCode'] = isc_html_escape($certificate['code']);
$GLOBALS['GiftCertificateId'] = $certificate['id'];
$GLOBALS['GiftCertificateRemaining'] = CurrencyConvertFormatPrice($certificate['remaining']);
$GLOBALS['CertificateAmountUsed'] = CurrencyConvertFormatPrice($certificate['used'] * -1);
$GLOBALS['SNIPPETS']['GiftCertificates'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("CartGiftCertificate");
}
if ($GLOBALS['SNIPPETS']['GiftCertificates']) {
if($this->quote->getGrandTotal() == 0) {
$GLOBALS['HidePanels'][] = "SideGiftCertificateCodeBox";
}
}
}
示例13: GetProductVariationCombinationJavascript
public function GetProductVariationCombinationJavascript()
{
if (empty($this->_prodvariationcombinations)) {
return '';
}
$script = "<script type=\"text/javascript\">\n";
$script .= " var VariationList = new Array();\n";
foreach ($this->_prodvariationcombinations as $variation) {
$variationPrice = CurrencyConvertFormatPrice(CalcProductVariationPrice($this->_prodcalculatedprice, $variation['vcpricediff'], $variation['vcprice'], $this->_product));
$youSave = $this->_prodretailprice - CalcProductVariationPrice($this->_prodcalculatedprice, $variation['vcpricediff'], $variation['vcprice'], $this->_product);
$variationSaveAmount = '';
if ($youSave > 0) {
$variationSaveAmount = CurrencyConvertFormatPrice($youSave);
}
$variationWeight = FormatWeight(CalcProductVariationWeight($this->_prodweight, $variation['vcweightdiff'], $variation['vcweight']), true);
if ($variation['vcthumb'] != '') {
$thumb = $GLOBALS['ShopPath'] . "/" . GetConfig('ImageDirectory') . "/" . $variation['vcthumb'];
} else {
$thumb = '';
}
if ($variation['vcimage'] != '') {
$image = $GLOBALS['ShopPath'] . '/' . GetConfig('ImageDirectory') . '/' . $variation['vcimage'];
} else {
$image = '';
}
$ids = explode(",", $variation['vcoptionids']);
$optionList = array();
foreach ($ids as $id) {
$key = $this->_prodvariationslookup[$id];
$optionList[$key] = $id;
}
ksort($optionList);
$optionList = implode(",", $optionList);
$script .= " VariationList[" . $variation['combinationid'] . "] = {";
$script .= " combination: '" . $optionList . "', ";
$script .= " saveAmount: '" . $variationSaveAmount . "', ";
$script .= " price: '" . $variationPrice . "', ";
$script .= " sku: '" . isc_html_escape($variation['vcsku']) . "', ";
$script .= " weight: '" . $variationWeight . "', ";
$script .= " thumb: '" . $thumb . "', ";
$script .= " image: '" . $image . "', ";
// Tracking inventory on a product variation level
if ($this->_prodinvtrack == 2) {
if (GetConfig('ShowInventory') == 1) {
$script .= "stock: '" . $variation['vcstock'] . "', ";
}
if ($variation['vcstock'] <= 0) {
$script .= " instock: false";
} else {
$script .= " instock: true";
}
} else {
$script .= " instock: true";
}
$script .= "};\n";
}
$script .= "</script>";
return $script;
}
示例14: 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();
/* $cprint = print_r($product_array, true);
$q = "INSERT INTO isc_orderlogs (`ordervalue`) VALUES ('$cprint')";
$r = $GLOBALS["ISC_CLASS_DB"]->Query($q); */
$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;
$comptotal = 0;
# To get all the complementary product total -- Baskaran
$compprice = 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'] = '';
//.........这里部分代码省略.........
示例15: ShowPaymentForm
/**
* Generate the payment form to collect payment details and pass them back
* to the payment provider.
*
* @return string The generated payment form.
*/
public function ShowPaymentForm()
{
// Authorize.net needs HTTPS, so if it's not on then stop
if (!strtolower($_SERVER['HTTPS']) == "on") {
ob_end_clean();
?>
<script type="text/javascript">
alert("<?php
echo GetLang('AuthorizeNetNoSSLError');
?>
");
document.location.href="<?php
echo $GLOBALS['ShopPath'];
?>
/checkout.php?action=confirm_order";
</script>
<?php
die;
}
$GLOBALS['AuthorizeNetMonths'] = "";
$GLOBALS['AuthorizeNetYears'] = "";
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['AuthorizeNet_ccexpm'] == $i) {
$sel = 'selected="selected"';
} else {
$sel = "";
}
$GLOBALS['AuthorizeNetMonths'] .= 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['AuthorizeNet_ccexpy'] == substr($i, 2, 2)) {
$sel = 'selected="selected"';
} else {
$sel = "";
}
$GLOBALS['AuthorizeNetYears'] .= sprintf("<option %s value='%s'>%s</option>", $sel, substr($i, 2, 2), $i);
}
$require_cvv2 = $this->GetValue("requirecvv2");
if ($require_cvv2 == "YES") {
if (isset($_POST['AuthorizeNet_cccode'])) {
$GLOBALS['AuthorizeNetCCV2'] = (int) $_POST['AuthorizeNet_cccode'];
}
$GLOBALS['AuthorizeNetHideCVV2'] = '';
} else {
$GLOBALS['AuthorizeNetHideCVV2'] = 'none';
}
// Grab the billing details for the order
$billingDetails = $this->GetBillingDetails();
$GLOBALS['AuthorizeNetName'] = isc_html_escape($billingDetails['ordbillfirstname'] . ' ' . $billingDetails['ordbilllastname']);
$GLOBALS['AuthorizeNetBillingAddress'] = isc_html_escape($billingDetails['ordbillstreet1']);
if ($billingDetails['ordbillstreet2'] != "") {
$GLOBALS['AuthorizeNetBillingAddress'] .= " " . isc_html_escape($billingDetails['ordbillstreet2']);
}
$GLOBALS['AuthorizeNetCity'] = isc_html_escape($billingDetails['ordbillsuburb']);
if ($billingDetails['ordbillstateid'] != 0 && GetStateISO2ById($billingDetails['ordbillstateid'])) {
$GLOBALS['AuthorizeNetState'] = GetStateISO2ById($billingDetails['ordbillstateid']);
} else {
$GLOBALS['AuthorizeNetState'] = isc_html_escape($billingDetails['ordbillstate']);
}
$GLOBALS['AuthorizeNetBillingZip'] = isc_html_escape($billingDetails['ordbillzip']);
// Format the amount that's going to be going through the gateway
$GLOBALS['OrderAmount'] = CurrencyConvertFormatPrice($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['AuthorizeNetName'] = isc_html_escape($_POST['AuthorizeNet_name']);
$GLOBALS['AuthorizeNetNum'] = isc_html_escape($_POST['AuthorizeNet_ccno']);
$GLOBALS['AuthorizeNetBillingAddress'] = isc_html_escape($_POST['AuthorizeNet_ccaddress']);
$GLOBALS['AuthorizeNetCity'] = isc_html_escape($_POST['AuthorizeNet_cccity']);
$GLOBALS['AuthorizeNetState'] = isc_html_escape($_POST['AuthorizeNet_ccstate']);
$GLOBALS['AuthorizeNetBillingZip'] = isc_html_escape($_POST['AuthorizeNet_zip']);
$GLOBALS['AuthorizeNetErrorMessage'] = implode("<br />", $this->GetErrors());
} else {
// Hide the error message box
$GLOBALS['HideAuthorizeNetError'] = "none";
}
// Collect their details to send through to Authorize.NET
$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate("authorizenet");
return $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate(true);
}