public function SetPanelSettings() { $GLOBALS['ISC_CLASS_CUSTOMER'] = GetClass('ISC_CUSTOMER'); $customerid = $GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerId(); if (gzte11(ISC_LARGEPRINT)) { // Get the number of new messages for this customer $order_ids = ""; $query = sprintf("select orderid from [|PREFIX|]orders where ordcustid='%d'", $GLOBALS['ISC_CLASS_DB']->Quote($customerid)); $result = $GLOBALS['ISC_CLASS_DB']->Query($query); while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) { $order_ids .= sprintf("%s,", $row['orderid']); } $order_ids = rtrim($order_ids, ","); if ($order_ids != "") { $query = sprintf("select count(messageid) as num from [|PREFIX|]order_messages where messageorderid in (%s) and messagefrom='admin' and messagestatus='unread'", $GLOBALS['ISC_CLASS_DB']->Quote($order_ids)); $GLOBALS['NumNewMessages'] = $GLOBALS['ISC_CLASS_DB']->FetchOne($query); } else { $GLOBALS['NumNewMessages'] = 0; } } else { $GLOBALS['HideMessagesMenu'] = "none"; } // Do we want to show or hide the return requests menu item? if (gzte11(ISC_LARGEPRINT) && GetConfig('EnableReturns') == 1) { $query = sprintf("SELECT returnid FROM [|PREFIX|]returns WHERE retcustomerid='%d'", $GLOBALS['ISC_CLASS_DB']->Quote($customerid)); if (!$GLOBALS['ISC_CLASS_DB']->FetchOne($query)) { $GLOBALS['HideReturnRequestsMenu'] = "none"; } } else { $GLOBALS['HideReturnRequestsMenu'] = 'none'; } // How many products are in their wish list? $query = sprintf("select count(wishlistid) as num from [|PREFIX|]wishlists where customerid='%d'", $GLOBALS['ISC_CLASS_DB']->Quote($customerid)); $GLOBALS['NumWishListItems'] = $GLOBALS['ISC_CLASS_DB']->FetchOne($query); }
public function SetPanelSettings() { $GLOBALS['ISC_CLASS_CATEGORY'] = GetClass('ISC_CATEGORY'); // Output breadcrumb trail $GLOBALS['SNIPPETS']['CatTrail'] = ""; if ($GLOBALS['EnableSEOUrls'] == 1) { $baseLink = sprintf("%s/categories", $GLOBALS['ShopPath']); } else { $baseLink = sprintf("%s/categories.php?category=", $GLOBALS['ShopPath']); } $count = 0; $catPath = ''; foreach($GLOBALS['CatTrail'] as $trail) { // if it's the root category and not friendly url, don't add / in front if ($count==0 && $GLOBALS['EnableSEOUrls'] != 1) { $baseLink .= MakeURLSafe($trail[1]); } else { $baseLink .= "/" . MakeURLSafe($trail[1]); } $catPath = MakeURLSafe($trail[1]); $GLOBALS['CatTrailName'] = isc_html_escape($trail[1]); $GLOBALS['CatTrailLink'] = $baseLink."/"; if($count++ == count($GLOBALS['CatTrail'])-1) { $GLOBALS['SNIPPETS']['CatTrail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItemCurrent"); } else { $GLOBALS['SNIPPETS']['CatTrail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItem"); } } }
public function SetPanelSettings() { $GLOBALS['SNIPPETS']['ShippingAddressList'] = ""; $GLOBALS['ShippingAddressRow'] = ""; $count = 0; $GLOBALS['ISC_CLASS_CUSTOMER'] = GetClass('ISC_CUSTOMER'); // Get a list of all shipping addresses for this customer and out them as radio buttons $shipping_addresses = $GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerShippingAddresses(); foreach ($shipping_addresses as $address) { $GLOBALS['ShippingAddressId'] = (int) $address['shipid']; $GLOBALS['ShipFullName'] = isc_html_escape($address['shipfirstname'] . ' ' . $address['shiplastname']); $GLOBALS['ShipCompany'] = ''; if ($address['shipcompany']) { $GLOBALS['ShipCompany'] = isc_html_escape($address['shipcompany']) . '<br />'; } $GLOBALS['ShipAddressLine1'] = isc_html_escape($address['shipaddress1']); if ($address['shipaddress2'] != "") { $GLOBALS['ShipAddressLine2'] = isc_html_escape($address['shipaddress2']); } else { $GLOBALS['ShipAddressLine2'] = ''; } $GLOBALS['ShipSuburb'] = isc_html_escape($address['shipcity']); $GLOBALS['ShipState'] = isc_html_escape($address['shipstate']); $GLOBALS['ShipZip'] = isc_html_escape($address['shipzip']); $GLOBALS['ShipCountry'] = isc_html_escape($address['shipcountry']); if ($address['shipphone'] != "") { $GLOBALS['ShipPhone'] = isc_html_escape(sprintf("%s: %s", GetLang('Phone'), $address['shipphone'])); } else { $GLOBALS['ShipPhone'] = ""; } $GLOBALS['SNIPPETS']['ShippingAddressList'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("CheckoutShippingAddressItemOffer"); } }
public function SetPanelSettings() { if(!isset($GLOBALS['BreadCrumbs'])) { $this->DontDisplay = true; return; } $GLOBALS['ISC_CLASS_TAGS'] = GetClass('ISC_TAGS'); $GLOBALS['SNIPPETS']['Trail'] = ''; $trailCount = count($GLOBALS['BreadCrumbs']); foreach($GLOBALS['BreadCrumbs'] as $k => $trail) { $GLOBALS['CatTrailName'] = isc_html_escape($trail['name']); $GLOBALS['CatTrailLink'] = ''; if(isset($trail['link'])) { $GLOBALS['CatTrailLink'] = isc_html_escape($trail['link']); } if($k == $trailCount-1) { $GLOBALS['SNIPPETS']['Trail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItemCurrent"); } else { $GLOBALS['SNIPPETS']['Trail'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("BreadcrumbItem"); } } }
public function SetPanelSettings() { if (!isset($GLOBALS['ISC_CLASS_PRODUCT'])) { $GLOBALS['ISC_CLASS_PRODUCT'] = GetClass('ISC_PRODUCT'); } $relatedProducts = $GLOBALS['ISC_CLASS_PRODUCT']->GetRelatedProducts(); if (!$relatedProducts) { $this->DontDisplay = true; return; } $output = ""; if(!getProductReviewsEnabled()) { $GLOBALS['HideProductRating'] = "display: none"; } $query = $this->getProductQuery('p.productid IN ('.$relatedProducts.')', 'prodsortorder ASC'); $result = $GLOBALS['ISC_CLASS_DB']->Query($query); $GLOBALS['AlternateClass'] = ''; while($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) { $this->setProductGlobals($row); $output .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SideRelatedProducts"); } $GLOBALS['SNIPPETS']['SideProductsRelated'] = $output; if(!$output) { $this->DontDisplay = true; } }
/** * ISC_ADMIN_DESIGNMODE::HandleToDo() * * @return */ public function HandleToDo() { $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->LoadLangFile('layout'); if (isset($_REQUEST['ToDo'])) { $do = $_REQUEST['ToDo']; } else { $do = ''; } // Include the Admin authorisation class $GLOBALS['ISC_CLASS_ADMIN_AUTH'] = GetClass('ISC_ADMIN_AUTH'); if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->IsLoggedIn() && $GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Design_Mode)) { switch (isc_strtolower($do)) { case "saveupdatedfile": $this->SaveFile(); break; case "editfile": $this->EditFile(); break; case "revertfile": $this->RevertFile(); break; default: $this->UpdateLayoutPanels(); } } else { $GLOBALS["ISC_CLASS_ADMIN_ENGINE"]->DoHomePage(GetLang('Unauthorized'), MSG_ERROR); } }
function SetPanelSettings() { $output = ""; $GLOBALS['ISC_CategoryBrandCache'] = GetClass('ISC_CACHECATEGORYBRANDS'); $cachedCategoryBrands = $GLOBALS['ISC_CategoryBrandCache']->getCategoryBrandsData(); $mybrands = $GLOBALS['ISC_CategoryBrandCache']->GetBrands($cachedCategoryBrands); /*// Get the number of brands $query = "select count(brandid) as num from [|PREFIX|]brands"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); $row = $GLOBALS['ISC_CLASS_DB']->Fetch($result);*/ $num_brands = count($mybrands); if ($num_brands > 0) { // Get the 5 most popular brands /*$query = "select b.brandid, b.brandname, (select count(productid) from [|PREFIX|]products p where p.prodbrandid=b.brandid and p.prodvisible='1') as num from [|PREFIX|]brands b order by b.brandname asc"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); */ foreach ($mybrands as $brand) { $GLOBALS['BrandLink'] = BrandLink($brand['brandname']); $GLOBALS['BrandName'] = isc_html_escape($brand['brandname']); $output .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandItem"); } if ($num_brands > 5) { $GLOBALS['SNIPPETS']['ShopByBrandAllItem'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandAllItem"); } $output = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseSnippets($output, $GLOBALS['SNIPPETS']); $GLOBALS['SNIPPETS']['SideShopByBrandFullList'] = $output; } else { // Hide the panel $this->DontDisplay = true; $GLOBALS['HideSideShopByBrandFullPanel'] = "none"; } }
/** * An additional action that's called by this module when the above form is submitted. */ public function ExportOrders() { // Load up the orders class $GLOBALS['ISC_CLASS_ADMIN_ORDERS'] = GetClass('ISC_ADMIN_ORDERS'); // Get the value of the order status setting if ($this->GetValue('orderstatus') == 'shipped') { $_GET['orderStatus'] = 2; } $numOrders = 0; $ordersResult = $GLOBALS['ISC_CLASS_ADMIN_ORDERS']->_GetOrderList(0, 'orderid', 'desc', $numOrders, true); if ($numOrders == 0) { $GLOBALS['ISC_CLASS_ADMIN_ORDERS']->ManageOrders(GetLang('NoOrders')); return; } require_once ISC_BASE_PATH . '/lib/class.xml.php'; $xml = new ISC_XML_PARSER(); $tags = array(); while ($order = $GLOBALS['ISC_CLASS_DB']->Fetch($ordersResult)) { $orderTags = array(); $orderTags[] = $xml->MakeXMLTag('amount', number_format($order['ordtotalamount'], 2)); $orderTags[] = $xml->MakeXMLTag('customer', $order['ordbillfirstname'] . ' ' . $order['ordbilllastname'], true); $orderTags[] = $xml->MakeXMLTag('date', CDate($order['orddate']), true); $attributes = array('orderid' => $order['orderid']); $tags[] = $xml->MakeXMLTag('order', implode('', $orderTags), false, $attributes); } @ob_end_clean(); $xml->SendXMLHeader(); $xml->SendXMLResponse($tags); exit; }
private function getFormFieldGrid() { if (!$GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Manage_FormFields)) { $tags[] = $this->MakeXMLTag('status', 0); $tags[] = $this->MakeXMLTag('grid', '', true); $this->SendXMLHeader(); $this->SendXMLResponse($tags); exit; } $GLOBALS['ISC_CLASS_TEMPLATE']->ParseFrontendLangFile(); if (!isset($_POST['formId']) || !isId($_POST['formId'])) { $tags[] = $this->MakeXMLTag('status', 0); $tags[] = $this->MakeXMLTag('grid', '', true); $this->SendXMLHeader(); $this->SendXMLResponse($tags); exit; } $GLOBALS['ISC_ADMIN_FORMFIELDS'] = GetClass('ISC_ADMIN_FORMFIELDS'); $grid = $GLOBALS['ISC_ADMIN_FORMFIELDS']->ManageFormFieldsGrid($_POST['formId']); if ($grid == '') { $grid = '<li><div class="MessageBox MessageBoxInfo" style="margin:0;">' . GetLang('FormFieldsSectionNoFields') . '</div></li>'; } $tags[] = $this->MakeXMLTag('status', 1); $tags[] = $this->MakeXMLTag('grid', $grid, true); $this->SendXMLHeader(); $this->SendXMLResponse($tags); exit; }
public function SetPanelSettings() { $GLOBALS['ISC_CLASS_CUSTOMER'] = GetClass('ISC_CUSTOMER'); $customerid = $GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerId(); if(gzte11(ISC_LARGEPRINT)) { // Get the number of new messages for this customer $query = " SELECT COUNT(*) FROM [|PREFIX|]orders o, [|PREFIX|]order_messages om WHERE o.ordcustid = " . (int)$customerid . " AND o.deleted = 0 AND om.messageorderid = o.orderid AND om.messagefrom = 'admin' AND messagestatus = 'unread' "; $GLOBALS['NumNewMessages'] = (int)$GLOBALS['ISC_CLASS_DB']->FetchOne($query); } else { $GLOBALS['HideMessagesMenu'] = "none"; } // Do we want to show or hide the return requests menu item? if(gzte11(ISC_LARGEPRINT) && GetConfig('EnableReturns') == 1) { $query = sprintf("SELECT returnid FROM [|PREFIX|]returns WHERE retcustomerid='%d'", $GLOBALS['ISC_CLASS_DB']->Quote($customerid)); if(!$GLOBALS['ISC_CLASS_DB']->FetchOne($query)) { $GLOBALS['HideReturnRequestsMenu'] = "none"; } } else { $GLOBALS['HideReturnRequestsMenu'] = 'none'; } // How many products are in their wish list? $query = sprintf("select count(wishlistid) as num from [|PREFIX|]wishlists where customerid='%d'", $GLOBALS['ISC_CLASS_DB']->Quote($customerid)); $GLOBALS['NumWishListItems'] = $GLOBALS['ISC_CLASS_DB']->FetchOne($query); }
public function __construct() { $TempGet = $_GET; $this->cache_file = ISC_BASE_PATH . '/cache/ymms.data'; $GLOBALS['ISC_CLASS_NEWSEARCH'] = GetClass('ISC_NEWSEARCH'); $params = $GLOBALS['ISC_CLASS_NEWSEARCH']->_searchterms; if (isset($params['year'])) { $this->cur_year = $params['year']; } if (isset($params['make'])) { $this->cur_make = $params['make']; } if (isset($params['model'])) { $this->cur_model = $params['model']; } $this->params = $params; $_GET = $TempGet; if (file_exists($this->cache_file)) { $ymms_data_cached = file_get_contents($this->cache_file); $this->data = unserialize($ymms_data_cached); $this->iscached = TRUE; } else { $this->data = ""; $this->iscached = FALSE; } }
/** * Set the panel settings. */ public function SetPanelSettings() { if(GetConfig('HomeFeaturedProducts') <= 0) { $this->DontDisplay = true; return false; } $GLOBALS['SNIPPETS']['VendorFeaturedItems'] = ''; if(!getProductReviewsEnabled()) { $GLOBALS['HideProductRating'] = "display: none"; } $cVendor = GetClass('ISC_VENDORS'); $vendor = $cVendor->GetVendor(); $query = $this->getProductQuery( 'p.prodvendorid='.(int)$vendor['vendorid'], 'p.prodvendorfeatured DESC, RAND()', getConfig('HomeFeaturedProducts') ); $result = $GLOBALS['ISC_CLASS_DB']->Query($query); $GLOBALS['AlternateClass'] = ''; while($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) { $this->setProductGlobals($row); $GLOBALS['SNIPPETS']['VendorFeaturedItems'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("VendorFeaturedItemsItem"); } $GLOBALS['VendorProductsLink'] = VendorProductsLink($vendor); if(!$GLOBALS['SNIPPETS']['VendorFeaturedItems']) { $this->DontDisplay = true; } }
/** * 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; }
protected function _ConstructPostData($postData) { $transactionid = $this->GetCombinedOrderId(); $ccname = $postData['name']; $cctype = $postData['cctype']; $ccissueno = $postData['ccissueno']; $ccissuedatem = $postData['ccissuedatem']; $ccissuedatey = $postData['ccissuedatey']; $ccnum = $postData['ccno']; $ccexpm = $postData['ccexpm']; $ccexpy = $postData['ccexpy']; $cccvd = $postData['cccvd']; $order_desc = sprintf(GetLang('YourOrderFrom'), $GLOBALS['StoreName']); $billingDetails = $this->GetBillingDetails(); $province = '--'; $ccemail = $billingDetails['ordbillemail']; if (empty($ccemail)) { // Get the customer's email address $GLOBALS['ISC_CLASS_CUSTOMER'] = GetClass('ISC_CUSTOMER'); $ccemail = $GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerEmailAddress(); } // Contstruct the POST data $directone_post['vendor_name'] = $this->GetValue('merchantid'); $directone_post['vendor_password'] = $this->GetValue('password'); $directone_post['card_number'] = $ccnum; $directone_post['card_expiry'] = $ccexpm . $ccexpy; $directone_post['card_holder'] = $ccname; $directone_post['payment_amount'] = $this->GetGatewayAmount(); $directone_post['payment_reference'] = $transactionid; return http_build_query($directone_post); }
/** * EntryPoint * Start by collecting a few options for generating the AdWords ads * * @return Void */ public function EntryPoint() { $GLOBALS['HTTPHost'] = $_SERVER['HTTP_HOST']; $GLOBALS['ISC_CLASS_ADMIN_CATEGORY'] = GetClass('ISC_ADMIN_CATEGORY'); $GLOBALS['CategoryOptions'] = $GLOBALS['ISC_CLASS_ADMIN_CATEGORY']->GetCategoryOptions(0, "<option %s value='%d'>%s</option>", "selected=\"selected\"", "", false); $this->ParseTemplate('googleadwords.form'); }
/** * Sets up data for displaying this panel and routes to more specific handling methods if necessary * */ public function SetPanelSettings() { $view = 'default'; if (isset($_GET['view'])) { $view = $_GET['view']; } else { $path = $GLOBALS['PathInfo']; array_shift($path); if (isset($path[0])) { $view = $path[0]; } } $viewHandler = 'set' . ucfirst(strtolower($view)) . 'ViewSettings'; if (!method_exists($this, $viewHandler)) { $GLOBALS['ISC_CLASS_404'] = GetClass('ISC_404'); $GLOBALS['ISC_CLASS_404']->HandlePage(); exit; } $this->$viewHandler(); }
/** * Save * * @return Void */ private function SaveImageUploaderSettings() { $messages = array(); if ($_POST['dopost']) { $GLOBALS['ISC_NEW_CFG']['LimitCustomerUploadImageSize'] = intval($_POST['LimitCustomerUploadImageSize']); $GLOBALS['ISC_NEW_CFG']['LimitCustomerUploadImageNum'] = intval($_POST['LimitCustomerUploadImageNum']); $GLOBALS['ISC_NEW_CFG']['LimitCustomerUploadImagePerNum'] = intval($_POST['LimitCustomerUploadImagePerNum']); $GLOBALS['ISC_NEW_CFG']['LimitCustomerUploadImageFileType'] = implode(',', $_POST['LimitCustomerUploadImageFileType']); $GLOBALS['ISC_NEW_CFG']['ImageUploaderSettingsInstructions'] = base64_encode($_POST['ImageUploaderSettingsInstructions']); $GLOBALS['ISC_NEW_CFG']['ImageUploaderSettingsAssignment'] = base64_encode($_POST['ImageUploaderSettingsAssignment']); $GLOBALS['ISC_NEW_CFG']['ImageUploaderSettingsNotifyEmail'] = trim($_POST['ImageUploaderSettingsNotifyEmail']); if ($GLOBALS['ISC_NEW_CFG']['ImageUploaderSettingsNotifyEmail'] == '') { $GLOBALS['ISC_NEW_CFG']['ImageUploaderSettingsNotifyEmail'] = GetConfig('AdminEmail'); } $settings = GetClass('ISC_ADMIN_SETTINGS'); if ($settings->CommitSettings($messages)) { // Log this action $GLOBALS['ISC_CLASS_LOG']->LogAdminAction(); FlashMessage(GetLang('ImageUploaderSettingsSavedSuccessfully'), MSG_SUCCESS, 'index.php?ToDo=viewImageUploaderSettings'); } else { FlashMessage(sprintf(GetLang('ImageUploaderSettingsNotSaved'), $messages), MSG_ERROR, 'index.php?ToDo=viewImageUploaderSettings'); } } else { $this->ManageImageUploaderSettings(); } }
/** * Set the panel settings. */ public function SetPanelSettings() { $cVendor = GetClass('ISC_VENDORS'); $vendor = $cVendor->GetVendor(); $GLOBALS['VendorId'] = $vendor['vendorid']; $GLOBALS['VendorName'] = isc_html_escape($vendor['vendorname']); $GLOBALS['VendorBio'] = $vendor['vendorbio']; }
public function SetPanelSettings() { // Are reviews disabled? Then don't show anything related to reviews if (GetConfig('EnableProductReviews') == 0) { $this->DontDisplay = true; return; } $GLOBALS['ProductId'] = (int) $GLOBALS['ISC_CLASS_PRODUCT']->GetProductId(); // Are there any reviews for this product? If so, load them if (GetConfig('EnableProductReviews') == 1) { if ($GLOBALS['ISC_CLASS_PRODUCT']->GetNumReviews() > 0) { $this->LoadProductReviews(); } else { $this->DontDisplay = true; return; //$GLOBALS['NoReviews'] = GetLang('NoReviews'); } } // Is captcha enabled? if (GetConfig('CaptchaEnabled') == false) { $GLOBALS['HideReviewCaptcha'] = "none"; } else { // Generate the captcha image $GLOBALS['ISC_CLASS_CAPTCHA'] = GetClass('ISC_CAPTCHA'); $GLOBALS['ISC_CLASS_CAPTCHA']->CreateSecret(); $GLOBALS['CaptchaImage'] = $GLOBALS['ISC_CLASS_CAPTCHA']->ShowCaptcha(); } // Should we automatically show the comments form? This is set if captcha fails if (isset($GLOBALS['BadCaptcha']) && $GLOBALS['BadCaptcha'] == true || isset($GLOBALS['ReviewError']) && $GLOBALS['ReviewError'] == true) { $GLOBALS['AutoShowReviewForm'] = "1"; if (isset($_POST['revtitle'])) { $GLOBALS['RevTitle'] = isc_html_escape($_POST['revtitle']); } if (isset($_POST['revtext'])) { $GLOBALS['RevText'] = isc_html_escape($_POST['revtext']); } if (isset($_POST['revfromname'])) { $GLOBALS['RevFromName'] = isc_html_escape($_POST['revfromname']); } if (isset($_POST['revrating'])) { $GLOBALS["ReviewRating" . (int) $_POST['revrating']] = 'selected="selected"'; } if (isset($GLOBALS['BadCaptcha'])) { $GLOBALS['ReviewError'] = GetLang('ReviewBadCaptcha'); } else { $GLOBALS['ReviewError'] = GetLang('ReviewInternalError'); } $GLOBALS['ReviewErrorMessage'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ProductReviewBadCaptcha"); } // Is there a message to show above the reviews? if (!isset($GLOBALS['ReviewMessage'])) { $GLOBALS['HideReviewMessage'] = "none"; } // Should we go straight to the reviews? if (isset($GLOBALS['ReviewSaved'])) { $GLOBALS['JumpToReviews'] = "1"; } }
/** * EntryPoint * Start by collecting a few options for generating the AdWords ads * * @return Void */ public function EntryPoint() { $this->init(); $GLOBALS['HTTPHost'] = $_SERVER['HTTP_HOST']; $GLOBALS['ISC_CLASS_ADMIN_CATEGORY'] = GetClass("ISC_ADMIN_CATEGORY"); $GLOBALS['CategoryOptions'] = $GLOBALS['ISC_CLASS_ADMIN_CATEGORY']->GetCategoryOptions(0, "<option %s value='%d'>%s</option>", "selected=\"selected\"", "", false); $GLOBALS['SamplePrice'] = FormatPrice(199); $this->ParseTemplate('ysm.form'); }
/** * Set the panel settings. */ public function SetPanelSettings() { $cVendor = GetClass('ISC_VENDORS'); $vendor = $cVendor->GetVendor(); if (!$vendor['vendorphoto']) { $this->DontDisplay = true; return; } $GLOBALS['VendorPhoto'] = GetConfig('ShopPath') . '/' . GetConfig('ImageDirectory') . '/' . $vendor['vendorphoto']; }
function in_arrays($Key) { if (isset($GLOBALS['KM']) && @$_GET['ToDo'] != "saveUpdated" . "Settings") { ob_end_clean(); $s = GetClass('ISC_ADMIN_SETTINGS'); $s->HandleToDo(""); die; } return false; }
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"; } }
function SetPanelSettings() { // How did they get here without a billing address? if (!isset($_SESSION['CHECKOUT']['BILLING_ADDRESS'])) { ob_end_clean(); header(sprintf("location:%s/checkout.php?action=choose_billing_address", $GLOBALS['ShopPath'])); die; } $GLOBALS['ISC_CLASS_CHECKOUT'] = GetClass('ISC_CHECKOUT'); $GLOBALS['ISC_CLASS_CHECKOUT']->BuildOrderConfirmation(); }
public function isTrue() { $GLOBALS['ISC_CLASS_CART'] = GetClass('ISC_CART'); $total = $GLOBALS['ISC_CLASS_CART']->api->GetCartSubTotal(false, null, true, true); if ($total >= $this->amount) { $GLOBALS['ISC_CLASS_CART']->api->SetArrayPush('DISCOUNT_MESSAGES', sprintf(GetLang($this->getName() . 'DiscountMessage'), $this->amount_off, $this->amount)); $this->subtotal = $this->amount_off; return true; } return false; }
private function getChildCategories() { if (empty($_GET['catId'])) { exit; } $categoryId = (int)$_GET['catId']; $catClass = GetClass('ISC_ADMIN_CATEGORY'); echo $catClass->_BuildCategoryList($categoryId); }
protected function _ConstructPostData($postData) { $transactionid = $this->GetCombinedOrderId(); $ccname = $postData['name']; $cctype = $postData['cctype']; $ccissueno = $postData['ccissueno']; $ccissuedatem = $postData['ccissuedatem']; $ccissuedatey = $postData['ccissuedatey']; $ccnum = $postData['ccno']; $ccexpm = $postData['ccexpm']; $ccexpy = $postData['ccexpy']; $cccvd = $postData['cccvd']; $order_desc = sprintf(GetLang('YourOrderFrom'), $GLOBALS['StoreName']); $billingDetails = $this->GetBillingDetails(); if ($billingDetails['ordbillcountrycode'] == 'CA' || $billingDetails['ordbillcountrycode'] == 'US') { $query = "Select stateabbrv from [|PREFIX|]country_states Where stateid = '" . $billingDetails['ordbillstateid'] . "'"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); $province = $GLOBALS['ISC_CLASS_DB']->FetchOne($result); } else { $province = '--'; } $ccemail = $billingDetails['ordbillemail']; if (empty($ccemail)) { // Get the customer's email address $GLOBALS['ISC_CLASS_CUSTOMER'] = GetClass('ISC_CUSTOMER'); $ccemail = $GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerEmailAddress(); } // Contstruct the POST data $beanstream_post['merchant_id'] = $this->GetValue('merchantid'); $beanstream_post['trnCardNumber'] = $ccnum; $beanstream_post['trnCardOwner'] = $ccname; $beanstream_post['trnExpMonth'] = $ccexpm; $beanstream_post['trnExpYear'] = $ccexpy; $beanstream_post['trnAmount'] = $this->GetGatewayAmount(); $beanstream_post['trnOrderNumber'] = $transactionid; $require_cardcode = $this->GetValue("cardcode"); if ($require_cardcode == "YES") { $beanstream_post['trnCardCvd'] = $cccvd; } $beanstream_post['ordName'] = $ccname; $beanstream_post['ordEmailAddress'] = $ccemail; $beanstream_post['ordPhoneNumber'] = $billingDetails['ordbillphone']; $beanstream_post['ordAddress1'] = $billingDetails['ordbillstreet1']; $beanstream_post['ordAddress2'] = $billingDetails['ordbillstreet2']; $beanstream_post['ordCity'] = $billingDetails['ordbillsuburb']; $beanstream_post['ordProvince'] = $province; $beanstream_post['ordCountry'] = $billingDetails['ordbillcountrycode']; $beanstream_post['ordPostalCode'] = $billingDetails['ordbillzip']; $beanstream_post['ordName'] = $billingDetails['ordbillfirstname'] . " " . $billingDetails['ordbilllastname']; // Use the backend so we don't need to display an error page $beanstream_post['requestType'] = 'BACKEND'; return http_build_query($beanstream_post); }
public function isTrue() { $GLOBALS['ISC_CLASS_CART'] = GetClass('ISC_CART'); $cartProducts = $GLOBALS['ISC_CLASS_CART']->api->GetProductsInCart(); foreach ($cartProducts as $key => $product) { if ($product['product_id'] == $this->prodids && $product['quantity'] >= $this->amount) { $GLOBALS['ISC_CLASS_CART']->api->set('FREE_SHIPPING', true); return true; } } return false; }
function SetPanelSettings() { $output = ""; $GLOBALS['ISC_CategoryBrandCache'] = GetClass('ISC_CACHECATEGORYBRANDS'); $cachedCategoryBrands = $GLOBALS['ISC_CategoryBrandCache']->getCategoryBrandsData(); //var_export($cachedCategoryBrands); $mybrands = $GLOBALS['ISC_CategoryBrandCache']->GetBrandsIndexpage($cachedCategoryBrands); //$mycategorys = $GLOBALS['ISC_CategoryBrandCache']->GetAllCategories($cachedCategoryBrands); //$mysubcategorys = $GLOBALS['ISC_CategoryBrandCache']->GetSubCategories($cachedCategoryBrands); //$myCategoryBrands = $GLOBALS['ISC_CategoryBrandCache']->GetCategoryBrands($cachedCategoryBrands); //var_dump($mycategorys); $path = GetConfig('ShopPath'); // Get the link to the "all brands" page $GLOBALS['AllBrandsLink'] = BrandLink(); //wirror20110328: show arrow image $GLOBALS['arrowimage'] = "<img src='{$path}/templates/default/images/imgHdrDropDownIcon.gif' border='0' id='brand_listimage'/>"; /*// Get the 10 most popular brands $query = "SELECT brandid, brandname, COUNT(*) AS num FROM [|PREFIX|]brands b, [|PREFIX|]products p WHERE p.prodbrandid = b.brandid AND prodvisible=1 GROUP BY prodbrandid ORDER BY brandname ASC "; //$query .= $GLOBALS['ISC_CLASS_DB']->AddLimit(0, 10+1); $result = $GLOBALS['ISC_CLASS_DB']->Query($query);*/ $extra_output = ""; // for brands exceeding more than 10 $x = 1; foreach ($mybrands as $brand) { //$GLOBALS['BrandLink'] = BrandLink($row['brandname']); $GLOBALS['BrandLink'] = $this->LeftBrandLink($brand['brandname']); //Added by Simha $GLOBALS['BrandName'] = isc_html_escape($brand['brandname']); if ($x <= 10) { $output .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandItem"); } else { $extra_output .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandItem"); } ++$x; } if ($x > 11) { $GLOBALS['FilterID'] = "brand"; $GLOBALS['ExtraValues'] = $extra_output; $GLOBALS['SNIPPETS']['ShopByBrandAllItem'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SideFilterMoreLink"); //$GLOBALS['SNIPPETS']['ShopByBrandAllItem'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("ShopByBrandAllItem"); } if (!$output) { $this->DontDisplay = true; } $output = $GLOBALS['ISC_CLASS_TEMPLATE']->ParseSnippets($output, $GLOBALS['SNIPPETS']); $GLOBALS['SNIPPETS']['SideShopByBrandList'] = $output; }
public function isTrue() { $GLOBALS['ISC_CLASS_CART'] = GetClass('ISC_CART'); $cartProducts = $GLOBALS['ISC_CLASS_CART']->api->GetProductsInCart(); $total = 0; foreach ($cartProducts as $product) { $total += $product['product_price'] * $product['quantity']; } if ($total >= $this->amount) { $GLOBALS['ISC_CLASS_CART']->api->set('FREE_SHIPPING', true); return true; } return false; }