Advertisement
Guest User

Untitled

a guest
Dec 9th, 2015
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.59 KB | None | 0 0
  1.     $basket_html .= '<form action="'. $sess->url( SECUREURL."index.php?page=".$next_page."&checkout_last_step=".$current_stage) .'" method="post" name="adminForm">
  2.         <input type="hidden" name="option" value="com_virtuemart" />
  3.         <input type="hidden" name="Itemid" value="'. $Itemid .'" />
  4.         <input type="hidden" name="user_id" value="'. $auth['user_id'] .'" />
  5.         <input type="hidden" name="page" value="'. $next_page .'" />
  6.         <input type="hidden" name="func" value="checkoutProcess" />
  7.         <input type="hidden" name="zone_qty" value="'. $zone_qty .'" />
  8.         <input type="hidden" name="ship_to_info_id" value="'. $ship_to_info_id .'" />
  9.         <input type="hidden" name="shipping_rate_id" value="'. urlencode($shipping_rate_id) .'" />
  10.         <input type="hidden" name="payment_method_id" value="'. $payment_method_id .'" />
  11.         <input type="hidden" name="checkout_last_step" value="'. $current_stage .'" />';
  12.        
  13.  
  14.         $theme->set( 'basket_html', $basket_html );
  15.  
  16.         // CHECK_OUT_GET_SHIPPING_ADDR
  17.         // Lets the user pick or add an alternative Shipping Address
  18.         if( in_array('CHECK_OUT_GET_SHIPPING_ADDR', $checkout_steps[$current_stage]) ) {
  19.             echo '<a name="CHECK_OUT_GET_SHIPPING_ADDR"></a>';
  20.             echo $theme->fetch( 'checkout/get_shipping_address.tpl.php');
  21.             $theme->set('basket_html', '');
  22.         }
  23.         // CHECK_OUT_GET_SHIPPING_METHOD
  24.         // Let the user pick a shipping method
  25.         if( in_array('CHECK_OUT_GET_SHIPPING_METHOD', $checkout_steps[$current_stage]) ) {
  26.             echo '<a name="CHECK_OUT_GET_SHIPPING_METHOD"></a>';
  27.             echo $theme->fetch( 'checkout/get_shipping_method.tpl.php');
  28.             $theme->set('basket_html', '');
  29.         }
  30.  
  31.         // -CHECK_OUT_GET_PAYMENT_METHOD
  32.         // let the user choose a payment method
  33.         if( in_array('CHECK_OUT_GET_PAYMENT_METHOD', $checkout_steps[$current_stage]) ) {
  34.             echo '<a name="CHECK_OUT_GET_PAYMENT_METHOD"></a>';
  35.  
  36.                 if(!empty( $paypal_api_payment_method_id ) && $paypalActive)
  37.                 {
  38.                     echo $theme->fetch('checkout/get_payment_method_paypal_ex.tpl.php');
  39.                 }
  40.                 else
  41.                 {
  42.                     echo $theme->fetch( 'checkout/get_payment_method.tpl.php');
  43.                 }
  44.  
  45.             $theme->set('basket_html', '');
  46.         }
  47.         // -CHECK_OUT_GET_FINAL_CONFIRMATION
  48.         // shows a total summary including all payments, taxes, fees etc.
  49.         if( in_array('CHECK_OUT_GET_FINAL_CONFIRMATION', $checkout_steps[$current_stage]) ) {
  50.             echo '<a name="CHECK_OUT_GET_FINAL_CONFIRMATION"></a>';
  51.             // Now let the user confirm
  52.             echo $theme->fetch( 'checkout/get_final_confirmation.tpl.php');
  53.             $theme->set('basket_html', '');
  54.         }
  55.         ?>
  56.     <br /><?php
  57.         foreach( $checkout_steps[$current_stage] as $this_step ) {
  58.             echo '<input type="hidden" name="checkout_this_step[]" value="'.$this_step.'" />';
  59.         }
  60.  
  61.         // Set Dynamic Page Title: "Checkout: Step x of x"
  62.         $ii = 0;
  63.         for( $i = 1; $i < 5; $i++ ) {
  64.             if( isset( $checkout_steps[$i] ) ) {
  65.                 $ii += 1;
  66.                 if( in_array($this_step, $checkout_steps[$i] ) ) {
  67.                     $mainframe->setPageTitle( sprintf( $VM_LANG->_('VM_CHECKOUT_TITLE_TAG'), $ii, count($checkout_steps) ));
  68.                     break;
  69.                 }
  70.             }
  71.         }
  72.  
  73.         if( !in_array('CHECK_OUT_GET_FINAL_CONFIRMATION', $checkout_steps[$current_stage]) ) {
  74.             ?>
  75.                 <div align="center">
  76.                 <input type="submit" class="button" name="formSubmit" value="<?php echo $VM_LANG->_('PHPSHOP_CHECKOUT_NEXT');?> &gt;&gt;" />
  77.                 </div>
  78.             <?php
  79.         }
  80.         // Close the Checkout Form, which was opened in the first checkout template using the variable $basket_html
  81.         echo '</form>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement