Changeset 857221
- Timestamp:
- 02/13/2014 01:38:45 PM (12 years ago)
- Location:
- baggage-freight/trunk
- Files:
-
- 2 edited
-
baggage_shipping.php (modified) (5 diffs)
-
class-wc-baggagefreight.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
baggage-freight/trunk/baggage_shipping.php
r808788 r857221 207 207 function post_order($order_id) 208 208 { 209 210 211 209 global $woocommerce; 212 210 global $wpdb; 211 $prefix = $wpdb->prefix; 213 212 214 213 $order_obj = new WC_Order( $order_id ); 215 214 $special_instruction = $order_obj->customer_note; 216 215 217 $shipping_method = get_post_meta($order_id, '_shipping_method', true); 216 $shipping_method = get_post_meta($order_id, '_shipping_method', true); 217 218 219 220 if(trim($shipping_method)=="") 221 { 222 $sql_Shipping = "select meta_value from ".$prefix."woocommerce_order_itemmeta where order_item_id=".$order_id." and meta_key='method_id'"; 223 224 225 226 227 $row_Shipping = $wpdb->get_row($sql_Shipping,OBJECT); 228 229 $shipping_method = $row_Shipping->meta_value; 230 } 231 232 233 234 $shipping_method = trim($shipping_method); 235 236 218 237 219 238 220 239 if($shipping_method=="bf_shipping" || $shipping_method=="bf_shipping1") 221 240 { 241 222 242 223 243 $sql_setting = "select * from baggage_settings"; … … 347 367 'strUrl' => $_SERVER['SERVER_NAME'] 348 368 ); 369 370 349 371 350 372 … … 358 380 359 381 360 if(intval($result)>0)361 {362 363 $BfOrderId = $result;364 $insert_order = "insert into baggage_order(Wp_Orderid,BfOrderId) values($order_id,$BfOrderId)";365 $wpdb->query($insert_order);366 367 }368 382 369 383 } 384 370 385 371 386 … … 395 410 396 411 397 echo "<br><br><p>$strLnk</p>";412 //echo "<br><br><p>$strLnk</p>"; 398 413 399 414 $result = ob_get_contents(); … … 408 423 add_action('woocommerce_checkout_update_order_meta', 'post_order'); 409 424 425 426 410 427 add_shortcode('baggage_link', 'post_link'); 411 428 -
baggage-freight/trunk/class-wc-baggagefreight.php
r857050 r857221 935 935 'Height' => $Height, 936 936 937 'Unit' => $Unit, 937 'Unit' => $Unit, 938 939 'Server' => $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'], 938 940 939 941 'Amount' => $Amount 940 942 941 943 ); 942 943 944 944 945 946 947 948 945 949 946 950 $ch = curl_init('http://www.baggagefreight.com.au/api/apiminrate.aspx'); … … 958 962 959 963 960 964 961 965 962 966
Note: See TracChangeset
for help on using the changeset viewer.