<?php
/*
	osConcert Seat Booking Software
	https://www.osconcert.com
	Copyright (c) 2024 osConcert

	Released under the GNU General Public License 
*/	
// Check to ensure this file is included in osConcert!
defined('_FEXEC') or die();

	require(DIR_WS_INCLUDES."http.js"); 
	
	define('FILENAME_CHECKOUT_CONFIRMATION', '');
define('HEADING_TITLE', '');
define('TABLE_HEADING_BILLING_ADDRESS', '');
define('TEXT_SELECTED_BILLING_DESTINATION', '');
define('FILENAME_CHECKOUT_PAYMENT_ADDRESS', '');
define('IMAGE_BUTTON_CHANGE_ADDRESS', '');
define('HIDE_CUSTOMER_BILLING_ADDRESS', '');
define('TEXT_SELECTED_PAYMENT_ADDRESS', '');
define('TABLE_HEADING_PAYMENT_METHOD', '');
define('TEXT_SELECT_PAYMENT_METHOD', '');
define('TITLE_PLEASE_SELECT', '');
define('TEXT_ENTER_PAYMENT_INFORMATION', '');
define('TEXT_NO_PAYMENT_SELECTION', '');
define('TEXT_PAYMENT_BARRED', '');
define('TEXT_PAYMENT_BARRED_REASON', '');
define('TEXT_SEASON_TICKET', '');
define('MODULE_ORDER_TOTAL_GV_CHECKBOX', '');
define('TEXT_REDEEM_YOUR_SEASON_TICKET', '');
define('TEXT_USE_COUPON_INSTEAD', '');
define('TEXT_GIFT_VOUCHER', '');
define('TEXT_REDEEM_YOUR_VOUCHER', '');
define('TEXT_COUPON_CANCEL', '');
define('MODULE_ORDER_TOTAL_BOFR_STATUS', '');
define('MODULE_ORDER_TOTAL_BOFR_TITLE', '');
define('TABLE_HEADING_COMMENTS', '');
define('TABLE_HEADING_COMMENTS_HERE', '');
define('TITLE_CONTINUE_CHECKOUT_PROCEDURE', '');
define('TEXT_CONTINUE_CHECKOUT_PROCEDURE', '');
define('CHECKOUT_BAR_DELIVERY', '');
define('CHECKOUT_BAR_PAYMENT', '');
define('CHECKOUT_BAR_CONFIRMATION', '');
	
	if ($FSESSION->get('payment') == 'free'){
		$FSESSION->remove('payment');
	}
	
	//return checkvalidate();
	//echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post','onSubmit="" id = "checkout_payment"');
	
	//return checkvalidate();
	echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post','onSubmit="return checkvalidate()" id = "checkout_payment"');
	
	 if(DISCOUNT_CHECKOUT_MESSAGE !='')
	 {
	?>
	<div class="alert alert-primary" role="alert"><h2 style="text-align:center;margin-bottom:0"><?php echo DISCOUNT_CHECKOUT_MESSAGE; ?></h2></div>
	<?php
	}

	if (HIDE_BILLING_ADDRESS == 'no')
	{
	?>
	<!--do something?-->
	<?php 
	} 
	?>
	<?php $serverDate = date('Y-m-d H:i:s',getServerDate(false)); ?>
		<div class="section-header">
		<h2><?php echo HEADING_TITLE; ?></h2>
		</div>
		<div class="index_static">
	<?php
if ($FREQUEST->getvalue('payment_error') != '' 
  && is_object(${$FREQUEST->getvalue('payment_error')}) 
  && ($error = ${$FREQUEST->getvalue('payment_error')}->get_error())) {
?>
  <div class="checkout-panel checkout-panel--error">
    <div class="alert alert-info mb-2">
      <?php echo tep_output_string_protected($error['title']); ?>
    </div>
    <div class="alert alert-info mb-0">
      <?php echo $error['error']; ?>
    </div>
  </div>
<?php
  if ($messageStack->size('checkout_payment') > 0) {
    echo '<div class="checkout-panel__messages">' . $messageStack->output('checkout_payment') . '</div>';
  }
}
?>

<?php
$showBilling = (HIDE_BILLING_ADDRESS == 'no');
$isBoxOffice = (($_SESSION['BoxOffice'] == 999) || ($_SESSION['customer_country_id'] == 999));
?>

<?php if ($isBoxOffice) { ?>

  <section id="billing-address" class="checkout-panel billing-panel <?php echo $showBilling ? '' : 'd-none'; ?>">

    <div class="checkout-panel__header">
      <h4><?php echo TABLE_HEADING_BILLING_ADDRESS; ?></h4>
    </div>

    <div class="billing-panel__grid">

      <div class="billing-panel__intro">
        <p class="mb-2"><?php echo TEXT_SELECTED_BILLING_DESTINATION; ?></p>

        <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'); ?>" class="billing-panel__change">
          <?php echo tep_template_image_button('', IMAGE_BUTTON_CHANGE_ADDRESS); ?>
        </a>
      </div>

      <div class="billing-panel__address">

        <div class="billing-panel__label">
          <strong>
            <?php echo $isBoxOffice ? TEXT_CURRENT_BILLING . ':' : TITLE_BILLING_ADDRESS; ?>
          </strong>
          <br>
          <?php echo tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?>
        </div>

        <div class="billing-panel__address-text">
          <?php
          $addresses_query = tep_db_query("
            SELECT
              address_book_id,
              entry_firstname AS firstname,
              entry_lastname AS lastname,
              entry_company AS company,
              entry_customer_email AS customer_email,
              entry_customer_phone AS customer_phone,
              entry_street_address AS street_address,
              entry_suburb AS suburb,
              entry_city AS city,
              entry_postcode AS postcode,
              entry_state AS state,
              entry_zone_id AS zone_id,
              entry_country_id AS country_id
            FROM " . TABLE_ADDRESS_BOOK . "
            WHERE address_book_id = '" . (int)$FSESSION->get('billto') . "'
          ");

          $addresses = tep_db_fetch_array($addresses_query);

          if ($addresses) {
            $format_id = tep_get_address_format_id($addresses['country_id']);
            $addresses = array_map('ucfirst', $addresses);
            $addresses['customer_email'] = strtolower($addresses['customer_email']);

            echo tep_address_format($format_id, $addresses, true, '<br>', ' ');
          }
          ?>
        </div>

      </div>

    </div>
  </section>

<?php } ?>

<?php if (HIDE_CUSTOMER_BILLING_ADDRESS == 'no' && !$isBoxOffice) { ?>

  <section id="billing-address" class="checkout-panel billing-panel">

    <div class="checkout-panel__header">
      <h4><?php echo TABLE_HEADING_BILLING_ADDRESS; ?></h4>
    </div>

    <div class="billing-panel__grid">

      <div class="billing-panel__intro">
        <p class="mb-2"><?php echo TEXT_SELECTED_PAYMENT_ADDRESS; ?></p>

        <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'); ?>" class="billing-panel__change">
          <?php echo tep_template_image_button_basic('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS); ?>
        </a>
      </div>

      <div class="billing-panel__address">

        <div class="billing-panel__label">
          <strong><?php echo TITLE_BILLING_ADDRESS; ?></strong><br>
          <?php echo tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?>
        </div>

        <div class="billing-panel__address-text">
          <?php echo tep_address_label($FSESSION->customer_id, $FSESSION->billto, true, ' ', '<br>'); ?>
        </div>

      </div>

    </div>
  </section>

<?php } ?>
<section class="checkout-payment payment-panel">

  <h4 class="payment-panel__title"><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></h4>

  <div class="payment-panel__box">

    <?php 
    $selection = $payment_modules->selection();

    if (is_countable($selection) && count($selection) > 1) {
    ?>
      <div class="payment-panel__intro d-flex justify-content-between gap-2">
        <div class="payment-panel__intro-text">
          <?php echo TEXT_SELECT_PAYMENT_METHOD; ?>
        </div>
        <div class="payment-panel__intro-select text-end">
          <strong><?php echo TITLE_PLEASE_SELECT; ?></strong><br>
          <?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?>
        </div>
      </div>
    <?php
    } else {
    ?>
      <div class="payment-panel__intro">
        <?php
        if (is_countable($selection) && count($selection) > 0) {
          if (sizeof($selection) > 0) {
            echo TEXT_ENTER_PAYMENT_INFORMATION;
          } else {
            echo TEXT_NO_PAYMENT_SELECTION;
          }
        }
        ?>
      </div>
    <?php
    }

    $flag = 'B';
    $radio_buttons = 0;
    $m = count((array)$selection[0]['fields']);
    $cnt = 0;
    $barred = 0;

    if (is_countable($selection) && count($selection) > 0) {

      for ($i = 0, $n = sizeof($selection); $i < $n; $i++) {

        $single_payment = false;
        $is_selected = (($selection[$i]['id'] == $FSESSION->get('payment')) || ($n == 1));
        $is_barred = !empty($selection[$i]['barred']);
    ?>

      <div class="payment-option-wrap">

        <?php
        if (!$is_barred) {

          if ($is_selected) {
            echo '<div id="defaultSelected" class="payment-option moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ',\'', $selection[$i]['id'] . '\')">' . "\n";
          } else {
            echo '<div id="defaultunSelected" class="payment-option moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ',\'', $selection[$i]['id'] . '\')">' . "\n";
          }
        ?>

          <div class="payment-option__main">
            <div class="payment-option__name">
              <strong><?php echo $selection[$i]['module']; ?></strong>
            </div>

            <div class="payment-option__radio">
              <?php
              if (sizeof($selection) > 1) {
                echo tep_draw_radio_field(
                  'payment',
                  $selection[$i]['id'],
                  $is_selected ? true : ''
                );
              } else {
                $single_payment = true;
                echo tep_draw_hidden_field('payment', $selection[$i]['id']);
              }
              ?>
            </div>
          </div>

        </div>

        <?php
          if (isset($selection[$i]['error'])) {
        ?>
          <div class="payment-option__error">
            <?php echo $selection[$i]['error']; ?>
          </div>
        <?php
          } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
        ?>
          <div
            class="payment-option__fields"
            <?php if (!$single_payment) { ?>
              id="<?php echo $selection[$i]['id']; ?>"
              <?php echo (($FSESSION->get('payment') != $selection[$i]['id']) ? 'style="display:none"' : ''); ?>
            <?php } ?>
          >
            <?php
            for ($j = 0, $n2 = sizeof($selection[$i]['fields']); $j < $n2; $j++) {
            ?>
              <div class="payment-field">
                <div class="payment-field__title">
                  <?php echo $selection[$i]['fields'][$j]['title']; ?>
                </div>
                <div class="payment-field__control">
                  <?php echo $selection[$i]['fields'][$j]['field']; ?>
                </div>
              </div>
            <?php
            }
            ?>
          </div>
        <?php
          }

        } else {

          echo '<div class="payment-option payment-option--barred moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ',\'', $selection[$i]['id'] . '\')">' . "\n";
        ?>

          <div class="payment-option__main">
            <div class="payment-option__name">
              <strong><?php echo $selection[$i]['module']; ?></strong>
            </div>

            <div class="payment-option__radio">
              <?php
              if (sizeof($selection) > 1) {
                echo tep_draw_radio_field('payment', $selection[$i]['id'], false, ' disabled="disabled" ');
              } else {
                $single_payment++;
              }
              ?>
            </div>
          </div>

        </div>

        <div class="payment-option__barred-message">
          <div class="payment-option__barred-title">
            <?php echo TEXT_PAYMENT_BARRED; ?>
          </div>
          <div class="payment-option__barred-reason">
            <?php echo sprintf(TEXT_PAYMENT_BARRED_REASON, tep_get_country_title($IP_COUNTRY)); ?>
          </div>
        </div>

        <?php
          $barred++;
        }
        ?>

      </div>

    <?php
        $radio_buttons++;
      }
    }

    if (is_countable($selection) && count($selection) > 0) {
      if ($barred == count($selection)) {
        $payment_barred = true;
      }
    }
    ?>

  </div>

</section>
	<script>	
	<?php /* following jscript function ADDED FOR CCGV */ ?>
	var submitter = null;
	function submitFunction() 
	{
	submitter = 1;
	}
	<?php /* END OF ADDED FOR CCGV */ ?>
	previousPaymentSelected="<?php echo $FSESSION->get('payment');?>";
	if(!previousPaymentSelected && document.getElementById("defaultunSelected")) selectRowEffect(document.getElementById("defaultunSelected"),0,"<?php echo $selection[0]['id'];?>");
	function doComment(chk) { 
		if(document.getElementById("show_comments") && chk.checked)
			document.getElementById("show_comments").style.display="";
		else if(document.getElementById("show_comments") && !chk.checked)
			document.getElementById("show_comments").style.display="none";
	}
	</script>
	<?php  
		if($display_season_tickets == true)
		{ 	
			?>
			<h4 id ="seasonTitle" style = "display:"><?php echo TEXT_SEASON_TICKET;?></h4> 
			<?php					
				
			$use_season_tickets_checkbox = " onchange=javascript:hideSeasonUnchecked();";
			$show_id_entry = 'none';
				if (MODULE_ORDER_TOTAL_GV_CHECKBOX == "Checked"){
					$use_season_tickets_checkbox = "checked . ' onchange=javascript:hideSeason();'" ;
					$show_id_entry = '';
				}
			if($display_coupons == true && $cart -> check_for_vouchers() == false)
			{
			?>
				<table width="100%" cellpadding="2">
				<tr id="select" style="display:">
					<td class="main">&nbsp;&nbsp;&nbsp;<strong><span id="click_text"><?php echo TEXT_REDEEM_YOUR_SEASON_TICKET;?></span></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<?php echo  tep_draw_checkbox_field('123', '0',$show_coupon,' id = "123" ' . $use_season_tickets_checkbox );?>
				</td>
				</tr>
				<tr id="choose" style="display:<?php echo $coupon_show_style;?>">
				<td class="main">&nbsp;&nbsp;&nbsp;<strong><span id="click_text"><?php echo TEXT_USE_COUPON_INSTEAD;?></span></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo  tep_draw_checkbox_field('234', '0',$show_coupon,' id="234" onchange="javascript:doStuff()" '); ?> 
				</td>	
				</tr>
				<?php 
			}else
			{
				?>
				<table width="100%" cellpadding="2">
				<tr id="select" style="display:">
				<td class="main">&nbsp;&nbsp;&nbsp;<strong><span id="click_text"><?php echo TEXT_REDEEM_YOUR_SEASON_TICKET;?></span></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo  tep_draw_checkbox_field('123', '0', $show_coupon, 'id="123" ' . $use_season_tickets_checkbox . ' onchange="javascript:showHide(\'entry\')"; ');?>
				</td>
				</tr>
				<?php 
			}
				?>	
			<table>
			<tr id="entry" style="display:<?php echo $show_id_entry;?>">
				<td class="main">
					<table width="100%">			  
					  <tr>
						<td>
						<div id="error_span"></div>
						<div class="smalltext" align="center" style="height:100;width:100%;"></div>                         
						<?php 
						echo $order_total_modules->season_credit_selection(); ?>
						 </td>
					  </tr>
					</table>
				</td>
			</tr>
			</table><!-- eof main-table-->
		<?php 	   
		}//end season ticket
		?>
<?php #### display discount ####
echo $order_total_modules->display_before_comments;
?>
	<?php  
	if($display_coupons == 'true' && $cart -> check_for_vouchers() == false)
	{
	?>
		<br>
		<table width="100%" style="display:<?php echo $coupon_display_style;?>" id="coupon_table">
		<tr>
		<td>
		<h4><?php echo TEXT_GIFT_VOUCHER;?></h4> 
		</td>
		</tr>
		<?php
		if (ENFORCED_COUPON == 'yes')
		{
		$show_coupon=true; 
		?>
		<tr id="" style="display:none;">
			<td class="main">&nbsp;&nbsp;&nbsp;<b><?php echo TEXT_REDEEM_YOUR_VOUCHER;?></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<?php echo  tep_draw_checkbox_field('coupon', '0',$show_coupon,' onclick="javascript:hide_credit()"');?> 
			</td>
		</tr>	
		<?php 
		}else
		{ 
		$show_coupon=false;
		?>
		<tr id="click_text1">
			<td class="main">&nbsp;&nbsp;&nbsp;<b><span id="click_text"><?php echo TEXT_REDEEM_YOUR_VOUCHER;?></span></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<?php echo  tep_draw_checkbox_field('coupon', '0',$show_coupon,' onclick="javascript:hide_credit()"');?> 
			</td>
		</tr>
		<?php } ?>
		<tr id="reset_page" style = "display:none">
			<td class="main">&nbsp;&nbsp;<b><span id="click_text"><?php echo TEXT_COUPON_CANCEL;?></span></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<?php echo  tep_draw_checkbox_field('coupon2', '0',0,'onclick=javascript:startOver()');?> </td>
		</tr>
		<tr>
		<td>
		<table width="100%">			  
		  <tr>
			<td>
			<div id="error_span"></div>
		<div id="credit_result" class="smalltext" align="center" style="display:none;height:100;width:100%;"></div>                         
		<div id="credit" style="display:none;"><?php echo $order_total_modules->credit_selection(); ?></div>	
			 </td>
		  </tr>
		</table>
		</td>
		</tr>
	</table>

	<?php 
	} 
	?>
	<!-- Box Office Discount -->
	<?php
	if(MODULE_ORDER_TOTAL_BOFR_STATUS == 'true' && $_SESSION['customer_country_id']==999)
	{
		//kill sessions - they should not be live here but just in case
		$FSESSION->remove('bofr');
		$FSESSION->remove('bofr_title');
		//catch error return
		if(isset($_GET['bofr']))
		{
		$bofr_display = '';
		$bofr_error = $_GET['bofr_error'];
		}
		else
		{
		$bofr_display = 'display:none';
		$bofr_error   = '';
		}
		?>
		<!--BOFR stuff-->
				<table width="100%">
				
				<tr>
				<td class="main">
				<h4><?php echo MODULE_ORDER_TOTAL_BOFR_TITLE;?></h4> 
				<table width="100%">			  
					  <tr>
						<td>
						<div id="error_span"></div>
				<div id="bofr_error" class="smalltext messageStackError" align="left" style="<?php echo $bofr_display ?>;width:100%;margin-bottom:10px;"><?php echo $bofr_error; ?>
				</div>     
				<div id="bofr_title">
				<table>
					<tr>
						<td>
						<label><?php echo MODULE_ORDER_TOTAL_BOFR_TITLE_DESCRIPTION;?></label>
						<input type="text" name="bofr_title" id="bofr_title_input" />
						</td>
					</tr>
					<tr>
						<td>
						<label><?php echo MODULE_ORDER_TOTAL_BOFR_DESCRIPTION;?></label>
						<input type="decimal" name="bofr" id="bofr_input" />
						<span> <?php echo ORDER_TOTAL_IS; ?> <?php echo $currencies->format($order->info['total']);?></span>
						</td>
					</tr>
				</table>
				</div>	
						</td>
					  </tr>
					</table>
				</td>
				</tr>
				</table>

	<?php 
	} 
	?>
<?php 
if (defined('EXTRA_FIELDS') && EXTRA_FIELDS === 'yes') {
    // Convert session values to integers to avoid type comparison issues
    $boxOffice = isset($_SESSION['BoxOffice']) ? (int)$_SESSION['BoxOffice'] : null;
    $customerCountryId = isset($_SESSION['customer_country_id']) ? (int)$_SESSION['customer_country_id'] : null;

    // Check if both session variables are set and have the value 999
    // if ($boxOffice === 999 && $customerCountryId === 999) {
        // // Include the extra fields form
        include(DIR_FS_CATALOG . DIR_WS_TEMPLATES . '/extra_fields1.php'); 
    // } else {
        // // Debug: Output why the form is not included
        // echo 'Form not included because conditions are not met.<br>';
    // }
}
?>



		<script>
		if(document.checkout_payment.coupon && document.checkout_payment.coupon.checked==true && document.getElementById("credit").style.display=='none'){
		hide_credit();
		}
		</script>
<?php #### display discount and other modules
      #### just add function display_before_comments() to each order total module you want to say something
 echo $order_total_modules->display_before_comments();
?>
	<?php
$comments = '';

if ($FSESSION->is_registered('comments')) {
  $comments = $_SESSION['comments'];
}

$comment_style = ($comments != '') ? "display:block;" : "display:none;";
?>

<section class="checkout-panel comments-panel">

  <div class="checkout-panel__header comments-panel__header">
    <h4><?php echo TABLE_HEADING_COMMENTS; ?></h4>
  </div>

			<?php 
				//Get comments up
				if ($FSESSION->is_registered('comments')) 
				{
				$comments=$_SESSION['comments'];
				}
				//end
				echo TABLE_HEADING_COMMENTS_HERE .tep_draw_checkbox_field('comments_chkbox', '1',($comments)?true:false,'onclick=javascript:doComment(this)');
			?>

	<div id="show_comments" style="<?php echo $comment_style; ?>">
		<?php echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.tep_draw_textarea_field('comments', 'soft', '60', '5',$_SESSION['comments']); ?>
	</div>

</section>
	<?php
	#############################################################
		if(REMINDER_2=='yes')
		{
		include_once ('wannabuy');
		wannabuy();
		}
	?>

	
	<!--#######################################################################-->
	<?php 
	if(PAYMENT_SET_TERMS=='no')
	{
	?>
	<div class="container-fluid">
	<div class="row">
		<div class="col-md-8"><strong><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</strong>&nbsp;&nbsp;' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?>
		</div>
		<div class="col-md-2" style="padding:15px;text-align:center">
		</div>
		<div class="col-md-2" style="padding:15px;text-align:center"><?php if (!$USER_BARRED && !$payment_barred) echo tep_template_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?>
		</div>
	</div>
	</div>
	<?php 
	}else{
	?>
	<div class="container-fluid">
	<div class="row">
		<div class="col-md-8"><div style="margin:10px;padding:10px;font=size:16px;font-weight:bold;background-color:yellow;color:red;border:red 2px dotted;border-radius:10px"><span style=""><?php echo TEXT_CONFIRM_CONDITIONS . '</span></div>'; ?>
		</div>
		<div class="col-md-2" style="padding:15px;text-align:center"><input type="checkbox" name="checkbox" value="check"  />
		</div>
		<div class="col-md-2" style="padding:15px;text-align:center"><input type="submit" name="email_submit" value="<?php echo IMAGE_BUTTON_CONTINUE;?>" class="btn btn-primary" onclick="if(!this.form.checkbox.checked){alert('<?php echo TEXT_CONFIRM_CONDITIONS;?>');return false}"  />
		</div>
	</div>
	</div>
	<?php 
	}
	?>
	<!--#######################################################################-->
	
		<div class="clearfix"></div>
		<div class="bs-stepper">
            <div class="bs-stepper-header">
			<div class="cart" data-target="#cart">
			   <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL'); ?>">
                <button type="button" class="btn step-trigger">
                  <span class="bs-stepper-circle"><i class="bi-cart3"></i></span>
                  <span class="bs-stepper-label"><?php echo HEADER_TITLE_CART_CONTENTS; ?></span>
                </button>
				</a>
              </div>
              <div class="step" data-target="#delivery">
			   <a href="<?php echo tep_href_link('checkout_shipping.php', '', 'SSL'); ?>">
                <button type="button" class="btn step-trigger">
                  <span class="bs-stepper-circle">1</span>
                  <span class="bs-stepper-label"><?php echo CHECKOUT_BAR_DELIVERY; ?></span>
                </button>
				</a>
              </div>
              <div class="line"></div>
              <div class="step active" data-target="#payment">
                <button type="button" class="btn step-trigger">
                  <span class="bs-stepper-circle">2</span>
                  <span class="bs-stepper-label"><?php echo CHECKOUT_BAR_PAYMENT; ?></span>
                </button>
              </div>
              <div class="line"></div>
              <div class="step" data-target="#confirm">
                <button type="button" class="btn step-trigger" disabled="disabled">
                  <span class="bs-stepper-circle">3</span>
                  <span class="bs-stepper-label"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></span>
                </button>
              </div>
            </div>
          </div>
</form>
</div>