| 1 |
<?php use MyParcelNL\Sdk\src\Model\Consignment\AbstractConsignment; |
| 2 |
|
| 3 |
if (! defined('ABSPATH')) { |
| 4 |
exit; |
| 5 |
} // Exit if accessed directly |
| 6 |
|
| 7 |
/** @noinspection PhpUnhandledExceptionInspection */ |
| 8 |
$deliveryOptions = WCPOST_Admin::getDeliveryOptionsFromOrder($order); |
| 9 |
|
| 10 |
?> |
| 11 |
<table class="wcpn__settings-table" style="width: auto"> |
| 12 |
<tr> |
| 13 |
<td> |
| 14 |
<?php _e("Shipment type", "woocommerce-postnl") ?>:<br/> <small class="calculated_weight"> |
| 15 |
<?php printf( |
| 16 |
__("Calculated weight: %s", "woocommerce-postnl"), |
| 17 |
wc_format_weight($order->get_meta(WCPOST_Admin::META_ORDER_WEIGHT)) |
| 18 |
) ?> |
| 19 |
</small> |
| 20 |
</td> |
| 21 |
<td> |
| 22 |
<?php |
| 23 |
$name = "postnl_options[{$order_id}][package_type]"; |
| 24 |
printf('<select name="%s" class="package_type">', $name); |
| 25 |
foreach ($package_types as $key => $label) { |
| 26 |
printf( |
| 27 |
'<option value="%s">%s</option>', |
| 28 |
AbstractConsignment::PACKAGE_TYPE_PACKAGE, |
| 29 |
$label |
| 30 |
); |
| 31 |
} |
| 32 |
echo '</select>'; |
| 33 |
?> |
| 34 |
</td> |
| 35 |
</tr> |
| 36 |
</table><br> |
| 37 |
<?php if (! isset($skip_save)): ?> |
| 38 |
<div class="wcpn__d--flex"> |
| 39 |
<a class="button save" data-order="<?php echo $order_id; ?>"><?php _e("Save", "woocommerce-postnl") ?> |
| 40 |
<?php WCPOST_Admin::renderSpinner() ?> |
| 41 |
</a> |
| 42 |
</div> |
| 43 |
<?php endif ?> |
| 44 |
|