Add custom block under selected shipping methode magento 2 not workingHow to show custom block on shipping method select in Magento 2Custom Shipping Method - Retrieve Shipping address in collectRatesShipping method that changes shipping address magentoMagento 2 - Add custom block to admin order create formHow to show custom block on shipping method select in Magento 2Get customer chosen shipping method with jQueryMagento 2 checkout - move Shipping methods blockM2 - Forget selected shipping methodMagento 2: Shipping Methods not reload automaticallyHow can I set a default shipping method if there is multiple and how can I add charge of it to total in Checkout?Free shipping code is not working for UPS in magento 2

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

Why do I get two different answers for this counting problem?

What typically incentivizes a professor to change jobs to a lower ranking university?

Important Resources for Dark Age Civilizations?

Alternative to sending password over mail?

Roll the carpet

How much of data wrangling is a data scientist's job?

Is it possible for a square root function,f(x), to map to a finite number of integers for all x in domain of f?

Why doesn't H₄O²⁺ exist?

What's the point of deactivating Num Lock on login screens?

Which country benefited the most from UN Security Council vetoes?

Perform and show arithmetic with LuaLaTeX

When a company launches a new product do they "come out" with a new product or do they "come up" with a new product?

Today is the Center

Horror movie about a virus at the prom; beginning and end are stylized as a cartoon

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

What does the "remote control" for a QF-4 look like?

What does it mean to describe someone as a butt steak?

What would happen to a modern skyscraper if it rains micro blackholes?

Revoked SSL certificate

How does quantile regression compare to logistic regression with the variable split at the quantile?

Maximum likelihood parameters deviate from posterior distributions

RSA: Danger of using p to create q

Can a Cauchy sequence converge for one metric while not converging for another?



Add custom block under selected shipping methode magento 2 not working


How to show custom block on shipping method select in Magento 2Custom Shipping Method - Retrieve Shipping address in collectRatesShipping method that changes shipping address magentoMagento 2 - Add custom block to admin order create formHow to show custom block on shipping method select in Magento 2Get customer chosen shipping method with jQueryMagento 2 checkout - move Shipping methods blockM2 - Forget selected shipping methodMagento 2: Shipping Methods not reload automaticallyHow can I set a default shipping method if there is multiple and how can I add charge of it to total in Checkout?Free shipping code is not working for UPS in magento 2






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am creating a magento2 module and I want to add an html block to selected shipping method:
I am using jQuery to achieve this but I will accept other workarounds all I want is to make this work.



I tried this :



https://magento.stackexchange.com/a/162967/78274



But the problem is the block is added after all shipping methods which isn't what I am looking for. However I tried to use it.



I used jQuery and managed to add my block under selected shipping method but my problem is this works only the first time I load the page when mychippingmethod is selected by default, but when I reload the page even though mychippingmethod is selected by default nothing is added.
But if I click on my shipping method my block is added.



Then I tried to switch between after and append but nothing changed I had the same problem.



What I tried so far :



jQuery("tr:contains('mychippingmethod')").append("#my-carrier-custom-block-wrapper");


I also tried



var myelement = "example";
jQuery("tr:contains('mychippingmethod')").after(myelement);


Even trying to append a simple text doesn't work.



I wouldn't say that magento2 isn't allowing me to edit the shipping block since it does work the first time and this is what's making me frustrated why would it work the first time and then stops.



I would accept a solution to uncheck all the shipping methods by default too.



EDIT :



If i append :



<tr class="row"><td>aaaaaaaaa</td></tr>


My after function doesn't work even in the first time but If i select my shippingmethode my text gets appended ! so maybe I am adding it wrong



Please help.










share|improve this question









New contributor




Nicole is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    1















    I am creating a magento2 module and I want to add an html block to selected shipping method:
    I am using jQuery to achieve this but I will accept other workarounds all I want is to make this work.



    I tried this :



    https://magento.stackexchange.com/a/162967/78274



    But the problem is the block is added after all shipping methods which isn't what I am looking for. However I tried to use it.



    I used jQuery and managed to add my block under selected shipping method but my problem is this works only the first time I load the page when mychippingmethod is selected by default, but when I reload the page even though mychippingmethod is selected by default nothing is added.
    But if I click on my shipping method my block is added.



    Then I tried to switch between after and append but nothing changed I had the same problem.



    What I tried so far :



    jQuery("tr:contains('mychippingmethod')").append("#my-carrier-custom-block-wrapper");


    I also tried



    var myelement = "example";
    jQuery("tr:contains('mychippingmethod')").after(myelement);


    Even trying to append a simple text doesn't work.



    I wouldn't say that magento2 isn't allowing me to edit the shipping block since it does work the first time and this is what's making me frustrated why would it work the first time and then stops.



    I would accept a solution to uncheck all the shipping methods by default too.



    EDIT :



    If i append :



    <tr class="row"><td>aaaaaaaaa</td></tr>


    My after function doesn't work even in the first time but If i select my shippingmethode my text gets appended ! so maybe I am adding it wrong



    Please help.










    share|improve this question









    New contributor




    Nicole is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      1












      1








      1








      I am creating a magento2 module and I want to add an html block to selected shipping method:
      I am using jQuery to achieve this but I will accept other workarounds all I want is to make this work.



      I tried this :



      https://magento.stackexchange.com/a/162967/78274



      But the problem is the block is added after all shipping methods which isn't what I am looking for. However I tried to use it.



      I used jQuery and managed to add my block under selected shipping method but my problem is this works only the first time I load the page when mychippingmethod is selected by default, but when I reload the page even though mychippingmethod is selected by default nothing is added.
      But if I click on my shipping method my block is added.



      Then I tried to switch between after and append but nothing changed I had the same problem.



      What I tried so far :



      jQuery("tr:contains('mychippingmethod')").append("#my-carrier-custom-block-wrapper");


      I also tried



      var myelement = "example";
      jQuery("tr:contains('mychippingmethod')").after(myelement);


      Even trying to append a simple text doesn't work.



      I wouldn't say that magento2 isn't allowing me to edit the shipping block since it does work the first time and this is what's making me frustrated why would it work the first time and then stops.



      I would accept a solution to uncheck all the shipping methods by default too.



      EDIT :



      If i append :



      <tr class="row"><td>aaaaaaaaa</td></tr>


      My after function doesn't work even in the first time but If i select my shippingmethode my text gets appended ! so maybe I am adding it wrong



      Please help.










      share|improve this question









      New contributor




      Nicole is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I am creating a magento2 module and I want to add an html block to selected shipping method:
      I am using jQuery to achieve this but I will accept other workarounds all I want is to make this work.



      I tried this :



      https://magento.stackexchange.com/a/162967/78274



      But the problem is the block is added after all shipping methods which isn't what I am looking for. However I tried to use it.



      I used jQuery and managed to add my block under selected shipping method but my problem is this works only the first time I load the page when mychippingmethod is selected by default, but when I reload the page even though mychippingmethod is selected by default nothing is added.
      But if I click on my shipping method my block is added.



      Then I tried to switch between after and append but nothing changed I had the same problem.



      What I tried so far :



      jQuery("tr:contains('mychippingmethod')").append("#my-carrier-custom-block-wrapper");


      I also tried



      var myelement = "example";
      jQuery("tr:contains('mychippingmethod')").after(myelement);


      Even trying to append a simple text doesn't work.



      I wouldn't say that magento2 isn't allowing me to edit the shipping block since it does work the first time and this is what's making me frustrated why would it work the first time and then stops.



      I would accept a solution to uncheck all the shipping methods by default too.



      EDIT :



      If i append :



      <tr class="row"><td>aaaaaaaaa</td></tr>


      My after function doesn't work even in the first time but If i select my shippingmethode my text gets appended ! so maybe I am adding it wrong



      Please help.







      magento2 php jquery






      share|improve this question









      New contributor




      Nicole is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Nicole is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 3 hours ago







      Nicole













      New contributor




      Nicole is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 4 hours ago









      NicoleNicole

      83




      83




      New contributor




      Nicole is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Nicole is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Nicole is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          0






          active

          oldest

          votes












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



          );






          Nicole is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268990%2fadd-custom-block-under-selected-shipping-methode-magento-2-not-working%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Nicole is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          Nicole is a new contributor. Be nice, and check out our Code of Conduct.












          Nicole is a new contributor. Be nice, and check out our Code of Conduct.











          Nicole is a new contributor. Be nice, and check out our Code of Conduct.














          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%2f268990%2fadd-custom-block-under-selected-shipping-methode-magento-2-not-working%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

          Disable / Remove link to Product Items in Cart Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How can I limit products that can be bought / added to cart?Remove item from cartHide “Add to Cart” button if specific products are already in cart“Prettifying” the custom options in cart pageCreate link in cart sidebar to view all added items After limit reachedLink products together in checkout/cartHow to Get product from cart and add it againHide action-edit on cart page if simple productRemoving Cart items - ObserverRemove wishlist items when added to cart

          Helsingin valtaus Sisällysluettelo Taustaa | Yleistä sotatoimista | Osapuolet | Taistelut Helsingin ympäristössä | Punaisten antautumissuunnitelma | Taistelujen kulku Helsingissä | Valtauksen jälkeen | Tappiot | Muistaminen | Kirjallisuutta | Lähteet | Aiheesta muualla | NavigointivalikkoTeoksen verkkoversioTeoksen verkkoversioGoogle BooksSisällissota Helsingissä päättyi tasan 95 vuotta sittenSaksalaisten ylivoima jyräsi punaisen HelsinginSuomalaiset kuvaavat sotien jälkiä kaupungeissa – katso kuvat ja tarinat tutuilta kulmiltaHelsingin valtaus 90 vuotta sittenSaksalaiset valtasivat HelsinginHyökkäys HelsinkiinHelsingin valtaus 12.–13.4. 1918Saksalaiset käyttivät ihmiskilpiä Helsingin valtauksessa 1918Teoksen verkkoversioTeoksen verkkoversioSaksalaiset hyökkäävät Etelä-SuomeenTaistelut LeppävaarassaSotilaat ja taistelutLeppävaara 1918 huhtikuussa. KapinatarinaHelsingin taistelut 1918Saksalaisten voitonparaati HelsingissäHelsingin valtausta juhlittiinSaksalaisten Helsinki vuonna 1918Helsingin taistelussa kaatuneet valkokaartilaisetHelsinkiin haudatut taisteluissa kaatuneet punaiset12.4.1918 Helsingin valtauksessa saksalaiset apujoukot vapauttavat kaupunginVapaussodan muistomerkkejä Helsingissä ja pääkaupunkiseudullaCrescendo / Vuoden 1918 Kansalaissodan uhrien muistomerkkim

          Adjektiivitarina Tarinan tekeminen | Esimerkki: ennen | Esimerkki: jälkeen | Navigointivalikko