Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Denotes questions related to the use of jQuery library in Magento.

0
votes
1answer
21 views

Displaying a message when hover on a readonly attribute!

I'm trying to display message on hover over a readonly select in a product page, ( Magento 2.2.4, Php 7) Here's my attempt: CSS: #select_801[readonly]{ background: #eee; pointer-events: none; ...
0
votes
0answers
7 views

Open Tab on page load in magento 2

I have code like below in my html file <div class="payment-option _collapsible opc-payment-additional discount-code" data-bind="mageInit: {'collapsible':{'openedState': '_active'}}"> ...
0
votes
0answers
26 views

How to solve jquery issues in Magento 2?

I am using Magento 2.2.3 and I have created customtheme But in my website scripts are not working properly.It gives me below error: ReferenceError: jQuery is not defined I have added requirejs-...
0
votes
2answers
46 views

Javascript function in phtml files

I am using onclick function in my template file, here is my html <div class="input-box"> <input type="checkbox" name="change_password" id="change_password" value="1" onclick="...
0
votes
2answers
30 views

Owl Carousel not working in Chrome

I've got a carousel (Owl Carousel) on my home page that doesn't work on Chrome but does work in other browsers. I believe it is something to do with Jquey loading after the carousel but I'm not 100%. ...
2
votes
1answer
36 views

How can we load js to a custom module created?

Can you please suggest us how to load js into the custom module created? We are facing issues in loading the js to our custom module created
3
votes
0answers
44 views

mageInit KO binding not working for a custom jQuery widget

I can't get the mageInit binding to work on a custom jQuery widget which I have created. I have used it in my KO template like: <div data-bind="mageInit: {'mywidget':{'configuration-value':true}"&...
3
votes
0answers
26 views

Magento2 - Remove/edit classes from navigation

i have set up a new magento2 store and i added some jqery-ui items ( accordion and tabs) and for them to work, i included the jquery.css in my _extend.less inside my custom theme. Unfortunately now ...
0
votes
0answers
19 views

Magento 2 adding textbox to modal widget

I want a text box in my modal widget in custom js file and get the value of that text box on button click of that modal. require([ 'jquery', 'jquery/ui', 'Magento_Ui/js/modal/modal' ], ...
0
votes
0answers
20 views

Jquery ui tabs not loading without clearing browser cache

I have a problem, created a custom page in magento2 with custom jquery ui tabs but tabs not working properly. When i clear the browser cache tabs are loading fine but without again on page refresh ...
0
votes
1answer
16 views

JQuery message im magento 1, need to be adjusted for non-repetition and translation-ready

I have two issues in this code: 1: if I keep clicking on the radio button the message will be repeated. 2: I cannot translate the message to other language. Here is my jquery code: <script ...
1
vote
0answers
31 views

Magento 2: Browser console error on hard refresh

I am facing some weird issue with Magento 2.2.5 version. When I first-time open website, I am getting lots of js errors. (Screenshot attached) After this, when I only press F5 button (normal refresh) ...
0
votes
0answers
31 views

Magento-2 : Upgrade elasticsearch query from 5.x to 6.x

I have Magento-2 Elasticsearch custom module which is working with Magento-2 + Elasticsearch-5.x Now I am upgrading module with Elasticsearch-6.x. My module has search result popup which is showing ...
0
votes
1answer
25 views

Magento 1.7 custom options not updating price

On a Magento 1.7 website the product option price is not longer updating the main price. I updated the prototype.js file which I though was causing the issue but still no luck. When I inspect the code ...
0
votes
0answers
15 views

How to load entered customer card number from database to frontend

I have customized my sign up form by adding an extra field to add his shopping card number, however I want this card number to be loaded for the box each time he is logged on. following I have stated ...
0
votes
1answer
67 views

Magento 2 checkout page how to get country_id from selected shipping addresses?

How to get country id/country name from selected shipping address in the checkout page. lets assume if the customer has multiple shipping addresses, based on the shipping address choose, if country ...
1
vote
1answer
23 views

Magento2: Update Qty of product in bundle

I am updating the quantity of a radio button in a bundle via jQuery: $ ('input. Qty'). Val (4) Unfortunately the product summary does not change. When I put the value ("4") in the same input field ...
0
votes
0answers
24 views

JQMIGRATE: 'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'

I'm using Jquery version "v1.12.4" and Jquery migrate version "v1.2.1" on our Magento (Version: 2.2.3) site. I'm getting the below console warning: JQMIGRATE: 'hover' pseudo-event is deprecated, use '...
0
votes
0answers
17 views

Sometimes on magento 2 - jquery-migrate.js is not loading

I'm having some strange issue with the website, it takes too much time to load. Sometimes jquery-migrate.js is not loading, which is making issue with the slider. Store URL- http://megabooklet.com/...
1
vote
0answers
23 views

Is the JQMIGRATE necessary for Magento 2?

Just out of curiosity: Is the JQMIGRATE necessary for Magento 2? Because it is complaining about using a deprecated psuedo event. Please see the below screenshot. If it's not necessary for Magento ...
2
votes
7answers
222 views

jQuery not working for custom checkbox on checkout page

I am looking to create a custom checkbox field on the checkout process that a customer can click to define if they are a business customer or a consumer. To do so I made a module with the file ...
0
votes
0answers
33 views

How to add on scroll animation in magento 2 using AOS (Animation On Scroll) Jquery?

I have tried to add on scroll animation in my Magento 2 cms page. I used AOS Jquery for that. I have added the js and CSS file and initialize AOS through cms page but It will shows Uncaught ...
1
vote
1answer
34 views

Custom popup in magento2

I have created a custom popup in list page .. I need to open the popup after 4 sec of every product adtocart. And auto close the popup after 4 sec. some time the popup suddenly closed within 4 sec......
0
votes
0answers
69 views

Uncaught Error: You cannot apply bindings multiple times to the same element. and Bootstrap's js requires jquery error coming

I have created custom module in magento2.2. Whenever am loading that page at first It's showing two errors in console Uncaught Error: Bootstrap's JavaScript requires jQuery Uncaught Error: You cannot ...
0
votes
0answers
13 views

Configurable Products - how to stylize text swatches which are out of stock or available for preorder

I am using an extension to allow some configurable product options to be available for preorder (while the rest are available for immediate purchase). By default, all of the options (displayed as ...
0
votes
2answers
52 views

Add js to Widget

Hello looking for some help I have created some Widget , and need to add in it JavaScript for fetch instagram photos I have a library and a script, but this script doesnt work. I have added it in ...
0
votes
0answers
19 views

Extends JS of module slider

I installed SY_Slider from the store. The slider works, but in my js I can't custom it as I want (for example, changing the size in JS work, but I can't hide the caption). Any ideas ? EDIT : It's ...
2
votes
1answer
43 views

How to hide specific days from admin form calendar field in magento 2

I want to disable week days (Saturday & Sunday) in admin form calendar field. check below screen-shoot. Below is my field code. $fieldsetDirector->addField( 'attendance', 'date', ...
0
votes
0answers
13 views

Validate form errors with custom locale messages

I found an extension to jQuery api which had locale phrases to translate error messages. I'm tryuing to translate that phrases to pt_PT. But I simply can't add code to my phtml such as: <script ...
0
votes
0answers
53 views

Magento more than 61 product attribute database tables in join query

I'm using product feed extension and when I try to generate feed It throws me below error SQLSTATE [HY000]: General error: 1116 Too many tables; MySQL can only use 61 tables in a join, query was: ...
0
votes
0answers
25 views

Boostrap not loading after jQuery

i'm facing this issue : Uncaught Error: Bootstrap's JavaScript requires jQuery How do I load bootstrap after my jQuery ? It seems to me that Magento had already load jQuery (in my console, I have ...
0
votes
0answers
18 views

magento 2 need js component on-ready or init event subscribe

I'm trying to get all related events triggered by or on components. example component Magento_Ui/js/form/components/fieldset try adding a new customer in backend, open console, type: require('...
0
votes
0answers
44 views

Magento 2.2.4 Implementing Bootstrap 4 Carousel to Homepage | JS seems to not be functioning

I've been trying to get the Bootstrap 4 Carousel to work on my homepage and I've been facing an issues that seems like the JS may not be functioning. This is the way that I went about doing so. I ...
0
votes
0answers
20 views

magento 2 : Ajax waiting time is high on server

I have prepared an extension for ajax scroll(load more products),In which code for local environment works faster and less waiting time. But when I check same code in server, it took 6 to 7 seconds ...
0
votes
1answer
34 views

Magento2 : Call Block Methods from Script area of .phtml

I am able from call block function using php code from phtml like below : <?php $blockObj= $block->getLayout()->createBlock('Inchoo\Helloworld\Block\Helloworld'); $myArr = $blockObj->...
0
votes
0answers
150 views

Magento 2.2.2 bootstrap.min.js:7 Uncaught TypeError: f[b] is not a function

I am Using Magento 2.2.2. I have inserted this code in the Block i.e Content>Block when wei click on the Ask an Expert image , The Modal popup should appear. But currently its not showing popup, the ...
0
votes
0answers
19 views

Theme, BT4 and jQuery in magento 2 [duplicate]

i've created a theme that extends luma. I can choose my theme in backend. It extends luma so i don't see difference between my theme and luma. But if I extends my theme from blank, there's still luma ...
0
votes
0answers
30 views

Magento 2 - Is there a way to change element “data-mage-init” without overriding a template?

For example I want to change some options of minicart dialog initialization. So I need to change minicart template (override this template in custom theme/module). Is there a way to change minicart ...
0
votes
0answers
27 views

Magento 2 : admin form image file validation not working in server

In my form i am using this code to upload the file. $fieldset->addField( 'banner_image', 'image', [ 'name' => 'banner_image', 'label' => __('...
0
votes
1answer
73 views

API integrates and return the value in ajax

I have integrated the third party API for validating a correct email address with the domain. The API call is returning the value in the ajax call as Boolean. How to retrieve the value from the API ...
0
votes
0answers
44 views

Magento 2 : Fancy box iframe popup not working in mobile screen

I am using Fancybox version 2.1.4. I am make a fancy box iframe popup, all functionality working fine in desktop but issue in mobile screen. below 800px fancy box iframe popup is not working. Can ...
0
votes
1answer
19 views

Use of Imagesloaded plugin in the RWD theme

If you look at the layout file page.xml of the RWD theme you will find a declaration like: <action method="addItem"><type>skin_js</type><name>js/lib/imagesloaded.js</name&...
0
votes
1answer
23 views

how to add cms page jquery in magento 2

how to add cms home page jquery in magento 2 jQuery(document).ready(function($){ $(".home-banner").insertBefore(".page-main"); }); Please advance thanks for help
1
vote
0answers
49 views

Magento 1.9 - Update product price using jQuery

I am using a jQuery script to add static price to the product's regular price on the product detail page. On the product page, the price is updated, but the price is not updated in the cart when ...
0
votes
1answer
226 views

Magento 2 how to validate customer registration form on keyup event

I am working on a project where I need to validate customer registration form as customer types. I want to use the event keyup for inputs. I want to change the default messages also. Right now I am ...
0
votes
1answer
57 views

AJAX login, how to pass data response from controller to jQuery with Ajax

I created some module to login and register with Ajax, so I rewrite the : vendor/magento/module-customer/Controller/Account/LoginPost.php vendor/magento/module-customer/Controller/Account/...
0
votes
1answer
21 views

Magento 2 pop up view each refresh page

I have newsletter_popup show each time visitors refresh page ? <script type="text/javascript"> require([ 'jquery', 'mage/cookies', 'jqueryfancyboxpack' ], ...
0
votes
0answers
30 views

Magento 2 _initSelect() appears for all front-end query

I have created a new order feedback module, so that once customer post a feedback for each order, it will be placed on our custom table, using that custom table I had created a back-end grid(using UI ...
2
votes
3answers
129 views

<sequence> not working?

I've made a script in a custom module that is dependent on customer-data.js, a .js file initiated by Magento_Customer. So, what I did in my module.xml: <config xmlns:xsi="http://www.w3.org/2001/...
0
votes
0answers
24 views

Sticky NavBar onScroll on Magento 2.2.2?

I'm currently building a site for myself, and I found this really awesome effect on multiple sites where the navbar is below an image, but when you scroll past it, it sticks to the top. example I ...