Change Shipping Method Name programmaticallyCan't override Sales Shipping model fileoverride USPS shipping...
How exactly does Hawking radiation decrease the mass of black holes?
Does Gita support doctrine of eternal cycle of birth and death for evil people?
Is it idiomatic to construct against `this`?
How can the Zone of Truth spell be defeated without the caster knowing?
Why was Germany not as successful as other Europeans in establishing overseas colonies?
What are the potential pitfalls when using metals as a currency?
US visa is under administrative processing, I need the passport back ASAP
A Note on N!
How to make a pipeline wait for end-of-file or stop after an error?
Is there a way to get a compiler for the original B programming language?
What does the "ep" capability mean?
How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?
How does a program know if stdout is connected to a terminal or a pipe?
what is the sudo password for a --disabled-password user
Why do games have consumables?
Why was the Spitfire's elliptical wing almost uncopied by other aircraft of World War 2?
Symbolic Multivariate Distribution
What is Niska's accent?
How much cash can I safely carry into the USA and avoid civil forfeiture?
Apply MapThread to all but one variable
Fizzy, soft, pop and still drinks
How come there are so many candidates for the 2020 Democratic party presidential nomination?
Why does nature favour the Laplacian?
How did Captain America manage to do this?
Change Shipping Method Name programmatically
Can't override Sales Shipping model fileoverride USPS shipping method nameShipping price in one page checkout - order review return zeroShipping Rate Calculating for given Country,State,Postcode and PriceMagento 2 checkout Shipping Prices missingCheckout Form - How to wrap multiple elements in a class - Magento 2Magento 2.2.0 - checkout_index_index.xml shippingAdditional not workingChange Magento Shipping Method from 'Custom' to Courier's NameChange price before rendering payment gatway in magento 2Shipping rate calculation in Table rate Shipping method Magento 2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
i want to change the Shipping Method Name programmatically in some cases.

(This store is in german)
So I want to change "Versand oder Abholung" to another different text depending on the case.
How can I manipulate this text?
I have found the .html file which contains this div. (Maybe this will help?)
appdesignfrontendMyStoreMyStoreThemeMagento_Checkoutwebshipping.html
<form class="form methods-shipping" id="co-shipping-method-form" data-bind="submit: setShippingInformation" novalidate="novalidate">
<div id="checkout-shipping-method-load">
<table class="table-checkout-shipping-method">
<thead>
<tr class="row">
<th class="col col-method" data-bind="i18n: 'Select Method'"></th>
<th class="col col-price" data-bind="i18n: 'Price'"></th>
<th class="col col-method" data-bind="i18n: 'Method Title'"></th>
<th class="col col-carrier" data-bind="i18n: 'Carrier Title'"></th>
</tr>
</thead>
<tbody>
...
...
...
<td class="col col-method" data-bind="text: method.method_title, attr: {'id': 'label_method_' + method.method_code + '_' + method.carrier_code}"></td>
Any ideas? ;)
magento2 shipping shipping-methods programmatically
bumped to the homepage by Community♦ 18 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
i want to change the Shipping Method Name programmatically in some cases.

(This store is in german)
So I want to change "Versand oder Abholung" to another different text depending on the case.
How can I manipulate this text?
I have found the .html file which contains this div. (Maybe this will help?)
appdesignfrontendMyStoreMyStoreThemeMagento_Checkoutwebshipping.html
<form class="form methods-shipping" id="co-shipping-method-form" data-bind="submit: setShippingInformation" novalidate="novalidate">
<div id="checkout-shipping-method-load">
<table class="table-checkout-shipping-method">
<thead>
<tr class="row">
<th class="col col-method" data-bind="i18n: 'Select Method'"></th>
<th class="col col-price" data-bind="i18n: 'Price'"></th>
<th class="col col-method" data-bind="i18n: 'Method Title'"></th>
<th class="col col-carrier" data-bind="i18n: 'Carrier Title'"></th>
</tr>
</thead>
<tbody>
...
...
...
<td class="col col-method" data-bind="text: method.method_title, attr: {'id': 'label_method_' + method.method_code + '_' + method.carrier_code}"></td>
Any ideas? ;)
magento2 shipping shipping-methods programmatically
bumped to the homepage by Community♦ 18 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
i want to change the Shipping Method Name programmatically in some cases.

(This store is in german)
So I want to change "Versand oder Abholung" to another different text depending on the case.
How can I manipulate this text?
I have found the .html file which contains this div. (Maybe this will help?)
appdesignfrontendMyStoreMyStoreThemeMagento_Checkoutwebshipping.html
<form class="form methods-shipping" id="co-shipping-method-form" data-bind="submit: setShippingInformation" novalidate="novalidate">
<div id="checkout-shipping-method-load">
<table class="table-checkout-shipping-method">
<thead>
<tr class="row">
<th class="col col-method" data-bind="i18n: 'Select Method'"></th>
<th class="col col-price" data-bind="i18n: 'Price'"></th>
<th class="col col-method" data-bind="i18n: 'Method Title'"></th>
<th class="col col-carrier" data-bind="i18n: 'Carrier Title'"></th>
</tr>
</thead>
<tbody>
...
...
...
<td class="col col-method" data-bind="text: method.method_title, attr: {'id': 'label_method_' + method.method_code + '_' + method.carrier_code}"></td>
Any ideas? ;)
magento2 shipping shipping-methods programmatically
i want to change the Shipping Method Name programmatically in some cases.

(This store is in german)
So I want to change "Versand oder Abholung" to another different text depending on the case.
How can I manipulate this text?
I have found the .html file which contains this div. (Maybe this will help?)
appdesignfrontendMyStoreMyStoreThemeMagento_Checkoutwebshipping.html
<form class="form methods-shipping" id="co-shipping-method-form" data-bind="submit: setShippingInformation" novalidate="novalidate">
<div id="checkout-shipping-method-load">
<table class="table-checkout-shipping-method">
<thead>
<tr class="row">
<th class="col col-method" data-bind="i18n: 'Select Method'"></th>
<th class="col col-price" data-bind="i18n: 'Price'"></th>
<th class="col col-method" data-bind="i18n: 'Method Title'"></th>
<th class="col col-carrier" data-bind="i18n: 'Carrier Title'"></th>
</tr>
</thead>
<tbody>
...
...
...
<td class="col col-method" data-bind="text: method.method_title, attr: {'id': 'label_method_' + method.method_code + '_' + method.carrier_code}"></td>
Any ideas? ;)
magento2 shipping shipping-methods programmatically
magento2 shipping shipping-methods programmatically
asked Sep 6 '17 at 7:49
LehtisLehtis
14
14
bumped to the homepage by Community♦ 18 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 18 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Ok I have found a solution.
use MagentoQuoteModelQuoteAddressRateRequest;
class Tablerate extends MagentoOfflineShippingModelCarrierTablerate
{
public function collectRates(RateRequest $request)
{
$result = $this->_rateResultFactory->create()
$method = $this->_resultMethodFactory->create();
$method->setMethod('bestway');
$method->setMethodTitle("test1234");
$result->append($method);
return $result;
}
}
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f192137%2fchange-shipping-method-name-programmatically%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Ok I have found a solution.
use MagentoQuoteModelQuoteAddressRateRequest;
class Tablerate extends MagentoOfflineShippingModelCarrierTablerate
{
public function collectRates(RateRequest $request)
{
$result = $this->_rateResultFactory->create()
$method = $this->_resultMethodFactory->create();
$method->setMethod('bestway');
$method->setMethodTitle("test1234");
$result->append($method);
return $result;
}
}
add a comment |
Ok I have found a solution.
use MagentoQuoteModelQuoteAddressRateRequest;
class Tablerate extends MagentoOfflineShippingModelCarrierTablerate
{
public function collectRates(RateRequest $request)
{
$result = $this->_rateResultFactory->create()
$method = $this->_resultMethodFactory->create();
$method->setMethod('bestway');
$method->setMethodTitle("test1234");
$result->append($method);
return $result;
}
}
add a comment |
Ok I have found a solution.
use MagentoQuoteModelQuoteAddressRateRequest;
class Tablerate extends MagentoOfflineShippingModelCarrierTablerate
{
public function collectRates(RateRequest $request)
{
$result = $this->_rateResultFactory->create()
$method = $this->_resultMethodFactory->create();
$method->setMethod('bestway');
$method->setMethodTitle("test1234");
$result->append($method);
return $result;
}
}
Ok I have found a solution.
use MagentoQuoteModelQuoteAddressRateRequest;
class Tablerate extends MagentoOfflineShippingModelCarrierTablerate
{
public function collectRates(RateRequest $request)
{
$result = $this->_rateResultFactory->create()
$method = $this->_resultMethodFactory->create();
$method->setMethod('bestway');
$method->setMethodTitle("test1234");
$result->append($method);
return $result;
}
}
answered Sep 6 '17 at 9:59
LehtisLehtis
14
14
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f192137%2fchange-shipping-method-name-programmatically%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown