Skip to main content

Questions tagged [requirejs-config.js]

Denotes questions regarding Magento 2 requirejs-config.js

Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

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 ...
Sejal Shah's user avatar
  • 2,193
0 votes
0 answers
160 views

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 ...
Yogita's user avatar
  • 784
2 votes
0 answers
72 views

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://...
Nguyễn Hoàng Tuấn's user avatar
0 votes
1 answer
1k views

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.) ...
Nits's user avatar
  • 53
1 vote
1 answer
1k views

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/...
Black's user avatar
  • 3,409
1 vote
0 answers
57 views

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 :...
Rana Zain's user avatar
  • 731
1 vote
1 answer
197 views

Is anyone know the use of this 'custom' & when we need to use that? var config = { map: { **'custom':** { '@@@': '@@@', '@@@': 'js/@@@' ...
Dhaval Vaghela's user avatar
1 vote
0 answers
40 views

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.
Muhammad Ali's user avatar
6 votes
3 answers
3k views

I tried to overwrite Magento_Catalog/js/catalog-add-to-cart.js only to extend the submitForm method as follows: app/code/Vendor/Module/view/frontend/requirejs-config.js /** * Copyright © Onectus, Inc....
Kloppo's user avatar
  • 95
0 votes
1 answer
289 views

I have two different modules for 2.3 and 2.4 which is using mixin js, I want both these modules to be compatible in one to submit in the marketplace map: { '*': { 'mymodule/...
Mohit Rane's user avatar
  • 2,000
0 votes
2 answers
911 views

I am using Magento 2.2.1. I want to add a js file to change one special span tag content with CSS class "price" on the catalog page. I was using document.getelementnByClass.. for my js ...
sina Dabbagh's user avatar
1 vote
1 answer
752 views

I'm using Magento v2.4.1 and i want to show a youtube video on my storefront home page and control it using youtube iframe API in .phtml file, how can I correctly load this youtube iframe API in my ....
Padawan's user avatar
  • 135
0 votes
1 answer
851 views

I've been overriding a few files in our child theme which seems to work perfectly, however, I don't seem to be able to override JS files. In this case, I'm trying to increase the yearRange in the ...
Michiel's user avatar
0 votes
4 answers
788 views

You can use jquery in phtml like this: require([ 'jquery' ],function($) { $(document).ready(function() { /* Your logic */ }); }); But how does the require know where to find ...
Black's user avatar
  • 3,409
1 vote
1 answer
320 views

I need to make a slider for related-products. In order to override the template copied: app/design/frontend/{Vendor Theme}/{Theme name}/Magento_Catalog/templates/product/list/items.phtml. there is a ...
David's user avatar
  • 21
0 votes
1 answer
694 views

I updated my magento from 2.1 to 2.4 . My admin panel keeps on loading since long. Below is error i see in console. Failed to load resource: the server responded with a status of 404 (Not Found) ...
user1799722's user avatar
0 votes
2 answers
354 views

I'm trying to load highcharts in a custom admin form, but it comes out as undefined in my module. My requirejs-config.js var config = { paths: { 'highcharts': 'http://code.highcharts.com/...
Badong's user avatar
  • 91
3 votes
1 answer
2k views

I need to overwrite a javascript file from a custom module at: vendor\amasty\module-single-step-checkout\view\frontend\web\js\model\one-step-layout.js because I need to replace a code line in it to ...
Black's user avatar
  • 3,409
0 votes
1 answer
2k views

I need to change the value of the maxinput field in the knockoutjs template vendor\magento\module-ui\view\base\web\templates\form\element\input.html so I have to replace the template with my own ...
Black's user avatar
  • 3,409
1 vote
0 answers
188 views

I want to create a mixin for js/modal/confirm.js but that widget returns some javascript to make it possible to create an instance of the widget instead of the widget itself. So it returns this // ...
Quisse's user avatar
  • 878
0 votes
1 answer
69 views

I have added a custom js file in my child theme and added the link in the default_head_blocks.xml. I am getting errors. <link src="js/custom.js"/> <!-- Add external resources --...
Kajal Kaushik's user avatar
0 votes
2 answers
209 views

I'm trying to include Firebase in my website, so I decided to include the dependencies through requirejs. Thing is requirejs can't find my files for some reason. What I first tried was to load the ...
Badong's user avatar
  • 91
0 votes
1 answer
493 views

What is the simplest way to add external js script like: https://sandbox-geowidget.easypack24.net/js/sdk-for-javascript.js on my page? I've created block which i render on my product page. But i get ...
SebastianT's user avatar
0 votes
1 answer
286 views

I wonder why Network tab in Browser Developers Tool Panel doesn't show requirejs-config.js at the top along with mixins.js, require.js. I am using a custom third party theme. When using Magento Luma ...
CodeForGood's user avatar
0 votes
0 answers
551 views

I want to get attribute value which is date and wants to pass it into JS file, I have my JS files linked up properly, basically I am displaying timer in product detail page and I want to display timer ...
Jaymin's user avatar
  • 155