Plugin Directory

Changeset 356400

Timestamp:
03/07/2011 01:16:13 AM (13 years ago)
Author:
jghazally
Message:

Fi the disregard Shipping bug : http://getshopped.org/forums/topic.php?id=18044

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-e-commerce/branches/3.8-development/wpsc-includes/ajax.functions.php

    r354990 r356400  
    512512    $form_validity = $wpsc_checkout->validate_forms();
    513513    extract( $form_validity ); // extracts $is_valid and $error_messages
    514     if ( get_option( 'do_not_use_shipping' ) == 0 && ($wpsc_cart->selected_shipping_method == null || $wpsc_cart->selected_shipping_option == null) ) {
    515         $_SESSION['wpsc_checkout_misc_error_messages'][] = __( 'You must select a shipping method, otherwise we cannot process your order.', 'wpsc' );
    516         $is_valid = false;
    517     }
     514
    518515    if ( $_POST['agree'] != 'yes' ) {
    519516        $_SESSION['wpsc_checkout_misc_error_messages'][] = __( 'Please agree to the terms and conditions, otherwise we cannot process your order.', 'wpsc' );
     
    549546        $is_valid = false;
    550547   
    551     if ( (get_option( 'do_not_use_shipping' ) != 1) && (in_array( 'ups', (array)$options )) && $_SESSION['wpsc_zipcode'] == '' ) {
    552         if ( $num_items != $disregard_shipping ) {
     548    if ( get_option( 'do_not_use_shipping' ) == 0 && ($wpsc_cart->selected_shipping_method == null || $wpsc_cart->selected_shipping_option == null) && ( $num_items != $disregard_shipping ) ) {
     549        $_SESSION['wpsc_checkout_misc_error_messages'][] = __( 'You must select a shipping method, otherwise we cannot process your order.', 'wpsc' );
     550        $is_valid = false;
     551    }
     552    if ( (get_option( 'do_not_use_shipping' ) != 1) && (in_array( 'ups', (array)$options )) && $_SESSION['wpsc_zipcode'] == '' && ( $num_items != $disregard_shipping ) ) {
    553553            $_SESSION['categoryAndShippingCountryConflict'] = __( 'Please enter a Zipcode and click calculate to proceed', 'wpsc' );
    554554            $is_valid = false;
    555         }
    556555    }
    557556    if ( $is_valid == true ) {
Note: See TracChangeset for help on using the changeset viewer.