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;
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 3 hours ago
Nicole
New contributor
asked 4 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