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;








2















i want to change the Shipping Method Name programmatically in some cases.
enter image description here



(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? ;)










share|improve this question




























    2















    i want to change the Shipping Method Name programmatically in some cases.
    enter image description here



    (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? ;)










    share|improve this question
























      2












      2








      2








      i want to change the Shipping Method Name programmatically in some cases.
      enter image description here



      (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? ;)










      share|improve this question














      i want to change the Shipping Method Name programmatically in some cases.
      enter image description here



      (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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 6 '17 at 7:49









      LehtisLehtis

      64




      64




















          1 Answer
          1






          active

          oldest

          votes


















          0














          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;







          share|improve this answer























            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
            );



            );













            draft saved

            draft discarded


















            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









            0














            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;







            share|improve this answer



























              0














              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;







              share|improve this answer

























                0












                0








                0







                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;







                share|improve this answer













                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;








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 6 '17 at 9:59









                LehtisLehtis

                64




                64



























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                    Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?