How to change the sort order for shipping in admin?
-
02-10-2020 - |
Solution
I think this is the easiest whey. You have to copy this two files to your Theme in the adminhtml Scope
sales/order/shipment/create/tracking.phtml
sales/order/invoice/create/tracking.phtml
It's important to use the exact same folder and filename.
replace in both files this 5 lines (you will find this code at Line number 93)
<select name="tracking[__index__][carrier_code]" id="trackingC__index__" class="select carrier" style="width:110px;" disabled="disabled">
<?php foreach ($this->getCarriers() as $_code=>$_name): ?>
<option value="<?php echo $_code ?>"><?php echo $this->escapeHtml($_name) ?></option>
<?php endforeach; ?>
</select>
with this 5 Lines:
<select name="tracking[__index__][carrier_code]" id="trackingC__index__" class="select carrier" style="width:110px;" disabled="disabled">
<?php foreach ($this->getCarriers() as $_code=>$_name): ?>
<option <?php if ($_code=="ups"): ?>selected<?php endif; ?> value="<?php echo $_code ?>"><?php echo $this->escapeHtml($_name) ?></option>
<?php endforeach; ?>
</select>
The difference is in Line 3. There is a condition that checks if the option is ups
and sets the selected
attribute.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange