SHARE
TWEET

Untitled

a guest Feb 16th, 2014 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    $unit_price = array(
  2.       'amount' => $_order['СтоимостьДоставки'] * 100,
  3.       'currency_code' => 'RUB',
  4.       'data' => array(),
  5.     );
  6.     $unit_price['data'] = commerce_price_component_add(
  7.       $unit_price,
  8.       'base_price',
  9.       $unit_price,
  10.       TRUE,
  11.       FALSE
  12.     );
  13.     $shipping_line_item = commerce_shipping_line_item_new('delivery', $unit_price, $existing_order->order_id);
  14.     commerce_line_item_save($shipping_line_item);
  15.     $wrapper->commerce_line_items[] = $shipping_line_item;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top