"; } else { if($_SESSION['nzshpcrt_cart'] == null) { $collapser_image = 'plus.png'; } else { $collapser_image = 'minus.png'; } $fancy_collapser = ""; } } else { $fancy_collapser = ""; } if($state == 1) { if($input != '') { $cart = $_SESSION['nzshpcrt_cart']; echo "
"; echo wpsc_shopping_basket_internals($cart); echo "
"; } } else if(($state == 3) || ($state == 4)) { $cart = $_SESSION['nzshpcrt_cart']; if($state == 4) { #echo $input; echo "
"; echo "

".__('Shopping Cart')."$fancy_collapser

"; echo "
"; echo wpsc_shopping_basket_internals($cart,false,true); echo "
"; echo "
"; $dont_add_input = true; } else { echo "
"; echo "

".__('Shopping Cart')."$fancy_collapser

"; echo "
"; echo wpsc_shopping_basket_internals($cart,false,true); echo "
"; echo "
"; } } else { if(($GLOBALS['nzshpcrt_activateshpcrt'] === true)) { $cart = $_SESSION['nzshpcrt_cart']; echo "
"; echo "

".__('Shopping Cart')."$fancy_collapser

"; echo "
"; echo wpsc_shopping_basket_internals($cart,false,true); echo "
"; echo "
"; } } return $input; } // preserved for backwards compatibility function nzshpcrt_shopping_basket($input = null, $override_state = null) { return wpsc_shopping_cart($input, $override_state); } function wpsc_shopping_basket_internals($cart,$quantity_limit = false, $no_title=false) { global $wpdb, $wpsc_theme_path; $display_state = ""; if((($_SESSION['slider_state'] == 0) || (wpsc_cart_item_count() < 1)) && (get_option('show_sliding_cart') == 1)) { $display_state = "style='display: none;'"; } echo "
"; $cur_wpsc_theme_folder = apply_filters('wpsc_theme_folder',$wpsc_theme_path.WPSC_THEME_DIR); include_once($cur_wpsc_theme_folder."/cart_widget.php"); echo "
"; return $output; } function wpsc_country_region_list($form_id = null, $ajax = false , $selected_country = null, $selected_region = null, $supplied_form_id = null, $checkoutfields = false) { global $wpdb; if($selected_country == null) { $selected_country = get_option('base_country'); } if($selected_region == null) { $selected_region = get_option('base_region'); } if($form_id != null) { $html_form_id = "region_country_form_$form_id"; } else { $html_form_id = 'region_country_form'; } if($supplied_form_id != null) { $supplied_form_id = "id='$supplied_form_id'"; } if($checkoutfields){ $js = "onchange='set_shipping_country(\"$html_form_id\", \"$form_id\");'"; $title = 'shippingcountry'; }else{ $js= "onchange='set_billing_country(\"$html_form_id\", \"$form_id\");'"; $title = 'billingcountry'; } $country_data = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_CURRENCY_LIST."` ORDER BY `country` ASC",ARRAY_A); $output .= "
\n\r"; $output .= "\n\r"; $region_list = $wpdb->get_results("SELECT `".WPSC_TABLE_REGION_TAX."`.* FROM `".WPSC_TABLE_REGION_TAX."`, `".WPSC_TABLE_CURRENCY_LIST."` WHERE `".WPSC_TABLE_CURRENCY_LIST."`.`isocode` IN('".$selected_country."') AND `".WPSC_TABLE_CURRENCY_LIST."`.`id` = `".WPSC_TABLE_REGION_TAX."`.`country_id`",ARRAY_A) ; $sql ="SELECT `".WPSC_TABLE_CHECKOUT_FORMS."`.`id` FROM `".WPSC_TABLE_CHECKOUT_FORMS."` WHERE `unique_name` = 'shippingstate' "; $region_form_id = $wpdb->get_var($sql); if($checkoutfields){ $namevalue = "name='collected_data[".$region_form_id."]'"; // $namevalue = "name='collected_data[".$form_id."][1]'"; $js = "onchange='set_shipping_country(\"$html_form_id\", \"$form_id\");'"; $title = 'shippingregion'; }else{ $namevalue = "name='collected_data[".$form_id."][1]'"; $js= "onchange='set_billing_country(\"$html_form_id\", \"$form_id\");'"; $title = 'billingregion'; } // exit('Not here? >'.$region_form_id.' ' .$sql); $output .= "
"; if($region_list != null) { $output .= "\n\r"; } $output .= "
"; $output .= "
\n\r"; return $output; } ?>