Change Shipping Method Name programmaticallyCan'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 missingMagento 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 2update shipping address for shipping method changeShipping rate calculation in Table rate Shipping method Magento 2
What happens to matryoshka Mordenkainen's Magnificent Mansions?
Why is B♯ higher than C♭ in 31-ET?
If Earth is tilted, why is Polaris always above the same spot?
Short story with physics professor who "brings back the dead" (Asimov or Bradbury?)
How to make a newline without autoindent
Besides the up and down quark, what other quarks are present in daily matter around us?
What does this colon mean? It is not labeling, it is not ternary operator
When and why did journal article titles become descriptive, rather than creatively allusive?
Pawn Promotion Double Checks
Should one double the thirds or the fifth in chords?
What happens if I start too many background jobs?
Can fracking help reduce CO2?
Would "lab meat" be able to feed a much larger global population
Missed the connecting flight, separate tickets on same airline - who is responsible?
How did Arya get her dagger back from Sansa?
Is it cheaper to drop cargo than to land it?
Should I replace my bicycle tires if they have not been inflated in multiple years
If a prion is a protein, why is it not disassembled by the digestive system?
Pressure inside an infinite ocean?
What word means "to make something obsolete"?
What are the spoon bit of a spoon and fork bit of a fork called?
Can't remove one character of space in my environment
Would a 1/1 token with persist dying trigger on death effects a second time?
Is Cola "probably the best-known" Latin word in the world? If not, which might it be?
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 missingMagento 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 2update shipping address for shipping method changeShipping 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
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
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
64
64
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
64
64
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