Skip to content

javascript

Auto Added by WPeMatico

JavaScript not executed when it has Magento_Customer/js/customer-data dependencia in define

I have a JS file like this: define([ ‘jquery’, ‘underscore’, ‘matchMedia’, ‘text!ajaxcart/template/modal-slide.html’, ‘text!ajaxcart/template/modal-popup.html’, ‘Magento_Customer/js/customer-data’, ‘Magento_Catalog/product/view/validation’, ‘Magento_Ui/js/modal/modal’, ‘mage/translate’ ], function($, _, mediaCheck, _slideTpl, _popupTpl, customerData) { … } But for some reason, it is not entered into the code in function… Read More »JavaScript not executed when it has Magento_Customer/js/customer-data dependencia in define

How can i pass product attribute manufacturer and SKU to javascript?

I have the following script which i need to add the product brand/manufacturer and SKU <script> window.addEventListener(‘liveload’, function() { IcecatLive.getDatasheet( { ‘reasonstobuy’:’#Container5′, }, { Brand: **$manufacturer**, PartCode: **$sku**, UserName: ‘myusername’ }, ‘en’) }); </script> I have added custom.phtml in web/magento/app/design/frontend/MyTemplate/default/Magento_Catalog/templates/product/view… Read More »How can i pass product attribute manufacturer and SKU to javascript?

Magento 2 scandipwa child.isClassAccessorProperty is not a function

We are using Magento 2.4.3 version and php version is 7.4 Following that document – https://docs.scandipwa.com/getting-started-1/magento-integration While running BUILD_MODE=magento yarn start command getting an issue of – Failed to compile. ./node_modules/@scandipwa/scandipwa/src/util/Request/QueryDispatcher.ts TypeError: /var/www/html/magento243_scandipwa/src/localmodules/my-app/node_modules/@scandipwa/scandipwa/src/util/Request/QueryDispatcher.ts: child.isClassAccessorProperty is not a function at Array.forEach… Read More »Magento 2 scandipwa child.isClassAccessorProperty is not a function

Magento Js Override another Js File (which is already overriding a Magento Core js)

I need to overwrite a third party module js with my own one. I read in many articles which map is the way to do it. Foodentyco_Checkout/js/model/shipping-rate-service-override has to override Amasty_Checkout/js/model/shipping-rate-service-override. map: { ‘*’: { ‘Amasty_Checkout/js/model/shipping-rate-service-override’:’Foodentyco_Checkout/js/model/shipping-rate-service-override’ } } However, this… Read More »Magento Js Override another Js File (which is already overriding a Magento Core js)

Console Magento Error Customerdata.js

I am getting this error in the Magento 2.4.5 P1 in the cosole : {“readyState”:4,”responseText”:”{“message”:”No such entity.”}”,”responseJSON”:{“message”:”No such entity.”},”status”:400,”statusText”:”Bad Request”} in the customerdata.js When i log this I get this error