Magento 2 overriding core js file not working The Next CEO of Stack OverflowChanging the PayPal logo on the Checkout pageMagento 2: Add CMS page link in checkout pageOverriding core layout XML located in “base” not in “frontend”Magento 2: Logged-in customer can't place order with new shipping methodIs it possible to remove blocks on local environement?Override Admin theme template fileMagento 2.2.5 Mini cart not showing items or subtotalChange Magento 2 Paypal Logo on Checkout Step 2Magento 2.2. mobile specific logoGetting Items in Cart
Explicit solution of a Hamiltonian system
What makes a siege story/plot interesting?
How to make a variable always equal to the result of some calculations?
Text adventure game code
Grabbing quick drinks
Why does GHC infer a monomorphic type here, even with MonomorphismRestriction disabled?
Whats the best way to handle refactoring a big file?
How to be diplomatic in refusing to write code that breaches the privacy of our users
How do scammers retract money, while you can’t?
How to use tikz in fbox?
Can the Reverse Gravity spell affect the Meteor Swarm spell?
How to write papers efficiently when English isn't my first language?
Why do remote companies require working in the US?
Trouble understanding the speech of overseas colleagues
Where to find order of arguments for default functions
Anatomically Correct Strange Women In Ponds Distributing Swords
I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin
What is the difference between "behavior" and "behaviour"?
How can I open an app using Terminal?
How to start emacs in "nothing" mode (`fundamental-mode`)
How do spells that require an ability check vs. the caster's spell save DC work?
Why Were Madagascar and New Zealand Discovered So Late?
Too much space between section and text in a twocolumn document
How do we know the LHC results are robust?
Magento 2 overriding core js file not working
The Next CEO of Stack OverflowChanging the PayPal logo on the Checkout pageMagento 2: Add CMS page link in checkout pageOverriding core layout XML located in “base” not in “frontend”Magento 2: Logged-in customer can't place order with new shipping methodIs it possible to remove blocks on local environement?Override Admin theme template fileMagento 2.2.5 Mini cart not showing items or subtotalChange Magento 2 Paypal Logo on Checkout Step 2Magento 2.2. mobile specific logoGetting Items in Cart
I have a core js file that I want to override, but everything I have tried has failed, including essentially copying the method used by another core file being overridden that does work. Here is what I have in my requirejs.config.js so far:
var config =
map:
"*":
'Magento_Checkout/js/view/minicart':'js/view/minicart', //This one is overriden properly
'Magento_Checkout/js/action/place-order':'js/action/place-order' //This one won't override
;
Here are the paths to both files that won't override:
core file: vendor/magento/module-checkout/view/frontend/web/js/action/place-order.js
override file: app/design/frontend/MyNamespace/mymodule/Magento_Checkout/web/js/action/place-order.js
And for reference, here are the paths to the one that IS being overridden:
core file: vendor/magento/module-checkout/view/frontend/web/js/view/minicart.js
override file:
app/design/frontend/MyNamespace/mymodule/Magento_Checkout/web/js/view/minicart.js
I am using Magento 2.2.6 as well.
I have cleared the cache multiple times and because I am in a dev environment, I don't need to deploy static content, but I tried it anyway, still didn't work. I can't figure out why one would override and the other doesn't.
Any help is appreciated.
magento2.2
add a comment |
I have a core js file that I want to override, but everything I have tried has failed, including essentially copying the method used by another core file being overridden that does work. Here is what I have in my requirejs.config.js so far:
var config =
map:
"*":
'Magento_Checkout/js/view/minicart':'js/view/minicart', //This one is overriden properly
'Magento_Checkout/js/action/place-order':'js/action/place-order' //This one won't override
;
Here are the paths to both files that won't override:
core file: vendor/magento/module-checkout/view/frontend/web/js/action/place-order.js
override file: app/design/frontend/MyNamespace/mymodule/Magento_Checkout/web/js/action/place-order.js
And for reference, here are the paths to the one that IS being overridden:
core file: vendor/magento/module-checkout/view/frontend/web/js/view/minicart.js
override file:
app/design/frontend/MyNamespace/mymodule/Magento_Checkout/web/js/view/minicart.js
I am using Magento 2.2.6 as well.
I have cleared the cache multiple times and because I am in a dev environment, I don't need to deploy static content, but I tried it anyway, still didn't work. I can't figure out why one would override and the other doesn't.
Any help is appreciated.
magento2.2
add a comment |
I have a core js file that I want to override, but everything I have tried has failed, including essentially copying the method used by another core file being overridden that does work. Here is what I have in my requirejs.config.js so far:
var config =
map:
"*":
'Magento_Checkout/js/view/minicart':'js/view/minicart', //This one is overriden properly
'Magento_Checkout/js/action/place-order':'js/action/place-order' //This one won't override
;
Here are the paths to both files that won't override:
core file: vendor/magento/module-checkout/view/frontend/web/js/action/place-order.js
override file: app/design/frontend/MyNamespace/mymodule/Magento_Checkout/web/js/action/place-order.js
And for reference, here are the paths to the one that IS being overridden:
core file: vendor/magento/module-checkout/view/frontend/web/js/view/minicart.js
override file:
app/design/frontend/MyNamespace/mymodule/Magento_Checkout/web/js/view/minicart.js
I am using Magento 2.2.6 as well.
I have cleared the cache multiple times and because I am in a dev environment, I don't need to deploy static content, but I tried it anyway, still didn't work. I can't figure out why one would override and the other doesn't.
Any help is appreciated.
magento2.2
I have a core js file that I want to override, but everything I have tried has failed, including essentially copying the method used by another core file being overridden that does work. Here is what I have in my requirejs.config.js so far:
var config =
map:
"*":
'Magento_Checkout/js/view/minicart':'js/view/minicart', //This one is overriden properly
'Magento_Checkout/js/action/place-order':'js/action/place-order' //This one won't override
;
Here are the paths to both files that won't override:
core file: vendor/magento/module-checkout/view/frontend/web/js/action/place-order.js
override file: app/design/frontend/MyNamespace/mymodule/Magento_Checkout/web/js/action/place-order.js
And for reference, here are the paths to the one that IS being overridden:
core file: vendor/magento/module-checkout/view/frontend/web/js/view/minicart.js
override file:
app/design/frontend/MyNamespace/mymodule/Magento_Checkout/web/js/view/minicart.js
I am using Magento 2.2.6 as well.
I have cleared the cache multiple times and because I am in a dev environment, I don't need to deploy static content, but I tried it anyway, still didn't work. I can't figure out why one would override and the other doesn't.
Any help is appreciated.
magento2.2
magento2.2
asked 14 mins ago
Eric BrownEric Brown
1456
1456
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
);
);
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%2f267886%2fmagento-2-overriding-core-js-file-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
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%2f267886%2fmagento-2-overriding-core-js-file-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