Example #1
0
 /**
  * This function is used to validate the shipping address.
  *
  * 
  * 
  * @return string
  */
 function validateShippingAddress()
 {
     //language
     include_once 'classes/Core/CLanguage.php';
     Core_CLanguage::setLanguage('CHECK_OUT');
     include_once 'classes/Core/CCurrencySettings.php';
     Core_CCurrencySettings::getDefaultCurrency();
     include "classes/Lib/CheckInputs.php";
     $obj = new Lib_CheckInputs('shippingaddress');
     if (!isset($_SESSION['user_id'])) {
         header('Location:?do=index');
     } else {
         include_once 'classes/Core/CAddCart.php';
         include_once 'classes/Display/DAddCart.php';
         include 'classes/Core/CUserRegistration.php';
         include 'classes/Display/DUserRegistration.php';
         include 'classes/Core/CKeywordSearch.php';
         include 'classes/Display/DKeywordSearch.php';
         include 'classes/Core/CHome.php';
         include_once 'classes/Core/CLastViewedProducts.php';
         include_once 'classes/Display/DLastViewedProducts.php';
         include 'classes/Lib/TagClouds.php';
         include 'classes/Core/CTagClouds.php';
         include 'classes/Core/CUserAddressBook.php';
         $output['sitelogo'] = Core_CHome::getLogo();
         $output['pagetitle'] = Core_CHome::pageTitle();
         $output['timezone'] = Core_CHome::setTimeZone();
         $output['currentDate'] = date('D,M d,Y - h:i A');
         $output['skinname'] = Core_CHome::skinName();
         $output['googleanalytics'] = Core_CHome::getGoogleAnalyticsCode();
         $output['footerconnect'] = Core_CHome::getfooterconnect();
         $output['sociallink'] = Core_CHome::showSocialLinks();
         $output['dropdowncat'] = Core_CKeywordSearch::categoryDropDown();
         $output['signup'] = Display_DUserRegistration::signUp();
         $lastobj = new Core_CLastViewedProducts();
         $output['lastviewedproducts'] = $lastobj->lastViewedProducts();
         $default = new Core_CAddCart();
         $output['showcart'] = $default->insertShippingAddress();
         $output['cartcount'] = Core_CAddCart::countCart();
         $output['tagClouds'] = Core_CTagClouds::displayTagClouds();
         $output['loginStatus'] = Core_CUserRegistration::loginStatus();
         $output['headermenu'] = Core_CUserRegistration::showHeaderMenu();
         $output['headermenuhidden'] = Core_CUserRegistration::showHeaderMenuHidden();
         $output['currencysettings'] = Core_CUserRegistration::showCurrencySettings();
         $output['headertext'] = Core_CUserRegistration::showHeaderText();
         Bin_Template::createTemplate('addtocart.html', $output);
     }
 }