How to override both shipping.html and shipping.js file in custom module magento 2Extending / Overriding JS in Magento 2Extending / Overriding JS in Magento 2How to extend js class/method of checkout model class in magento 2How to use Custom Module Js to RequireJSOverride Magento/Checkout/view/frontend/web/js/view/shipping.js in custom theme not workingOverride Magento 2 JS file via requirejs-config.js not workingMagento 2 - How to override checkout-loader.jsOverriding .html file in Magento 2magento 2 How to override module-configurable-product configurable.js fileMagento 2 override admin product-gallery.js file in custom moduleOverriding shipping.html file in custom module
Zeros of the Hadamard product of holomorphic functions
Using "subway" as name for London Underground?
What to do when surprise and a high initiative roll conflict with the narrative?
Arriving at the same result with the opposite hypotheses
Soft question: Examples where lack of mathematical rigour cause security breaches?
Non-disclosure agreement in a small business
Pre-1972 sci-fi short story or novel: alien(?) tunnel where people try new moves and get destroyed if they're not the correct ones
Importance of Building Credit Score?
Check if three arrays contains the same element
How does an ordinary object become radioactive?
How to draw a Technology Radar?
How to trick the reader into thinking they're following a redshirt instead of the protagonist?
Applying Graph Theory to Linear Algebra (not the other way around)
What speaks against investing in precious metals?
How to use memset in c++?
Are there any important biographies of nobodies?
Is an entry level DSLR going to shoot nice portrait pictures?
How come the nude protesters were not arrested?
Colloquialism for “see you later”
How to handle self harm scars on the arm in work environment?
Thread Pool C++ Implementation
Giant Steps - Coltrane and Slonimsky
Why would future John risk sending back a T-800 to save his younger self?
Why can't I use =default for default ctors with a member initializer list
How to override both shipping.html and shipping.js file in custom module magento 2
Extending / Overriding JS in Magento 2Extending / Overriding JS in Magento 2How to extend js class/method of checkout model class in magento 2How to use Custom Module Js to RequireJSOverride Magento/Checkout/view/frontend/web/js/view/shipping.js in custom theme not workingOverride Magento 2 JS file via requirejs-config.js not workingMagento 2 - How to override checkout-loader.jsOverriding .html file in Magento 2magento 2 How to override module-configurable-product configurable.js fileMagento 2 override admin product-gallery.js file in custom moduleOverriding shipping.html file in custom module
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
override both shipping.html and shipping.js
I am trying to override shipping.js file in magento 2 but can not working.
requirejs-config.js
var config =
paths:
'Magento_Checkout/template/shipping': 'VendorName_Namespace/template/shipping',
'Magento_Checkout/js/shipping': 'VendorName_Namespace/js/shipping'
;
shipping magento2.3 knockoutjs requirejs
|
show 3 more comments
override both shipping.html and shipping.js
I am trying to override shipping.js file in magento 2 but can not working.
requirejs-config.js
var config =
paths:
'Magento_Checkout/template/shipping': 'VendorName_Namespace/template/shipping',
'Magento_Checkout/js/shipping': 'VendorName_Namespace/js/shipping'
;
shipping magento2.3 knockoutjs requirejs
Location of requirejs-config.js file ?
– Savan Patel
May 22 at 9:49
You can check this link, it can help magento.stackexchange.com/questions/60276/…
– surbhi agr
May 22 at 9:50
where you can override shipping.js ? in module or theme?
– Savan Patel
May 22 at 9:53
@SavanPatel I want to override shipping.js file in my custom module. location is VendorName/Namespace/view/frontend/requirejs-config.js
– Pratik ojha
May 22 at 10:09
@Pratikojha Try to do Below Answer
– Savan Patel
May 22 at 10:33
|
show 3 more comments
override both shipping.html and shipping.js
I am trying to override shipping.js file in magento 2 but can not working.
requirejs-config.js
var config =
paths:
'Magento_Checkout/template/shipping': 'VendorName_Namespace/template/shipping',
'Magento_Checkout/js/shipping': 'VendorName_Namespace/js/shipping'
;
shipping magento2.3 knockoutjs requirejs
override both shipping.html and shipping.js
I am trying to override shipping.js file in magento 2 but can not working.
requirejs-config.js
var config =
paths:
'Magento_Checkout/template/shipping': 'VendorName_Namespace/template/shipping',
'Magento_Checkout/js/shipping': 'VendorName_Namespace/js/shipping'
;
shipping magento2.3 knockoutjs requirejs
shipping magento2.3 knockoutjs requirejs
edited May 22 at 10:17
Savan Patel
632318
632318
asked May 22 at 9:42
Pratik ojhaPratik ojha
414
414
Location of requirejs-config.js file ?
– Savan Patel
May 22 at 9:49
You can check this link, it can help magento.stackexchange.com/questions/60276/…
– surbhi agr
May 22 at 9:50
where you can override shipping.js ? in module or theme?
– Savan Patel
May 22 at 9:53
@SavanPatel I want to override shipping.js file in my custom module. location is VendorName/Namespace/view/frontend/requirejs-config.js
– Pratik ojha
May 22 at 10:09
@Pratikojha Try to do Below Answer
– Savan Patel
May 22 at 10:33
|
show 3 more comments
Location of requirejs-config.js file ?
– Savan Patel
May 22 at 9:49
You can check this link, it can help magento.stackexchange.com/questions/60276/…
– surbhi agr
May 22 at 9:50
where you can override shipping.js ? in module or theme?
– Savan Patel
May 22 at 9:53
@SavanPatel I want to override shipping.js file in my custom module. location is VendorName/Namespace/view/frontend/requirejs-config.js
– Pratik ojha
May 22 at 10:09
@Pratikojha Try to do Below Answer
– Savan Patel
May 22 at 10:33
Location of requirejs-config.js file ?
– Savan Patel
May 22 at 9:49
Location of requirejs-config.js file ?
– Savan Patel
May 22 at 9:49
You can check this link, it can help magento.stackexchange.com/questions/60276/…
– surbhi agr
May 22 at 9:50
You can check this link, it can help magento.stackexchange.com/questions/60276/…
– surbhi agr
May 22 at 9:50
where you can override shipping.js ? in module or theme?
– Savan Patel
May 22 at 9:53
where you can override shipping.js ? in module or theme?
– Savan Patel
May 22 at 9:53
@SavanPatel I want to override shipping.js file in my custom module. location is VendorName/Namespace/view/frontend/requirejs-config.js
– Pratik ojha
May 22 at 10:09
@SavanPatel I want to override shipping.js file in my custom module. location is VendorName/Namespace/view/frontend/requirejs-config.js
– Pratik ojha
May 22 at 10:09
@Pratikojha Try to do Below Answer
– Savan Patel
May 22 at 10:33
@Pratikojha Try to do Below Answer
– Savan Patel
May 22 at 10:33
|
show 3 more comments
4 Answers
4
active
oldest
votes
Try to use mixin:
app/code/SR/Checkout/view/frontend/requirejs-config.js
var config =
config:
mixins:
'Magento_Checkout/js/view/shipping':
'SR_Checkout/js/mixin/shipping-mixin': true
;
app/code/SR/Checkout/view/frontend/web/js/mixin/shipping-mixin.js
define(
[
'jquery',
'ko'
], function (
$,
ko
)
'use strict';
return function (target)
return target.extend(
/**
* Show address form popup
*/
showFormPopUp: function ()
this._super();
);
);
Clear browser js cache, remove pub/static if your magento mode is not developer. Clear cache.
add a comment |
I got the solution of my question.
How to override both shipping.html and shipping.js.
requirejs-config.js
var config =
paths:
'Magento_Checkout/template/shipping': 'VendorName_Namespace/template/shipping',
'Magento_Checkout/js/view/shipping': 'VendorName_Namespace/js/view/shipping'
;
add a comment |
Try following code:
- app/code/[VendorName]/[ModuleName]/view/frontend/requirejs-config.js
var config = {
paths:
'Magento_Checkout/template/shipping': '[VendorName]_[ModuleName]/template/shipping',
'Magento_Checkout/js/view/shipping':
'[VendorName]_[ModuleName]/js/view/shipping'
;
2.app/code/[VendorName]/[ModuleName]/view/frontend/web/js/view/shipping.js
3.app/code/[VendorName]/[ModuleName]/view/frontend/web/template/shipping.html
After run the upgrade and static-conent:deploy
in this how to override shipping.js file
– Pratik ojha
May 22 at 10:33
add a comment |
You can override using map and the shipping js is inside js/view
directory:
var config =
map:
'*':
"Magento_Checkout/template/shipping.html": "VendorName_Namespace/template/shipping.html",
"Magento_Checkout/js/view/shipping": "VendorName_Namespace/js/shipping"
;
i want to override both html and js will it work?
– Pratik ojha
May 22 at 10:11
Yes, The same way you can override html.
– Jignesh Khunt
May 22 at 10:13
I have updated code for you.
– Jignesh Khunt
May 22 at 10:17
not working bro
– Pratik ojha
May 22 at 10:20
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%2f275627%2fhow-to-override-both-shipping-html-and-shipping-js-file-in-custom-module-magento%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try to use mixin:
app/code/SR/Checkout/view/frontend/requirejs-config.js
var config =
config:
mixins:
'Magento_Checkout/js/view/shipping':
'SR_Checkout/js/mixin/shipping-mixin': true
;
app/code/SR/Checkout/view/frontend/web/js/mixin/shipping-mixin.js
define(
[
'jquery',
'ko'
], function (
$,
ko
)
'use strict';
return function (target)
return target.extend(
/**
* Show address form popup
*/
showFormPopUp: function ()
this._super();
);
);
Clear browser js cache, remove pub/static if your magento mode is not developer. Clear cache.
add a comment |
Try to use mixin:
app/code/SR/Checkout/view/frontend/requirejs-config.js
var config =
config:
mixins:
'Magento_Checkout/js/view/shipping':
'SR_Checkout/js/mixin/shipping-mixin': true
;
app/code/SR/Checkout/view/frontend/web/js/mixin/shipping-mixin.js
define(
[
'jquery',
'ko'
], function (
$,
ko
)
'use strict';
return function (target)
return target.extend(
/**
* Show address form popup
*/
showFormPopUp: function ()
this._super();
);
);
Clear browser js cache, remove pub/static if your magento mode is not developer. Clear cache.
add a comment |
Try to use mixin:
app/code/SR/Checkout/view/frontend/requirejs-config.js
var config =
config:
mixins:
'Magento_Checkout/js/view/shipping':
'SR_Checkout/js/mixin/shipping-mixin': true
;
app/code/SR/Checkout/view/frontend/web/js/mixin/shipping-mixin.js
define(
[
'jquery',
'ko'
], function (
$,
ko
)
'use strict';
return function (target)
return target.extend(
/**
* Show address form popup
*/
showFormPopUp: function ()
this._super();
);
);
Clear browser js cache, remove pub/static if your magento mode is not developer. Clear cache.
Try to use mixin:
app/code/SR/Checkout/view/frontend/requirejs-config.js
var config =
config:
mixins:
'Magento_Checkout/js/view/shipping':
'SR_Checkout/js/mixin/shipping-mixin': true
;
app/code/SR/Checkout/view/frontend/web/js/mixin/shipping-mixin.js
define(
[
'jquery',
'ko'
], function (
$,
ko
)
'use strict';
return function (target)
return target.extend(
/**
* Show address form popup
*/
showFormPopUp: function ()
this._super();
);
);
Clear browser js cache, remove pub/static if your magento mode is not developer. Clear cache.
answered May 22 at 10:12
Sohel RanaSohel Rana
24.3k34664
24.3k34664
add a comment |
add a comment |
I got the solution of my question.
How to override both shipping.html and shipping.js.
requirejs-config.js
var config =
paths:
'Magento_Checkout/template/shipping': 'VendorName_Namespace/template/shipping',
'Magento_Checkout/js/view/shipping': 'VendorName_Namespace/js/view/shipping'
;
add a comment |
I got the solution of my question.
How to override both shipping.html and shipping.js.
requirejs-config.js
var config =
paths:
'Magento_Checkout/template/shipping': 'VendorName_Namespace/template/shipping',
'Magento_Checkout/js/view/shipping': 'VendorName_Namespace/js/view/shipping'
;
add a comment |
I got the solution of my question.
How to override both shipping.html and shipping.js.
requirejs-config.js
var config =
paths:
'Magento_Checkout/template/shipping': 'VendorName_Namespace/template/shipping',
'Magento_Checkout/js/view/shipping': 'VendorName_Namespace/js/view/shipping'
;
I got the solution of my question.
How to override both shipping.html and shipping.js.
requirejs-config.js
var config =
paths:
'Magento_Checkout/template/shipping': 'VendorName_Namespace/template/shipping',
'Magento_Checkout/js/view/shipping': 'VendorName_Namespace/js/view/shipping'
;
answered May 22 at 10:52
Pratik ojhaPratik ojha
414
414
add a comment |
add a comment |
Try following code:
- app/code/[VendorName]/[ModuleName]/view/frontend/requirejs-config.js
var config = {
paths:
'Magento_Checkout/template/shipping': '[VendorName]_[ModuleName]/template/shipping',
'Magento_Checkout/js/view/shipping':
'[VendorName]_[ModuleName]/js/view/shipping'
;
2.app/code/[VendorName]/[ModuleName]/view/frontend/web/js/view/shipping.js
3.app/code/[VendorName]/[ModuleName]/view/frontend/web/template/shipping.html
After run the upgrade and static-conent:deploy
in this how to override shipping.js file
– Pratik ojha
May 22 at 10:33
add a comment |
Try following code:
- app/code/[VendorName]/[ModuleName]/view/frontend/requirejs-config.js
var config = {
paths:
'Magento_Checkout/template/shipping': '[VendorName]_[ModuleName]/template/shipping',
'Magento_Checkout/js/view/shipping':
'[VendorName]_[ModuleName]/js/view/shipping'
;
2.app/code/[VendorName]/[ModuleName]/view/frontend/web/js/view/shipping.js
3.app/code/[VendorName]/[ModuleName]/view/frontend/web/template/shipping.html
After run the upgrade and static-conent:deploy
in this how to override shipping.js file
– Pratik ojha
May 22 at 10:33
add a comment |
Try following code:
- app/code/[VendorName]/[ModuleName]/view/frontend/requirejs-config.js
var config = {
paths:
'Magento_Checkout/template/shipping': '[VendorName]_[ModuleName]/template/shipping',
'Magento_Checkout/js/view/shipping':
'[VendorName]_[ModuleName]/js/view/shipping'
;
2.app/code/[VendorName]/[ModuleName]/view/frontend/web/js/view/shipping.js
3.app/code/[VendorName]/[ModuleName]/view/frontend/web/template/shipping.html
After run the upgrade and static-conent:deploy
Try following code:
- app/code/[VendorName]/[ModuleName]/view/frontend/requirejs-config.js
var config = {
paths:
'Magento_Checkout/template/shipping': '[VendorName]_[ModuleName]/template/shipping',
'Magento_Checkout/js/view/shipping':
'[VendorName]_[ModuleName]/js/view/shipping'
;
2.app/code/[VendorName]/[ModuleName]/view/frontend/web/js/view/shipping.js
3.app/code/[VendorName]/[ModuleName]/view/frontend/web/template/shipping.html
After run the upgrade and static-conent:deploy
edited May 22 at 11:30
answered May 22 at 10:30
Savan PatelSavan Patel
632318
632318
in this how to override shipping.js file
– Pratik ojha
May 22 at 10:33
add a comment |
in this how to override shipping.js file
– Pratik ojha
May 22 at 10:33
in this how to override shipping.js file
– Pratik ojha
May 22 at 10:33
in this how to override shipping.js file
– Pratik ojha
May 22 at 10:33
add a comment |
You can override using map and the shipping js is inside js/view
directory:
var config =
map:
'*':
"Magento_Checkout/template/shipping.html": "VendorName_Namespace/template/shipping.html",
"Magento_Checkout/js/view/shipping": "VendorName_Namespace/js/shipping"
;
i want to override both html and js will it work?
– Pratik ojha
May 22 at 10:11
Yes, The same way you can override html.
– Jignesh Khunt
May 22 at 10:13
I have updated code for you.
– Jignesh Khunt
May 22 at 10:17
not working bro
– Pratik ojha
May 22 at 10:20
add a comment |
You can override using map and the shipping js is inside js/view
directory:
var config =
map:
'*':
"Magento_Checkout/template/shipping.html": "VendorName_Namespace/template/shipping.html",
"Magento_Checkout/js/view/shipping": "VendorName_Namespace/js/shipping"
;
i want to override both html and js will it work?
– Pratik ojha
May 22 at 10:11
Yes, The same way you can override html.
– Jignesh Khunt
May 22 at 10:13
I have updated code for you.
– Jignesh Khunt
May 22 at 10:17
not working bro
– Pratik ojha
May 22 at 10:20
add a comment |
You can override using map and the shipping js is inside js/view
directory:
var config =
map:
'*':
"Magento_Checkout/template/shipping.html": "VendorName_Namespace/template/shipping.html",
"Magento_Checkout/js/view/shipping": "VendorName_Namespace/js/shipping"
;
You can override using map and the shipping js is inside js/view
directory:
var config =
map:
'*':
"Magento_Checkout/template/shipping.html": "VendorName_Namespace/template/shipping.html",
"Magento_Checkout/js/view/shipping": "VendorName_Namespace/js/shipping"
;
edited May 22 at 10:16
answered May 22 at 9:51
Jignesh KhuntJignesh Khunt
1,0971618
1,0971618
i want to override both html and js will it work?
– Pratik ojha
May 22 at 10:11
Yes, The same way you can override html.
– Jignesh Khunt
May 22 at 10:13
I have updated code for you.
– Jignesh Khunt
May 22 at 10:17
not working bro
– Pratik ojha
May 22 at 10:20
add a comment |
i want to override both html and js will it work?
– Pratik ojha
May 22 at 10:11
Yes, The same way you can override html.
– Jignesh Khunt
May 22 at 10:13
I have updated code for you.
– Jignesh Khunt
May 22 at 10:17
not working bro
– Pratik ojha
May 22 at 10:20
i want to override both html and js will it work?
– Pratik ojha
May 22 at 10:11
i want to override both html and js will it work?
– Pratik ojha
May 22 at 10:11
Yes, The same way you can override html.
– Jignesh Khunt
May 22 at 10:13
Yes, The same way you can override html.
– Jignesh Khunt
May 22 at 10:13
I have updated code for you.
– Jignesh Khunt
May 22 at 10:17
I have updated code for you.
– Jignesh Khunt
May 22 at 10:17
not working bro
– Pratik ojha
May 22 at 10:20
not working bro
– Pratik ojha
May 22 at 10:20
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%2f275627%2fhow-to-override-both-shipping-html-and-shipping-js-file-in-custom-module-magento%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
Location of requirejs-config.js file ?
– Savan Patel
May 22 at 9:49
You can check this link, it can help magento.stackexchange.com/questions/60276/…
– surbhi agr
May 22 at 9:50
where you can override shipping.js ? in module or theme?
– Savan Patel
May 22 at 9:53
@SavanPatel I want to override shipping.js file in my custom module. location is VendorName/Namespace/view/frontend/requirejs-config.js
– Pratik ojha
May 22 at 10:09
@Pratikojha Try to do Below Answer
– Savan Patel
May 22 at 10:33