Questions tagged [requirejs-config.js]
Denotes questions regarding Magento 2 requirejs-config.js
118 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
47
views
Magento 2 how to avoid loading of certain js files on checkout page via requirejs?
I want to load certain js files on all pages except checkout page.
How can I add a condition in requirejs-config.js file not to load js files when user is on checkout page?
In the code below, I want ...
0
votes
1
answer
67
views
Magento2.4.7: How to get checkout error messages?
let's assume I want to run a function when I click on place order.
I'm doing some functionality on the Place Order button click, but my functionality still works if there's an error.
Is there a class ...
0
votes
0
answers
153
views
Js files issue in production mode magento2.4.6-p3
Site is working fine in developer mode but when we put the site in production mode there are different files showing 404 in console and these seems default files of magento but the path of the file ...
0
votes
2
answers
73
views
magento 2.4.5 set checked default checkbox
We have the following module in the vendor extending html
vendor/GB/module-payment
view/frontend/requirejs-config.js
const config = {
config: {
mixins: {
'VndorPayment_Magento2/js/view/...
2
votes
0
answers
72
views
How to integrate Google Pay library into website?
I'm trying to integrate Google Pay into my Cart page. But, I always get an error, it looks like this:
Uncaught Error: Script error for "https://pay.google.com/gp/p/js/pay.js" https://...
0
votes
1
answer
191
views
Magento 2 how to update requirejs-config.js
We are using the Magento 2.3.5 version we want to update the version from 3.79.1 to 3.97.0 in requirejs-config.js
file-path - vendor/gene/module-braintree/view/base/requirejs-config.js
when we are ...
0
votes
1
answer
1k
views
Magento 2.4.5 customer-data.js not initiating in Custom theme js file
I have a function of ajax add to cart in below file and doing section reload.
below code is in app/design/frontend/MyThemeNS/Mytheme/web/js/custom.js (just mentioning sample for understanding.)
...
0
votes
1
answer
41
views
Magento 2 - How to use custom JS
Why can't I call my custom test() method?
Attempt 1
app/code/Company/Test/view/frontend/web/js/test.js
define([
'jquery',
'domReady!'
], function($) {
function test()
{
alert(&...
1
vote
1
answer
1k
views
Magento 2 - override JS from third party module from own module
I successfully overrode a JS file of a third party module from my own module named Amasty/AdvancedReviewOverrides.
First I copied the file from vendor/amasty/advanced-review/view/frontend/web/js/...
0
votes
1
answer
436
views
How can I resolve the JavaScript error after upgrade magenta from M 2.4.3 to 2.4.5 in Magento 2??
Here I upgrade Magento from 2.4.3 to 2.4.5 so getting a javascript error can anyone help me how can I resolve this error?
Can not find out what excatly issue
1
vote
0
answers
57
views
Disallow Comma Validation Rules
I am using this mixin for the custom validation rules in the below template for the first and last name
Template:
/vendor/magento/module-customer/view/frontend/templates/widget/name.phtml
require js :...
1
vote
0
answers
487
views
Magento 2 How to load Js first before the page load
I have created a custom module in which I created a popup modal in custom location.js with require js on and add this js in default.xml file.
On the first page load popup is open after the page load i ...
1
vote
1
answer
197
views
Magento 2: Use of map in RequireJs-config
Is anyone know the use of this 'custom' & when we need to use that?
var config = {
map: {
**'custom':** {
'@@@': '@@@',
'@@@': 'js/@@@'
...
0
votes
1
answer
217
views
How to add a JS library and a JS script that makes use of that library?
I'm trying to use Chroma library in Magento and so far I did the following two things:
Created a app/design/frontend/Vendor/Theme/requirejs-config.js with the following content:
var config = {
deps: ...
1
vote
0
answers
40
views
Customize frontend and backend magento2 using js without using phtml file
Just to explain in simple words.
I want to use the js file in the frontend and backend of magento2 but without using the PHTML file.Just directly usage by getting field name, or id or something.