Advertisement
Guest User

Untitled

a guest
Feb 16th, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  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;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement