Answer the question
In order to leave comments, you need to log in
How to add a shipping method to an order?
The site on drupal and on it an online store through ubercart. I tried to search in api, but I didn’t understand how to transfer the delivery service to the order. I want to transfer the delivery service to the order through the script.
//Загружаю заказ
$siteOrder = uc_order_load($record['order_id']);
//Затем заполняю поля, но среди них я не нашёл типа доставки
$siteOrder->billing_ucxf_tracking_number = $order['delivery']['data']['trackNumber'];
Array
(
[date-time] => 2016-11-13 19:20:08
[0] => stdClass Object
(
[order_id] => 14996
[uid] => 6955
[order_status] => order_delivered_to_postoffice
[order_total] => 699
[product_count] => 1
[primary_email] => [email protected]
[delivery_first_name] => Дмитрий Витальевич
[delivery_last_name] => Бобков
[delivery_phone] => +79190258422
[delivery_company] =>
[delivery_street1] => Ул.Фурманова д.37 кв.27
[delivery_street2] =>
[delivery_city] => Ковров
[delivery_zone] => 112
[delivery_postal_code] => 601901
[delivery_country] => 643
[billing_first_name] =>
[billing_last_name] =>
[billing_phone] =>
[billing_company] =>
[billing_street1] =>
[billing_street2] =>
[billing_city] =>
[billing_zone] => 0
[billing_postal_code] =>
[billing_country] => 643
[payment_method] => cod
[data] => Array
(
[new_user] => Array
(
[name] => dskrezhetov
)
[complete_sale] => new_user
)
[created] => 1477158057
[modified] => 1478412905
[host] => 176.215.228.82
[currency] => RUB
[uc_mailchimp] =>
[products] => Array
(
[0] => stdClass Object
(
[order_product_id] => 146752
[order_id] => 14996
[nid] => 257
[title] => Бамбуковая поперечная флейта
[manufacturer] =>
[model] => 0477
[qty] => 1
[cost] => 0.00000
[price] => 300.00000
[weight] => 30
[data] => Array
(
[attributes] => Array
(
)
[shippable] => 1
[module] => uc_product
)
[order_uid] => 6955
)
)
[uc_discounts_codes] => Array
(
)
[quote] => Array
(
[method] => flatrate_17
[accessorials] => 0
[rate] => 399.00000
[quote_form] =>
)
[information_ucxf_punkt_samovyvoza] =>
[information_ucxf_vremya_dostavki] =>
[information_ucxf_okon4anie_dostavki] =>
[information_ucxf_date_recieveing] =>
[delivery_ucxf_confidencialnost] => Мы гарантируем, что Ваши личные данные сохранятся в тайне и не будут использованы для рассылки спама.
[delivery_ucxf_confidencialnost_zapis] => Нажимая на кнопку "Далее" Вы соглашаетесь, что Ваши персональные данные будут записаны, и исполнение Договора Офёрты.
[delivery_ucxf_sms_soglasie] => 1
[billing_ucxf_tracking_number] => 11171005007441
[billing_ucxf_tracking_number_b2c] =>
[billing_ucxf_tracking_number_dpd] =>
[line_items] => Array
(
[0] => Array
(
[line_item_id] => subtotal
[type] => subtotal
[title] => Сумма
[amount] => 300
[weight] => 0
[data] => Array
(
)
)
[1] => Array
(
[line_item_id] => 28695
[type] => shipping
[title] => Доставка почтой по России (при наложенном платеже почта взимает +5% от стоимости), 8-28 дней
[amount] => 399.00000
[weight] => 1
[data] =>
)
)
)
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question