Advertisement
Guest User

wp e-commerce checkout template

a guest
Oct 31st, 2012
1,217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 23.88 KB | None | 0 0
  1. <?php
  2. global $wpsc_cart, $wpdb, $wpsc_checkout, $wpsc_gateway, $wpsc_coupons;
  3. $wpsc_checkout = new wpsc_checkout();
  4. $wpsc_gateway = new wpsc_gateways();
  5. $alt = 0;
  6. if(isset($_SESSION['coupon_numbers']))
  7.    $wpsc_coupons = new wpsc_coupons($_SESSION['coupon_numbers']);
  8.  
  9. if(wpsc_cart_item_count() < 1) :
  10.     echo "<p>";
  11.     _e('Oops, there is nothing in your cart.', 'wpsc') . "<a href=".get_option("product_list_url").">" . __('Please visit our shop', 'wpsc') . "</a>";
  12.     echo "</p>";
  13.    
  14.    return;
  15. endif;
  16. ?>
  17. <div id="checkout_page_container">
  18. <h3><?php _e('Please review your order', 'wpsc'); ?></h3>
  19. <table class="checkout_cart">
  20.    <tr class="header title-font">
  21.       <th colspan="2" ><?php _e('Product', 'wpsc'); ?></th>
  22.       <th><?php _e('Quantity', 'wpsc'); ?></th>  
  23.       <th>&nbsp;</th>
  24.       <th><?php //_e('Price', 'wpsc'); ?></th>
  25.       <th><?php _e('Price', 'wpsc'); ?></th>
  26.      
  27.    </tr>
  28.    <?php while (wpsc_have_cart_items()) : wpsc_the_cart_item(); ?>
  29.       <?php
  30.        $alt++;
  31.        if ($alt %2 == 1)
  32.          $alt_class = 'alt';
  33.        else
  34.          $alt_class = '';
  35.        ?>
  36.       <?php  //this displays the confirm your order html ?>
  37.  
  38.       <tr class="product_row product_row_<?php echo wpsc_the_cart_item_key(); ?> <?php echo $alt_class;?>">
  39.  
  40.          <td class="firstcol wpsc_product_image wpsc_product_image_<?php echo wpsc_the_cart_item_key(); ?>">
  41.          <?php if('' != wpsc_cart_item_image()): ?>
  42.             <img src="<?php echo wpsc_cart_item_image(); ?>" alt="<?php echo wpsc_cart_item_name(); ?>" title="<?php echo wpsc_cart_item_name(); ?>" class="product_image" />
  43.          <?php else:
  44.          /* I dont think this gets used anymore,, but left in for backwards compatibility */
  45.          ?>
  46.             <div class="item_no_image">
  47.                <a href="<?php echo wpsc_the_product_permalink(); ?>">
  48.                <span><?php _e('No Image','wpsc'); ?></span>
  49.  
  50.                </a>
  51.             </div>
  52.          <?php endif; ?>
  53.          </td>
  54.  
  55.          <td class="wpsc_product_name wpsc_product_name_<?php echo wpsc_the_cart_item_key(); ?>">
  56.             <a href="<?php echo wpsc_cart_item_url();?>"><?php echo str_replace(array("1. ", "2. ","3. ", "4. ","5. "), array("", "","", "",""), wpsc_cart_item_name()); ?></a>
  57.          </td>
  58.  
  59.          <td class="wpsc_product_quantity wpsc_product_quantity_<?php echo wpsc_the_cart_item_key(); ?>">
  60.             <form action="<?php echo get_option('shopping_cart_url'); ?>" method="post" class="adjustform qty">
  61.                <input type="text" name="quantity" size="2" value="<?php echo wpsc_cart_item_quantity(); ?>" />
  62.                <input type="hidden" name="key" value="<?php echo wpsc_the_cart_item_key(); ?>" />
  63.                <input type="hidden" name="wpsc_update_quantity" value="true" />
  64.                <input type="submit" value="<?php //_e('Update', 'wpsc'); ?>" name="submit" />
  65.             </form>
  66.          </td>
  67.          <td class="wpsc_product_remove wpsc_product_remove_<?php echo wpsc_the_cart_item_key(); ?>">
  68.             <form action="<?php echo get_option('shopping_cart_url'); ?>" method="post" class="adjustform remove">
  69.                <input type="hidden" name="quantity" value="0" />
  70.                <input type="hidden" name="key" value="<?php echo wpsc_the_cart_item_key(); ?>" />
  71.                <input type="hidden" name="wpsc_update_quantity" value="true" />
  72.                <input type="submit" value="<?php _e('Remove', 'wpsc'); ?>" name="submit" />
  73.             </form>
  74.          </td>
  75.        
  76.             <td><?php // echo wpsc_cart_single_item_price(); ?></td>
  77.          <td class="wpsc_product_price wpsc_product_price_<?php echo wpsc_the_cart_item_key(); ?>"><span class="pricedisplay"><?php echo wpsc_cart_item_price(); ?></span></td>
  78.  
  79.  
  80.       </tr>
  81.    <?php endwhile; ?>    
  82.    </table>
  83.    <?php //this HTML displays coupons if there are any active coupons to use ?>
  84.    <table class="bottom-cart-table">
  85.        <tr class="wpsc_total_before_shipping">
  86.           <td class="coupon-cell">  
  87.          <?php  if(wpsc_uses_coupons()): ?>
  88.  
  89.       <span class="wpsc_coupon_row">
  90.          <small><?php _e('Do you have a coupon or discount code', 'wpsc'); ?>?</small>
  91.          
  92.             <form  class="coupon-form" method="post" action="<?php echo get_option('shopping_cart_url'); ?>">
  93.                <input type="text" name="coupon_num" id="coupon_num" value="<?php echo $wpsc_cart->coupons_name; ?>" />
  94.                <input type="submit" value="<?php _e('Update', 'wpsc') ?>" />
  95.             </form>
  96.          </span>         
  97.          <?php if(wpsc_coupons_error()): ?>
  98.          <span class="wpsc_coupon_row wpsc_coupon_error_row"><br/><small><?php _e('Coupon is not valid.', 'wpsc'); ?></small></span>
  99.       <?php endif; ?>
  100.          <?php endif; ?>
  101.          </td>
  102.           <td  class="wpsc_total_amount_before_shipping"><span class="title-font"><?php _e('Sub Total:','wpsc'); ?></span><br/><?php echo wpsc_cart_total_widget(false,false,false);?></td>
  103.       </tr>
  104. </table>  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.    <!-- cart contents table close -->
  111.   <?php if(wpsc_uses_shipping()): ?>
  112.        <p class="wpsc_cost_before"></p>
  113.    <?php endif; ?>
  114.    <?php  //this HTML dispalys the calculate your order HTML   ?>
  115.  
  116.    <?php if(wpsc_has_category_and_country_conflict()): ?>
  117.       <p class='validation-error'><?php echo $_SESSION['categoryAndShippingCountryConflict']; ?></p>
  118.       <?php unset($_SESSION['categoryAndShippingCountryConflict']);
  119.    endif;
  120.  
  121.    if(isset($_SESSION['WpscGatewayErrorMessage']) && $_SESSION['WpscGatewayErrorMessage'] != '') :?>
  122.       <p class="validation-error"><?php echo $_SESSION['WpscGatewayErrorMessage']; ?></p>
  123.    <?php
  124.    endif;
  125.    ?>
  126.  
  127.    <?php do_action('wpsc_before_shipping_of_shopping_cart'); ?>      
  128.    <h2><?php _e('Calculate Delivery Price', 'wpsc'); ?></h2>
  129. <p style="margin-top:-5px;"><small><?php _e('Please choose a country below to calculate your delivery costs', 'wpsc'); ?></small></p>
  130.    <div id="wpsc_shopping_cart_container">
  131.    <?php if(wpsc_uses_shipping()) : ?>
  132.  
  133.       <table class="productcart">
  134.  
  135.  
  136.          <?php if (!wpsc_have_shipping_quote()) : // No valid shipping quotes ?>
  137.             <?php if (wpsc_have_valid_shipping_zipcode()) : ?>
  138.                   <!--<tr class='wpsc_update_location'>
  139.                      <td colspan='5' class='shipping_error' >
  140.                         <?php _e('Please provide a Zipcode and click Calculate in order to continue.', 'wpsc'); ?>
  141.                      </td>
  142.                   </tr> -->
  143.             <?php else: ?>
  144.                <tr class='wpsc_update_location_error'>
  145.                   <td colspan='5' class='shipping_error' >
  146.                      <?php _e('Sorry, online ordering is unavailable to this destination and/or weight. Please double check your destination details.', 'wpsc'); ?>
  147.                   </td>
  148.                </tr>
  149.             <?php endif; ?>
  150.          <?php endif; ?>
  151.          <tr class='wpsc_change_country'>
  152.             <td>
  153.                <form name='change_country' id='change_country' action='' method='post'>
  154.                   <?php echo wpsc_shipping_country_list();?>
  155.                   <input type='hidden' name='wpsc_update_location' value='true' />
  156.                   <input type='hidden' name='wpsc_submit_zipcode' value='Calculate' />
  157.                </form>
  158.             </td>
  159.                 <td class="title-font" style="text-align:right">
  160.             <?php _e('Delivery', 'wpsc'); ?></td>
  161.             <td id="checkout_shipping" class="pricedisplay checkout-shipping"><?php echo wpsc_cart_shipping(); ?></td>
  162.            
  163.          </tr>
  164.  
  165.          <?php if (wpsc_have_morethanone_shipping_quote()) :?>
  166.             <?php while (wpsc_have_shipping_methods()) : wpsc_the_shipping_method(); ?>
  167.                   <?php    if (!wpsc_have_shipping_quotes()) { continue; } // Don't display shipping method if it doesn't have at least one quote ?>
  168.                   <tr class='wpsc_shipping_header'><td class='shipping_header' colspan='5'><?php echo wpsc_shipping_method_name().__(' - Choose a Shipping Rate', 'wpsc'); ?> </td></tr>
  169.                   <?php while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote();  ?>
  170.                      <tr class='<?php echo wpsc_shipping_quote_html_id(); ?>'>
  171.                         <td class='wpsc_shipping_quote_name wpsc_shipping_quote_name_<?php echo wpsc_shipping_quote_html_id(); ?>' colspan='3'>
  172.                            <label for='<?php echo wpsc_shipping_quote_html_id(); ?>'><?php echo wpsc_shipping_quote_name(); ?></label>
  173.                         </td>
  174.                         <td class='wpsc_shipping_quote_price wpsc_shipping_quote_price_<?php echo wpsc_shipping_quote_html_id(); ?>' style='text-align:center;'>
  175.                            <label for='<?php echo wpsc_shipping_quote_html_id(); ?>'><?php echo wpsc_shipping_quote_value(); ?></label>
  176.                         </td>
  177.                         <td class='wpsc_shipping_quote_radio wpsc_shipping_quote_radio_<?php echo wpsc_shipping_quote_html_id(); ?>' style='text-align:center;'>
  178.                            <?php if(wpsc_have_morethanone_shipping_methods_and_quotes()): ?>
  179.                               <input type='radio' id='<?php echo wpsc_shipping_quote_html_id(); ?>' <?php echo wpsc_shipping_quote_selected_state(); ?>  onclick='switchmethod("<?php echo wpsc_shipping_quote_name(); ?>", "<?php echo wpsc_shipping_method_internal_name(); ?>")' value='<?php echo wpsc_shipping_quote_value(true); ?>' name='shipping_method' />
  180.                            <?php else: ?>
  181.                               <input <?php echo wpsc_shipping_quote_selected_state(); ?> disabled='disabled' type='radio' id='<?php echo wpsc_shipping_quote_html_id(); ?>'  value='<?php echo wpsc_shipping_quote_value(true); ?>' name='shipping_method' />
  182.                                  <?php wpsc_update_shipping_single_method(); ?>
  183.                            <?php endif; ?>
  184.                         </td>
  185.                      </tr>
  186.                   <?php endwhile; ?>
  187.             <?php endwhile; ?>
  188.          <?php endif; ?>
  189.  
  190.          <?php wpsc_update_shipping_multiple_methods(); ?>
  191.  
  192.  
  193.          <?php if (!wpsc_have_shipping_quote()) : // No valid shipping quotes ?>
  194.                
  195.                
  196.  
  197.    <?php endif;  ?>
  198.    </table>
  199. <table class="bottom-cart-table">
  200.        <tr class="wpsc_total_before_shipping">
  201.           <td class="title-font review-cell">  
  202. Review &amp; Purchase
  203.          </td>
  204.           <td  class="wpsc_total_amount_before_shipping checkout-shipping">
  205.           <span class="title-font">Total Price</span><br/>
  206.           <span class="total-price"><?php echo wpsc_cart_total(); ?></span>
  207.           </td>
  208.       </tr>
  209. </table>
  210.  
  211.  
  212.  
  213.    <?php
  214.       $wpec_taxes_controller = new wpec_taxes_controller();
  215.       if($wpec_taxes_controller->wpec_taxes_isenabled()):
  216.    ?>
  217.       <table class="productcart">
  218.          <tr class="total_price total_tax">
  219.             <td colspan="3">
  220.                <?php echo wpsc_display_tax_label(true); ?>
  221.             </td>
  222.             <td colspan="2">
  223.                <span id="checkout_tax" class="pricedisplay checkout-tax"><?php echo wpsc_cart_tax(); ?></span>
  224.             </td>
  225.          </tr>
  226.       </table>
  227.    <?php endif; ?>
  228.    <?php do_action('wpsc_before_form_of_shopping_cart'); ?>
  229.                  
  230.     <?php if(!empty($_SESSION['wpsc_checkout_user_error_messages'])): ?>
  231.         <p class="validation-error">
  232.         <?php
  233.         foreach($_SESSION['wpsc_checkout_user_error_messages'] as $user_error )
  234.         echo $user_error."<br />\n";
  235.        
  236.         $_SESSION['wpsc_checkout_user_error_messages'] = array();
  237.         ?>
  238.     <?php endif; ?>
  239.  
  240.     <?php if ( wpsc_show_user_login_form() && !is_user_logged_in() ): ?>
  241.             <p><?php _e('You must sign in or register with us to continue with your purchase', 'wpsc');?></p>
  242.             <div class="wpsc_registration_form">
  243.                
  244.                 <fieldset class='wpsc_registration_form'>
  245.                     <h2><?php _e( 'Sign in', 'wpsc' ); ?></h2>
  246.                    
  247.                     <?php
  248.                     $args = array( 'remember' => false );
  249.                     wp_login_form( $args );
  250.                     ?>
  251.                     <div class="wpsc_signup_text"><?php _e('If you have bought from us before please sign in here to purchase', 'wpsc');?></div>
  252.                 </fieldset>
  253.             </div>
  254.     <?php endif; ?>
  255.    
  256.    
  257.     <form class='wpsc_checkout_forms' action='<?php echo get_option('shopping_cart_url'); ?>' method='post' enctype="multipart/form-data">
  258.     <!-- The final table>-->
  259.     <table id="final-checkout-table">
  260.    
  261.     <tr>
  262.     <td>
  263.                
  264.       <?php
  265.       /**
  266.        * Both the registration forms and the checkout details forms must be in the same form element as they are submitted together, you cannot have two form elements submit together without the use of JavaScript.
  267.       */
  268.       ?>
  269.  
  270.     <?php if(wpsc_show_user_login_form()):
  271.           global $current_user;
  272.           get_currentuserinfo();   ?>
  273.  
  274.         <div class="wpsc_registration_form">
  275.            
  276.             <fieldset class='wpsc_registration_form wpsc_right_registration'>
  277.                 <h2><?php _e('Join up now', 'wpsc');?></h2>
  278.          
  279.                 <label><?php _e('Username', 'wpsc'); ?>:</label>
  280.                 <input type="text" name="log" id="log" value="" size="20"/><br/>
  281.                
  282.                 <label><?php _e('Password', 'wpsc'); ?>:</label>
  283.                 <input type="password" name="pwd" id="pwd" value="" size="20" /><br />
  284.                
  285.                 <label><?php _e('E-mail', 'wpsc'); ?>:</label>
  286.                 <input type="text" name="user_email" id="user_email" value="<?php echo attribute_escape(stripslashes($user_email)); ?>" size="20" /><br />
  287.                
  288.                 <div class="wpsc_signup_text"><?php _e('Signing up is free and easy! please fill out your details your registration will happen automatically as you checkout. Don\'t forget to use your details to login with next time!', 'wpsc');?></div>
  289.             </fieldset>
  290.            
  291.         </div>
  292.         <div class="clear"></div>
  293.    <?php endif; // closes user login form
  294.  
  295.       if(!empty($_SESSION['wpsc_checkout_misc_error_messages'])): ?>
  296.          <div class='login_error'>
  297.             <?php foreach((array)$_SESSION['wpsc_checkout_misc_error_messages'] as $user_error ){?>
  298.                <p class='validation-error'><?php echo $user_error; ?></p>
  299.                <?php } ?>
  300.          </div>
  301.  
  302.       <?php
  303.       endif;
  304.        $_SESSION['wpsc_checkout_misc_error_messages'] = array(); ?>
  305. <?php ob_start(); ?>
  306.    <table class='wpsc_checkout_table table-1'>
  307.       <?php $i = 0;
  308.       while (wpsc_have_checkout_items()) : wpsc_the_checkout_item(); ?>
  309.  
  310.         <?php if(wpsc_checkout_form_is_header() == true){
  311.                $i++;
  312.                //display headers for form fields ?>
  313.                <?php if($i > 1):?>
  314.                   </table>
  315.                   <table class='wpsc_checkout_table table-<?php echo $i; ?>'>
  316.                <?php endif; ?>
  317.  
  318.                <tr <?php echo wpsc_the_checkout_item_error_class();?>>
  319.                   <td <?php wpsc_the_checkout_details_class(); ?> colspan='2'>
  320.                      <h4><?php echo wpsc_checkout_form_name();?></h4>
  321.                   </td>
  322.                </tr>
  323.                <?php if(wpsc_is_shipping_details()):?>
  324.                <tr class='same_as_shipping_row'>
  325.                   <td colspan ='2'>
  326.                   <?php $checked = '';
  327.                   if(isset($_POST['shippingSameBilling']) && $_POST['shippingSameBilling'])
  328.                     $_SESSION['shippingSameBilling'] = true;
  329.                   elseif(isset($_POST['submit']) && !isset($_POST['shippingSameBilling']))
  330.                     $_SESSION['shippingSameBilling'] = false;
  331.  
  332.                     if($_SESSION['shippingSameBilling'] == 'true')
  333.                         $checked = 'checked="checked"';
  334.                    ?>
  335.                     <label for='shippingSameBilling'><?php _e('Same as billing address:','wpsc'); ?></label>
  336.                     <input type='checkbox' value='true' name='shippingSameBilling' id='shippingSameBilling' <?php echo $checked; ?> />
  337.                     <br/><span id="shippingsameasbillingmessage"><?php _e('Your order will be shipped to the billing address', 'wpsc'); ?></span>
  338.                   </td>
  339.                </tr>
  340.                <?php endif;
  341.  
  342.             // Not a header so start display form fields
  343.             }elseif(wpsc_disregard_shipping_state_fields()){
  344.             ?>
  345.                <tr class='wpsc_hidden'>
  346.                   <td class='<?php echo wpsc_checkout_form_element_id(); ?>'>
  347.                      <label for='<?php echo wpsc_checkout_form_element_id(); ?>'>
  348.                      <?php echo wpsc_checkout_form_name();?>
  349.                      </label>
  350.                   </td>
  351.                   <td>
  352.                      <?php echo wpsc_checkout_form_field();?>
  353.                       <?php if(wpsc_the_checkout_item_error() != ''): ?>
  354.                              <p class='validation-error'><?php echo wpsc_the_checkout_item_error(); ?></p>
  355.                      <?php endif; ?>
  356.                   </td>
  357.                </tr>
  358.             <?php
  359.             }elseif(wpsc_disregard_billing_state_fields()){
  360.             ?>
  361.                <tr class='wpsc_hidden'>
  362.                   <td class='<?php echo wpsc_checkout_form_element_id(); ?>'>
  363.                      <label for='<?php echo wpsc_checkout_form_element_id(); ?>'>
  364.                      <?php echo wpsc_checkout_form_name();?>
  365.                      </label>
  366.                   </td>
  367.                   <td>
  368.                      <?php echo wpsc_checkout_form_field();?>
  369.                       <?php if(wpsc_the_checkout_item_error() != ''): ?>
  370.                              <p class='validation-error'><?php echo wpsc_the_checkout_item_error(); ?></p>
  371.                      <?php endif; ?>
  372.                   </td>
  373.                </tr>
  374.             <?php
  375.             }/*elseif( $wpsc_checkout->checkout_item->unique_name == 'billingemail'){ ?>
  376.                <?php $email_markup =
  377.                "<div class='wpsc_email_address'>
  378.                   <p class='<?php echo wpsc_checkout_form_element_id(); ?>'>
  379.                      <label class='wpsc_email_address' for='" . wpsc_checkout_form_element_id() . "'>
  380.                      " . __('Enter your email address', 'wpsc') . "
  381.                      </label>
  382.                   <p class='wpsc_email_address_p'>
  383.                   <img src='https://secure.gravatar.com/avatar/empty?s=60&amp;d=mm' id='wpsc_checkout_gravatar' />
  384.                   " . wpsc_checkout_form_field();
  385.                  
  386.                    if(wpsc_the_checkout_item_error() != '')
  387.                       $email_markup .= "<p class='validation-error'>" . wpsc_the_checkout_item_error() . "</p>";
  388.                $email_markup .= "</div>";
  389.              }*/else{ ?>
  390.             <tr>
  391.                <td class='<?php echo wpsc_checkout_form_element_id(); ?>'>
  392.                   <label for='<?php echo wpsc_checkout_form_element_id(); ?>'>
  393.                   <?php echo wpsc_checkout_form_name();?>
  394.                   </label>
  395.                </td>
  396.                <td>
  397.                   <?php echo wpsc_checkout_form_field();?>
  398.                    <?php if(wpsc_the_checkout_item_error() != ''): ?>
  399.                           <p class='validation-error'><?php echo wpsc_the_checkout_item_error(); ?></p>
  400.                   <?php endif; ?>
  401.                </td>
  402.             </tr>
  403.  
  404.          <?php }//endif; ?>
  405.  
  406.       <?php endwhile; ?>
  407.  
  408. <?php
  409.     $buffer_contents = ob_get_contents();
  410.     ob_end_clean();
  411.     if(isset($email_markup))
  412.         echo $email_markup;
  413.     echo $buffer_contents;
  414. ?>
  415.  
  416.       <?php if (wpsc_show_find_us()) : ?>
  417.       <tr>
  418.          <td><label for='how_find_us'><?php _e('How did you find us' , 'wpsc'); ?></label></td>
  419.          <td>
  420.             <select name='how_find_us'>
  421.                <option value='Word of Mouth'><?php _e('Word of mouth' , 'wpsc'); ?></option>
  422.                <option value='Advertisement'><?php _e('Advertising' , 'wpsc'); ?></option>
  423.                <option value='Internet'><?php _e('Internet' , 'wpsc'); ?></option>
  424.                <option value='Customer'><?php _e('Existing Customer' , 'wpsc'); ?></option>
  425.             </select>
  426.          </td>
  427.       </tr>
  428.       <?php endif; ?>
  429.       <?php do_action('wpsc_inside_shopping_cart'); ?>
  430.  
  431.       <?php  //this HTML displays activated payment gateways   ?>
  432.       <?php if(wpsc_gateway_count() > 1): // if we have more than one gateway enabled, offer the user a choice ?>
  433.          <tr>
  434.          <td colspan='2' class='wpsc_gateway_container'>
  435.             <h3><?php _e('Payment Type', 'wpsc');?></h3>
  436.             <?php while (wpsc_have_gateways()) : wpsc_the_gateway(); ?>
  437.                <div class="custom_gateway">
  438.                      <label><input type="radio" value="<?php echo wpsc_gateway_internal_name();?>" <?php echo wpsc_gateway_is_checked(); ?> name="custom_gateway" class="custom_gateway"/><?php echo wpsc_gateway_name(); ?>
  439.                         <?php if( wpsc_show_gateway_image() ): ?>
  440.                         <img src="<?php echo wpsc_gateway_image_url(); ?>" alt="<?php echo wpsc_gateway_name(); ?>" style="position:relative; top:5px;" />
  441.                         <?php endif; ?>
  442.                      </label>
  443.  
  444.                   <?php if(wpsc_gateway_form_fields()): ?>
  445.                      <table class='wpsc_checkout_table <?php echo wpsc_gateway_form_field_style();?>'>
  446.                         <?php echo wpsc_gateway_form_fields();?>
  447.                      </table>
  448.                   <?php endif; ?>
  449.                </div>
  450.             <?php endwhile; ?>
  451.             </tr></td>
  452.          <?php else: // otherwise, there is no choice, stick in a hidden form ?>
  453.             <tr><td colspan="2" class='wpsc_gateway_container'>
  454.             <?php while (wpsc_have_gateways()) : wpsc_the_gateway(); ?>
  455.                <input name='custom_gateway' value='<?php echo wpsc_gateway_internal_name();?>' type='hidden' />
  456.  
  457.                   <?php if(wpsc_gateway_form_fields()): ?>
  458.                      <table class='wpsc_checkout_table <?php echo wpsc_gateway_form_field_style();?>'>
  459.                         <?php echo wpsc_gateway_form_fields();?>
  460.                      </table>
  461.                   <?php endif; ?>
  462.             <?php endwhile; ?>
  463.          </td>
  464.          </tr>
  465.          <?php endif; ?>
  466.  
  467.       <?php if(wpsc_has_tnc()) : ?>
  468.          <tr>
  469.             <td colspan='2'>
  470.                 <label for="agree"><input id="agree" type='checkbox' value='yes' name='agree' /> <?php printf(__("I agree to The <a class='thickbox' target='_blank' href='%s' class='termsandconds'>Terms and Conditions</a>", "wpsc"), site_url("?termsandconds=true&amp;width=360&amp;height=400'")); ?></label>
  471.                </td>
  472.          </tr>
  473.       <?php endif; ?>
  474.       </table>
  475.       </td>
  476.       <td class="checkout-cell">
  477.       <small>Clicking "Purchase" will take you to the Paypal Website where your payment will be securely handled</small><br/>
  478.       <br/>
  479.                   <?php if(!wpsc_has_tnc()) : ?>
  480.                <input type='hidden' value='yes' name='agree' />
  481.             <?php endif; ?>
  482.                <input type='hidden' value='submit_checkout' name='wpsc_action' />
  483.                <img src="<?php bloginfo("template_directory"); ?>/img/paypal-logo.png" alt="paypal logo" style="margin-bottom: -7px; margin-right:4px;"/>
  484.                <input type='submit' value='<?php _e('Purchase with Paypal', 'wpsc');?>' name='submit' class='make_purchase wpsc_buy_button' />
  485.        
  486.          
  487.          </td>
  488.          </tr>
  489.        
  490.          </table><!-- End the final table -->
  491.        </form>
  492.  
  493.  
  494.  
  495. <!-- div for make purchase button
  496.       <table class='wpsc_make_purchase'>
  497.          <tr><td>
  498.          <?php echo wpsc_checkout_form_name();?>
  499.          </td>
  500.        
  501.          
  502.          <td>
  503.             <?php if(!wpsc_has_tnc()) : ?>
  504.                <input type='hidden' value='yes' name='agree' />
  505.             <?php endif; ?>
  506.                <input type='hidden' value='submit_checkout' name='wpsc_action' />
  507.                <input type='submit' value='<?php _e('Purchase', 'wpsc');?>' name='submit' class='make_purchase wpsc_buy_button' />
  508.          
  509.          <p><small>Clicking "Purchase" will take you to the Paypal Website where your payment will be securely handled</small></p>
  510.                  </td>
  511.          </tr>
  512.       </table> -->
  513.                </div>
  514.             </div>
  515.             <?php return; ?>
  516.          <?php endif; ?>
  517. <div class='clear'></div>
  518.  
  519. </div>
  520. </div><!--close checkout_page_container-->
  521. <?php
  522. do_action('wpsc_bottom_of_shopping_cart');
  523.  
  524. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement