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
Is it inappropriate for a student to attend their mentor's dissertation defense?
Can you really stack all of this on an Opportunity Attack?
High voltage LED indicator 40-1000 VDC without additional power supply
Could an aircraft fly or hover using only jets of compressed air?
Was any UN Security Council vote triple-vetoed?
Replacing matching entries in one column of a file by another column from a different file
How does quantile regression compare to logistic regression with the variable split at the quantile?
Is it possible to run Internet Explorer on OS X El Capitan?
Can a vampire attack twice with their claws using Multiattack?
Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)
What is a clear way to write a bar that has an extra beat?
What does "Puller Prush Person" mean?
A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?
Doing something right before you need it - expression for this?
How to determine what difficulty is right for the game?
RSA: Danger of using p to create q
What defenses are there against being summoned by the Gate spell?
"You are your self first supporter", a more proper way to say it
What typically incentivizes a professor to change jobs to a lower ranking university?
Arrow those variables!
How much RAM could one put in a typical 80386 setup?
Do I have a twin with permutated remainders?
Intersection point of 2 lines defined by 2 points each
What does it mean to describe someone as a butt steak?
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;
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
New contributor
add a comment |
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
New contributor
add a comment |
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
New contributor
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
magento2 php jquery
New contributor
New contributor
edited 5 hours ago
Nicole
New contributor
asked 6 hours ago
NicoleNicole
83
83
New contributor
New contributor
add a comment |
add a comment |
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.
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%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.
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.
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%2f268990%2fadd-custom-block-under-selected-shipping-methode-magento-2-not-working%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