How to add active class for active step at checkout page in Magento 2?Adding classes for active progress on...
Does "legal poaching" exist?
Rationale to prefer local variables over instance variables?
Levi-Civita symbol: 3D matrix
At what level can a party fight a mimic?
Get length of the longest sequence of numbers with the same sign
What is better: yes / no radio, or simple checkbox?
Citing contemporaneous (interlaced?) preprints
Wrap all numerics in JSON with quotes
Is the withholding of funding notice allowed?
How to kill a localhost:8080
In iTunes 12 on macOS, how can I reset the skip count of a song?
Dystopian novel where telepathic humans live under a dome
Is there any relevance to Thor getting his hair cut other than comedic value?
Calculating Hyperbolic Sin faster than using a standard power series
Six real numbers so that product of any five is the sixth one
Source for Cremation Specifically Not Jewish
What type of investment is best suited for a 1-year investment on a down payment?
Real life puzzle: Unknown alphabet or shorthand
Don't know what I’m looking for regarding removable HDDs?
In Adventurer's League, is it possible to keep the Ring of Winter if you manage to acquire it in the Tomb of Annihilation adventure?
Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?
If a set is open, does that imply that it has no boundary points?
Did Amazon pay $0 in taxes last year?
Is there a math equivalent to the conditional ternary operator?
How to add active class for active step at checkout page in Magento 2?
Adding classes for active progress on one page checkoutAdd new step in multishipping checkoutOrder Review Step before Payment Step in magento one page checkoutMagento 2 - How to add Extra Checkout Step after Review & Payments Section with Place Order ButtonHow to move “Place Order” button from “Review & Payments” to custom step in Magento 2 checkout?Magento 2: Disable checkout stepMagento 2: how to move shipping-information from order summary to billing-step in checkout?Magento 2: Add new step in checkout under Reviews&PaymentsHow to move coupon code to shipping step of checkout in Magento 2?Add CSS class name to body tag for a checkout step
I want to add active class for respected checkout step like Shipping, Review and payments step in body tag.
magento2 checkout
add a comment |
I want to add active class for respected checkout step like Shipping, Review and payments step in body tag.
magento2 checkout
add a comment |
I want to add active class for respected checkout step like Shipping, Review and payments step in body tag.
magento2 checkout
I want to add active class for respected checkout step like Shipping, Review and payments step in body tag.
magento2 checkout
magento2 checkout
edited 26 mins ago
Dipesh Rangani
asked 16 hours ago
Dipesh RanganiDipesh Rangani
1,8223931
1,8223931
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Override progress-bar.js in your theme
vendor/magento/module-checkout/view/frontend/web/js/view/progress-bar.js
Search below code
isProcessed: function (item) {
return stepNavigator.isProcessed(item.code);
}
Replace
isProcessed: function (item) {
var itemCode = item.code;
if (itemCode == "shipping") {
jQuery('body').addClass(item.code);
} else {
jQuery('body').removeClass(item.code);
}
return stepNavigator.isProcessed(item.code);
}
Run CLI: php bin/magento setup:static-content:deploy -f
add a comment |
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
});
}
});
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%2f264528%2fhow-to-add-active-class-for-active-step-at-checkout-page-in-magento-2%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
Override progress-bar.js in your theme
vendor/magento/module-checkout/view/frontend/web/js/view/progress-bar.js
Search below code
isProcessed: function (item) {
return stepNavigator.isProcessed(item.code);
}
Replace
isProcessed: function (item) {
var itemCode = item.code;
if (itemCode == "shipping") {
jQuery('body').addClass(item.code);
} else {
jQuery('body').removeClass(item.code);
}
return stepNavigator.isProcessed(item.code);
}
Run CLI: php bin/magento setup:static-content:deploy -f
add a comment |
Override progress-bar.js in your theme
vendor/magento/module-checkout/view/frontend/web/js/view/progress-bar.js
Search below code
isProcessed: function (item) {
return stepNavigator.isProcessed(item.code);
}
Replace
isProcessed: function (item) {
var itemCode = item.code;
if (itemCode == "shipping") {
jQuery('body').addClass(item.code);
} else {
jQuery('body').removeClass(item.code);
}
return stepNavigator.isProcessed(item.code);
}
Run CLI: php bin/magento setup:static-content:deploy -f
add a comment |
Override progress-bar.js in your theme
vendor/magento/module-checkout/view/frontend/web/js/view/progress-bar.js
Search below code
isProcessed: function (item) {
return stepNavigator.isProcessed(item.code);
}
Replace
isProcessed: function (item) {
var itemCode = item.code;
if (itemCode == "shipping") {
jQuery('body').addClass(item.code);
} else {
jQuery('body').removeClass(item.code);
}
return stepNavigator.isProcessed(item.code);
}
Run CLI: php bin/magento setup:static-content:deploy -f
Override progress-bar.js in your theme
vendor/magento/module-checkout/view/frontend/web/js/view/progress-bar.js
Search below code
isProcessed: function (item) {
return stepNavigator.isProcessed(item.code);
}
Replace
isProcessed: function (item) {
var itemCode = item.code;
if (itemCode == "shipping") {
jQuery('body').addClass(item.code);
} else {
jQuery('body').removeClass(item.code);
}
return stepNavigator.isProcessed(item.code);
}
Run CLI: php bin/magento setup:static-content:deploy -f
answered 16 hours ago
Frontend DevFrontend Dev
33610
33610
add a comment |
add a comment |
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%2f264528%2fhow-to-add-active-class-for-active-step-at-checkout-page-in-magento-2%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