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

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

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

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form