Ejemplo n.º 1
0
 /**
  * Returns the countries related payment ID array.
  *
  * If PayPal is the selected payment method, any Currencies not supported
  * will be removed from the Currency array.
  * Returns the Payment IDs allowed for the given Country ID.
  * Note that the Payment IDs are used for both the keys and values
  * of the array returned, like:
  *  array(
  *    payment_id => payment_id,
  *    [...]
  *  )
  * @global  ADONewConnection  $objDatabase    Database connection object
  * @param    integer $countryId         The country ID
  * @param    array   $arrCurrencies     The currencies array, by reference
  * @return   array                      Array of Payment IDs
  */
 static function getCountriesRelatedPaymentIdArray($countryId, $arrCurrencies)
 {
     global $objDatabase;
     if (is_null(self::$arrPayments)) {
         self::init();
     }
     if (isset($_SESSION['shop']['paymentId'])) {
         $payment_id = $_SESSION['shop']['paymentId'];
         $processor_id = self::getPaymentProcessorId($payment_id);
         if ($processor_id == 2) {
             foreach ($arrCurrencies as $index => $arrCurrency) {
                 if (!\PayPal::isAcceptedCurrencyCode($arrCurrency['code'])) {
                     unset($arrCurrencies[$index]);
                 }
             }
         }
     }
     $arrPaymentId = array();
     $query = "\n            SELECT DISTINCT `payment`.`id`\n              FROM `" . DBPREFIX . "module_shop" . MODULE_INDEX . "_rel_countries` AS `country`\n             INNER JOIN `" . DBPREFIX . "module_shop" . MODULE_INDEX . "_zones` AS `zone`\n                ON `country`.`zone_id`=`zone`.`id`\n             INNER JOIN `" . DBPREFIX . "module_shop" . MODULE_INDEX . "_rel_payment` AS `rel_payment`\n                ON `zone`.`id`=`rel_payment`.`zone_id`\n             INNER JOIN `" . DBPREFIX . "module_shop" . MODULE_INDEX . "_payment` AS `payment`\n                ON `payment`.`id`=`rel_payment`.`payment_id`\n             WHERE `country`.`country_id`=" . intval($countryId) . "\n               AND `payment`.`active`=1\n               AND `zone`.`active`=1";
     $objResult = $objDatabase->Execute($query);
     while ($objResult && !$objResult->EOF) {
         if (isset(self::$arrPayments[$objResult->fields['id']]) && (self::$arrPayments[$objResult->fields['id']]['processor_id'] != 2 || count($arrCurrencies))) {
             $paymentId = $objResult->fields['id'];
             // the processor with the id 3 is postfinance and 11 is postfinance mobile
             // if it is one of them, it should only be able to order when it is Switzerland
             if (in_array(self::$arrPayments[$paymentId]['processor_id'], array(3, 11)) && \Cx\Core\Country\Controller\Country::getAlpha2ById($countryId) != 'CH') {
                 $objResult->MoveNext();
                 continue;
             }
             $arrPaymentId[$paymentId] = $paymentId;
         }
         $objResult->MoveNext();
     }
     return $arrPaymentId;
 }
Ejemplo n.º 2
0
 /**
  * Generate the form and show hints if necessary.
  * If user input validation is successful a new transaction will be added.
  * In this case the form will be hidden and only a status message will be shown.
  *
  * @access      private
  */
 private function renderForm()
 {
     global $objDatabase, $_ARRAYLANG, $_CORELANG;
     //check the payment service provider configuration
     $objSettingsGeneral = new SettingsGeneral($objDatabase);
     if (!$objSettingsGeneral->getEpaymentStatus()) {
         $this->arrStatusMessages['error'][] = $_ARRAYLANG['TXT_CHECKOUT_EPAYMENT_DEACTIVATED'];
         $this->objTemplate->hideblock('form');
         $this->objTemplate->hideblock('redirect');
         return;
     }
     //initialize variables
     $arrFieldValues = array();
     $arrFieldsToHighlight = array();
     $arrCssClasses = array();
     $cssHighlightingClass = 'highlight';
     $cssLabelClass = 'label';
     $htmlRequiredField = ' *';
     $arrSelectOptions[] = array();
     //validate submitted user data
     if (isset($_REQUEST['submit'])) {
         $arrFieldValues['invoice_number'] = !empty($_REQUEST['invoice_number']) && $_REQUEST['invoice_number'] !== $_ARRAYLANG['TXT_CHECKOUT_INVOICE_NUMBER'] . $htmlRequiredField ? $_REQUEST['invoice_number'] : '';
         $arrFieldValues['invoice_currency'] = !empty($_REQUEST['invoice_currency']) ? $_REQUEST['invoice_currency'] : '';
         $arrFieldValues['invoice_amount'] = !empty($_REQUEST['invoice_amount']) && $_REQUEST['invoice_amount'] !== $_ARRAYLANG['TXT_CHECKOUT_INVOICE_AMOUNT'] . $htmlRequiredField ? $_REQUEST['invoice_amount'] : '';
         $arrFieldValues['contact_title'] = !empty($_REQUEST['contact_title']) ? $_REQUEST['contact_title'] : '';
         $arrFieldValues['contact_forename'] = !empty($_REQUEST['contact_forename']) && $_REQUEST['contact_forename'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_FORENAME'] . $htmlRequiredField ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_forename'])) : '';
         $arrFieldValues['contact_surname'] = !empty($_REQUEST['contact_surname']) && $_REQUEST['contact_surname'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_SURNAME'] . $htmlRequiredField ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_surname'])) : '';
         $arrFieldValues['contact_company'] = !empty($_REQUEST['contact_company']) && $_REQUEST['contact_company'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_COMPANY'] ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_company'])) : '';
         $arrFieldValues['contact_street'] = !empty($_REQUEST['contact_street']) && $_REQUEST['contact_street'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_STREET'] . $htmlRequiredField ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_street'])) : '';
         $arrFieldValues['contact_postcode'] = !empty($_REQUEST['contact_postcode']) && $_REQUEST['contact_postcode'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_POSTCODE'] . $htmlRequiredField ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_postcode'])) : '';
         $arrFieldValues['contact_place'] = !empty($_REQUEST['contact_place']) && $_REQUEST['contact_place'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_PLACE'] . $htmlRequiredField ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_place'])) : '';
         $arrFieldValues['contact_country'] = !empty($_REQUEST['contact_country']) ? $_REQUEST['contact_country'] : '';
         $arrFieldValues['contact_phone'] = !empty($_REQUEST['contact_phone']) && $_REQUEST['contact_phone'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_PHONE'] . $htmlRequiredField ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_phone'])) : '';
         $arrFieldValues['contact_email'] = !empty($_REQUEST['contact_email']) && $_REQUEST['contact_email'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_EMAIL'] . $htmlRequiredField ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_email'])) : '';
         //get keys of passed data
         if (!isset($this->arrCurrencies[$invoiceCurrency]) && ($key = array_search(strtoupper($invoiceCurrency), $this->arrCurrencies))) {
             $invoiceCurrency = $key;
         }
         if (strtolower($contactTitle) !== self::MISTER && strtolower($contactTitle) !== self::MISS) {
             if (ucfirst(strtolower($contactTitle)) == $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE_MISTER']) {
                 $contactTitle = self::MISTER;
             } elseif (ucfirst(strtolower($contactTitle)) == $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE_MISS']) {
                 $contactTitle = self::MISS;
             }
         } else {
             $contactTitle = strtolower($contactTitle);
         }
         if (!isset($this->arrCountries[$contactCountry]) && ($key = array_search(ucfirst(strtolower($contactCountry)), $this->arrCountries))) {
             $contactCountry = $key;
         }
         $arrUserData['text']['invoice_number']['name'] = $_ARRAYLANG['TXT_CHECKOUT_INVOICE_NUMBER'];
         $arrUserData['text']['invoice_number']['value'] = $arrFieldValues['invoice_number'];
         $arrUserData['text']['invoice_number']['length'] = 255;
         $arrUserData['text']['invoice_number']['mandatory'] = 1;
         $arrUserData['selection']['invoice_currency']['name'] = $_ARRAYLANG['TXT_CHECKOUT_INVOICE_CURRENCY'];
         $arrUserData['selection']['invoice_currency']['value'] = $arrFieldValues['invoice_currency'];
         $arrUserData['selection']['invoice_currency']['options'] = $this->arrCurrencies;
         $arrUserData['selection']['invoice_currency']['mandatory'] = 1;
         $arrUserData['numeric']['invoice_amount']['name'] = $_ARRAYLANG['TXT_CHECKOUT_INVOICE_AMOUNT'];
         $arrUserData['numeric']['invoice_amount']['value'] = $arrFieldValues['invoice_amount'];
         $arrUserData['numeric']['invoice_amount']['length'] = 15;
         $arrUserData['numeric']['invoice_amount']['mandatory'] = 1;
         $arrUserData['selection']['contact_title']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE'];
         $arrUserData['selection']['contact_title']['value'] = $arrFieldValues['contact_title'];
         $arrUserData['selection']['contact_title']['options'] = array(self::MISTER => '', self::MISS => '');
         $arrUserData['selection']['contact_title']['mandatory'] = 1;
         $arrUserData['text']['contact_forename']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_FORENAME'];
         $arrUserData['text']['contact_forename']['value'] = $arrFieldValues['contact_forename'];
         $arrUserData['text']['contact_forename']['length'] = 255;
         $arrUserData['text']['contact_forename']['mandatory'] = 1;
         $arrUserData['text']['contact_surname']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_SURNAME'];
         $arrUserData['text']['contact_surname']['value'] = $arrFieldValues['contact_surname'];
         $arrUserData['text']['contact_surname']['length'] = 255;
         $arrUserData['text']['contact_surname']['mandatory'] = 1;
         $arrUserData['text']['contact_company']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_COMPANY'];
         $arrUserData['text']['contact_company']['value'] = $arrFieldValues['contact_company'];
         $arrUserData['text']['contact_company']['length'] = 255;
         $arrUserData['text']['contact_company']['mandatory'] = 0;
         $arrUserData['text']['contact_street']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_STREET'];
         $arrUserData['text']['contact_street']['value'] = $arrFieldValues['contact_street'];
         $arrUserData['text']['contact_street']['length'] = 255;
         $arrUserData['text']['contact_street']['mandatory'] = 1;
         $arrUserData['text']['contact_postcode']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_POSTCODE'];
         $arrUserData['text']['contact_postcode']['value'] = $arrFieldValues['contact_postcode'];
         $arrUserData['text']['contact_postcode']['length'] = 255;
         $arrUserData['text']['contact_postcode']['mandatory'] = 1;
         $arrUserData['text']['contact_place']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_PLACE'];
         $arrUserData['text']['contact_place']['value'] = $arrFieldValues['contact_place'];
         $arrUserData['text']['contact_place']['length'] = 255;
         $arrUserData['text']['contact_place']['mandatory'] = 1;
         $arrUserData['selection']['contact_country']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_COUNTRY'];
         $arrUserData['selection']['contact_country']['value'] = $arrFieldValues['contact_country'];
         $arrUserData['selection']['contact_country']['options'] = $this->arrCountries;
         $arrUserData['selection']['contact_country']['mandatory'] = 1;
         $arrUserData['text']['contact_phone']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_PHONE'];
         $arrUserData['text']['contact_phone']['value'] = $arrFieldValues['contact_phone'];
         $arrUserData['text']['contact_phone']['length'] = 255;
         $arrUserData['text']['contact_phone']['mandatory'] = 1;
         $arrUserData['email']['contact_email']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_EMAIL'];
         $arrUserData['email']['contact_email']['value'] = $arrFieldValues['contact_email'];
         $arrUserData['email']['contact_email']['length'] = 255;
         $arrUserData['email']['contact_email']['mandatory'] = 1;
         $arrFieldsToHighlight = $this->validateUserData($arrUserData);
         if (empty($arrFieldsToHighlight)) {
             //validation was successful. now add a new transaction.
             $id = $this->objTransaction->add(self::WAITING, $arrUserData['text']['invoice_number']['value'], $arrUserData['selection']['invoice_currency']['value'], $arrUserData['numeric']['invoice_amount']['value'], $arrUserData['selection']['contact_title']['value'], $arrUserData['text']['contact_forename']['value'], $arrUserData['text']['contact_surname']['value'], $arrUserData['text']['contact_company']['value'], $arrUserData['text']['contact_street']['value'], $arrUserData['text']['contact_postcode']['value'], $arrUserData['text']['contact_place']['value'], $arrUserData['selection']['contact_country']['value'], $arrUserData['text']['contact_phone']['value'], $arrUserData['email']['contact_email']['value']);
             if ($id) {
                 $objSettingsYellowpay = new SettingsYellowpay($objDatabase);
                 $arrYellowpay = $objSettingsYellowpay->get();
                 $arrOrder = array('ORDERID' => $id, 'AMOUNT' => intval($arrFieldValues['invoice_amount'] * 100), 'CURRENCY' => $this->arrCurrencies[$arrFieldValues['invoice_currency']], 'PARAMPLUS' => 'section=Checkout');
                 $arrSettings['postfinance_shop_id']['value'] = $arrYellowpay['pspid'];
                 $arrSettings['postfinance_hash_signature_in']['value'] = $arrYellowpay['sha_in'];
                 $arrSettings['postfinance_authorization_type']['value'] = $arrYellowpay['operation'];
                 $arrSettings['postfinance_use_testserver']['value'] = $arrYellowpay['testserver'];
                 $landingPage = \Env::get('em')->getRepository('Cx\\Core\\ContentManager\\Model\\Entity\\Page')->findOneByModuleCmdLang('Checkout', '', FRONTEND_LANG_ID);
                 $this->objTemplate->setVariable('CHECKOUT_YELLOWPAY_FORM', \Yellowpay::getForm($arrOrder, $_ARRAYLANG['TXT_CHECKOUT_START_PAYMENT'], false, $arrSettings, $landingPage));
                 if (\Yellowpay::$arrError) {
                     $this->arrStatusMessages['error'][] = $_ARRAYLANG['TXT_CHECKOUT_FAILED_TO_INITIALISE_YELLOWPAY'];
                 } else {
                     $this->arrStatusMessages['ok'][] = $_ARRAYLANG['TXT_CHECKOUT_ENTRY_SAVED_SUCCESSFULLY'];
                 }
                 $this->objTemplate->hideBlock('form');
                 $this->objTemplate->touchBlock('redirect');
                 return;
             } else {
                 $this->arrStatusMessages['error'][] = $_ARRAYLANG['TXT_CHECKOUT_ENTRY_SAVED_ERROR'];
             }
         }
     } else {
         //get passed data
         $arrFieldValues['invoice_number'] = !empty($_REQUEST['invoice_number']) ? $_REQUEST['invoice_number'] : '';
         $arrFieldValues['invoice_currency'] = !empty($_REQUEST['invoice_currency']) ? $_REQUEST['invoice_currency'] : '';
         $arrFieldValues['invoice_amount'] = !empty($_REQUEST['invoice_amount']) ? $_REQUEST['invoice_amount'] : '';
         $arrFieldValues['contact_title'] = !empty($_REQUEST['contact_title']) ? $_REQUEST['contact_title'] : '';
         $arrFieldValues['contact_forename'] = !empty($_REQUEST['contact_forename']) ? $_REQUEST['contact_forename'] : '';
         $arrFieldValues['contact_surname'] = !empty($_REQUEST['contact_surname']) ? $_REQUEST['contact_surname'] : '';
         $arrFieldValues['contact_company'] = !empty($_REQUEST['contact_company']) ? $_REQUEST['contact_company'] : '';
         $arrFieldValues['contact_street'] = !empty($_REQUEST['contact_street']) ? $_REQUEST['contact_street'] : '';
         $arrFieldValues['contact_postcode'] = !empty($_REQUEST['contact_postcode']) ? $_REQUEST['contact_postcode'] : '';
         $arrFieldValues['contact_place'] = !empty($_REQUEST['contact_place']) ? $_REQUEST['contact_place'] : '';
         $arrFieldValues['contact_country'] = !empty($_REQUEST['contact_country']) ? $_REQUEST['contact_country'] : '';
         $arrFieldValues['contact_phone'] = !empty($_REQUEST['contact_phone']) ? $_REQUEST['contact_phone'] : '';
         $arrFieldValues['contact_email'] = !empty($_REQUEST['contact_email']) ? $_REQUEST['contact_email'] : '';
         //get keys of passed options selection
         if (!isset($this->arrCurrencies[$arrFieldValues['invoice_currency']]) && ($key = array_search(strtoupper($arrFieldValues['invoice_currency']), $this->arrCurrencies))) {
             $arrFieldValues['invoice_currency'] = $key;
         }
         if (strtolower($arrFieldValues['contact_title']) !== self::MISTER && strtolower($arrFieldValues['contact_title']) !== self::MISS) {
             if (ucfirst(strtolower($arrFieldValues['contact_title'])) == $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE_MISTER']) {
                 $arrFieldValues['contact_title'] = self::MISTER;
             } elseif (ucfirst(strtolower($arrFieldValues['contact_title'])) == $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE_MISS']) {
                 $arrFieldValues['contact_title'] = self::MISS;
             }
         } else {
             $arrFieldValues['contact_title'] = strtolower($arrFieldValues['contact_title']);
         }
         if (!isset($this->arrCountries[$arrFieldValues['contact_country']]) && ($key = array_search(ucfirst(strtolower($arrFieldValues['contact_country'])), $this->arrCountries))) {
             $arrFieldValues['contact_country'] = $key;
         }
     }
     //get currency options
     $arrSelectOptions['currencies'][] = '<option value="0">' . $_ARRAYLANG['TXT_CHECKOUT_INVOICE_CURRENCY'] . $htmlRequiredField . '</option>';
     foreach ($this->arrCurrencies as $id => $currency) {
         $selected = $id == $arrFieldValues['invoice_currency'] ? ' selected="selected"' : '';
         $arrSelectOptions['currencies'][] = '<option value="' . $id . '"' . $selected . '>' . contrexx_raw2xhtml($currency) . '</option>';
     }
     //get title options
     $selectedMister = self::MISTER == $arrFieldValues['contact_title'] ? ' selected="selected"' : '';
     $selectedMiss = self::MISS == $arrFieldValues['contact_title'] ? ' selected="selected"' : '';
     $arrSelectOptions['titles'][] = '<option value="0">' . $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE'] . $htmlRequiredField . '</option>';
     $arrSelectOptions['titles'][] = '<option value="' . self::MISTER . '"' . $selectedMister . '>' . $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE_MISTER'] . '</option>';
     $arrSelectOptions['titles'][] = '<option value="' . self::MISS . '"' . $selectedMiss . '>' . $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE_MISS'] . '</option>';
     //get country options
     if (!empty($this->arrCountries)) {
         //$arrSelectOptions['countries'][] = '<option value="0">'.$_ARRAYLANG['TXT_CHECKOUT_CONTACT_COUNTRY'].$htmlRequiredField.'</option>';
         foreach ($this->arrCountries as $id => $name) {
             if (\Cx\Core\Country\Controller\Country::getAlpha2ById($id) != 'CH') {
                 continue;
             }
             $selected = $id == $arrFieldValues['contact_country'] ? ' selected="selected"' : '';
             $arrSelectOptions['countries'][] = '<option value="' . $id . '"' . $selected . '>' . contrexx_raw2xhtml($name) . '</option>';
         }
     }
     // check wihch css classes have to be set
     foreach ($arrFieldValues as $name => $value) {
         if (isset($arrFieldsToHighlight[$name])) {
             $arrCssClasses[$name][] = $cssHighlightingClass;
         }
         if (empty($value)) {
             $arrCssClasses[$name][] = $cssLabelClass;
         }
         $arrCssClasses[$name] = implode(' ', $arrCssClasses[$name]);
     }
     \JS::activate('jquery');
     \JS::registerCode($this->getJavascript($htmlRequiredField));
     $this->objTemplate->setVariable(array('TXT_CHECKOUT_DESCRIPTION' => $_ARRAYLANG['TXT_CHECKOUT_DESCRIPTION'], 'TXT_CHECKOUT_BILL_DATA' => $_ARRAYLANG['TXT_CHECKOUT_BILL_DATA'], 'TXT_CHECKOUT_CONTACT_DATA' => $_ARRAYLANG['TXT_CHECKOUT_CONTACT_DATA'], 'CHECKOUT_INVOICE_NUMBER' => !empty($arrFieldValues['invoice_number']) ? $arrFieldValues['invoice_number'] : $_ARRAYLANG['TXT_CHECKOUT_INVOICE_NUMBER'] . $htmlRequiredField, 'CHECKOUT_INVOICE_CURRENCY_OPTIONS' => !empty($arrSelectOptions['currencies']) ? implode($arrSelectOptions['currencies']) : '', 'CHECKOUT_INVOICE_AMOUNT' => !empty($arrFieldValues['invoice_amount']) ? $arrFieldValues['invoice_amount'] : $_ARRAYLANG['TXT_CHECKOUT_INVOICE_AMOUNT'] . $htmlRequiredField, 'CHECKOUT_CONTACT_TITLE_OPTIONS' => !empty($arrSelectOptions['titles']) ? implode($arrSelectOptions['titles']) : '', 'CHECKOUT_CONTACT_FORENAME' => !empty($arrFieldValues['contact_forename']) ? $arrFieldValues['contact_forename'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_FORENAME'] . $htmlRequiredField, 'CHECKOUT_CONTACT_SURNAME' => !empty($arrFieldValues['contact_surname']) ? $arrFieldValues['contact_surname'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_SURNAME'] . $htmlRequiredField, 'CHECKOUT_CONTACT_COMPANY' => !empty($arrFieldValues['contact_company']) ? $arrFieldValues['contact_company'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_COMPANY'], 'CHECKOUT_CONTACT_STREET' => !empty($arrFieldValues['contact_street']) ? $arrFieldValues['contact_street'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_STREET'] . $htmlRequiredField, 'CHECKOUT_CONTACT_POSTCODE' => !empty($arrFieldValues['contact_postcode']) ? $arrFieldValues['contact_postcode'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_POSTCODE'] . $htmlRequiredField, 'CHECKOUT_CONTACT_PLACE' => !empty($arrFieldValues['contact_place']) ? $arrFieldValues['contact_place'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_PLACE'] . $htmlRequiredField, 'CHECKOUT_CONTACT_COUNTRY_OPTIONS' => !empty($arrSelectOptions['countries']) ? implode($arrSelectOptions['countries']) : '', 'CHECKOUT_CONTACT_PHONE' => !empty($arrFieldValues['contact_phone']) ? $arrFieldValues['contact_phone'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_PHONE'] . $htmlRequiredField, 'CHECKOUT_CONTACT_EMAIL' => !empty($arrFieldValues['contact_email']) ? $arrFieldValues['contact_email'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_EMAIL'] . $htmlRequiredField, 'CHECKOUT_INVOICE_NUMBER_CLASS' => $arrCssClasses['invoice_number'], 'CHECKOUT_INVOICE_CURRENCY_CLASS' => $arrCssClasses['invoice_currency'], 'CHECKOUT_INVOICE_AMOUNT_CLASS' => $arrCssClasses['invoice_amount'], 'CHECKOUT_CONTACT_TITLE_CLASS' => $arrCssClasses['contact_title'], 'CHECKOUT_CONTACT_FORENAME_CLASS' => $arrCssClasses['contact_forename'], 'CHECKOUT_CONTACT_SURNAME_CLASS' => $arrCssClasses['contact_surname'], 'CHECKOUT_CONTACT_COMPANY_CLASS' => $arrCssClasses['contact_company'], 'CHECKOUT_CONTACT_STREET_CLASS' => $arrCssClasses['contact_street'], 'CHECKOUT_CONTACT_POSTCODE_CLASS' => $arrCssClasses['contact_postcode'], 'CHECKOUT_CONTACT_PLACE_CLASS' => $arrCssClasses['contact_place'], 'CHECKOUT_CONTACT_COUNTRY_CLASS' => $arrCssClasses['contact_country'], 'CHECKOUT_CONTACT_PHONE_CLASS' => $arrCssClasses['contact_phone'], 'CHECKOUT_CONTACT_EMAIL_CLASS' => $arrCssClasses['contact_email'], 'TXT_CORE_SUBMIT' => $_CORELANG['TXT_CORE_SUBMIT'], 'TXT_CORE_RESET' => $_CORELANG['TXT_CORE_RESET']));
     $this->objTemplate->hideBlock('redirect');
     $this->objTemplate->parse('form');
 }