Skip to main content
added 384 characters in body
Source Link
gx2g
  • 273
  • 2
  • 15

I would like to change the shipping method title from "Priority Mail 1-Day" to "Priority Mail"

how do I target this cleanly?

 <td class="col col-method" data-bind="text: method.method_title, attr: {'id': 'label_method_' + method.method_code + '_' + method.carrier_code}"></td>

 <td class="col col-carrier" data-bind="text: method.carrier_title, attr: {'id': 'label_carrier_' + method.method_code + '_' + method.carrier_code}"></td>
</tr>

This is Magento 2 and this data is displayed after a click event on a radio button. I'm thinking I might be able to do this a dirty way and use javascript to overwrite the string value.

$(document).ready(function(){
    $('#formA input[type=radio]').click(function(){
        alert(this.value);
    });
});

But I'm not sure that is the best approach.

I would like to change the shipping method title from "Priority Mail 1-Day" to "Priority Mail"

how do I target this cleanly?

 <td class="col col-method" data-bind="text: method.method_title, attr: {'id': 'label_method_' + method.method_code + '_' + method.carrier_code}"></td>

 <td class="col col-carrier" data-bind="text: method.carrier_title, attr: {'id': 'label_carrier_' + method.method_code + '_' + method.carrier_code}"></td>
</tr>

I would like to change the shipping method title from "Priority Mail 1-Day" to "Priority Mail"

how do I target this cleanly?

 <td class="col col-method" data-bind="text: method.method_title, attr: {'id': 'label_method_' + method.method_code + '_' + method.carrier_code}"></td>

 <td class="col col-carrier" data-bind="text: method.carrier_title, attr: {'id': 'label_carrier_' + method.method_code + '_' + method.carrier_code}"></td>
</tr>

This is Magento 2 and this data is displayed after a click event on a radio button. I'm thinking I might be able to do this a dirty way and use javascript to overwrite the string value.

$(document).ready(function(){
    $('#formA input[type=radio]').click(function(){
        alert(this.value);
    });
});

But I'm not sure that is the best approach.

Source Link
gx2g
  • 273
  • 2
  • 15

Magento 2.1.7 Change Shipping Method Title method.method_title USPS Pirority Mail Day 1

I would like to change the shipping method title from "Priority Mail 1-Day" to "Priority Mail"

how do I target this cleanly?

 <td class="col col-method" data-bind="text: method.method_title, attr: {'id': 'label_method_' + method.method_code + '_' + method.carrier_code}"></td>

 <td class="col col-carrier" data-bind="text: method.carrier_title, attr: {'id': 'label_carrier_' + method.method_code + '_' + method.carrier_code}"></td>
</tr>