I am using the module for SMS Notifications in Magento 2, which is affecting another module used to hide price. When I am trying to open Hide price dashboard, I m getting this error.
Uncaught ReferenceError: jQuery is not defined
at smsnotification.js?v=6688:1
jquery-ui-1.9.2.js:14075 Uncaught TypeError: ui.jqXHR.success is not a function
at $.<computed>.<computed>.tabsbeforeload (jquery-ui-1.9.2.js:14075)
at HTMLDivElement.handlerProxy (jquery-ui-1.9.2.js:739)
at HTMLDivElement.dispatch (jquery.min.js?v=6688:3)
at HTMLDivElement.q.handle (jquery.min.js?v=6688:3)
at Object.trigger (jquery.min.js?v=6688:4)
at Object.jQuery.event.trigger (jquery-migrate.js:493)
at HTMLDivElement.<anonymous> (jquery.min.js?v=6688:4)
at Function.each (jquery.min.js?v=6688:2)
at jQuery.fn.init.each (jquery.min.js?v=6688:2)
at jQuery.fn.init.trigger (jquery.min.js?v=6688:4)
I tried to add requirejs code but it didnt work. I m sharing here js file code. from TEXT_Smsnotifications module. the path in cpanel is
domain_file/app/code/TEXT/Smsnotifications/view/adminhtml/web/js/smsnotification.js
'''
jQuery(document).ready(function(){
jQuery(".click-me").click(function(){
jQuery("#popup-mpdal").addClass('open-popop');
});
jQuery(".close-popop").click(function(){
jQuery("#popup-mpdal").removeClass('open-popop');
});});
''' I have also added min.js in script. domain_name/app/code/TEXT/Smsnotifications/view/adminhtml/layout/default.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<head>
<css src="TEXT_Smsnotifications::css/bootstrap.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" src_type="url" />
<script src="TEXT_Smsnotifications::js/smsnotification.js" />
<css src="TEXT_Smsnotifications::css/smsnotification.css" />
</head>
</page>
Expected Result: After enabling SMS notification module also Another module named Hide Price should work finely.
Actual Result: After enabling SMS notification module, Hide price is not opening tab in Admin Dashboard of Magento 2.