Skip to main content

Questions tagged [jquery]

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

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

Mixin for 'mage/dropdowns'

It's clear how to write mixing for widgets but not in this case How can I rewrite/updete this.closeDropdown method?
Max.A's user avatar
  • 107
0 votes
1 answer
56 views

Magento 2.4.6 Preselect Magento 2 Product Custom Options based on URL Parameters

I have a product with custom options like Color and Size. When users visit a product page with a URL like https://example.com/product.html?color=Red&size=Small, I want the Color option to be ...
Ravindrasinh Zala's user avatar
0 votes
0 answers
37 views

owl carousel not positioning rightly moving part of left side to right

owl carousel container not positioning centrally moving 10 px left side part to right or showing part of left on the right side <div class="carousel-section relative w-full"> <...
Muhammad Hossain's user avatar
1 vote
1 answer
119 views

Custom Success or Error message in the popup in Magento 2.4

I am creating the functionality for showing error or success messages in the custom popup box after order placement in Magento 2.4. Any reference or help is appreciated.
Mitul Vadalia's user avatar
0 votes
0 answers
29 views

Magento 2 : Use widget function from an other jquery widget

How can I use a custom widget function in a magento 2 jquery widget? requirejs-config.js var config = { "map": { "*": { "customwidget": "...
Waffeleater's user avatar
0 votes
0 answers
22 views

Magento 2 : JS Errors when dealing with Checkout

I use magento 2.2.5. When I imported files from an existing website to another server on plesk. Problem is, after deploying, upgrading and compiling correctly, on checkout I get a message that says &...
Pietro Mancini's user avatar
0 votes
1 answer
23 views

Magento 2 How to create order on user demand

Hi I have one requirement where user visit on the website and upload their product image(Like some tool image, Some kind of machinery part etc.) and select some attribute like size,colour,material etc ...
Ajay Tiwari's user avatar
0 votes
1 answer
63 views

Include jquery library in PWA Venia setup

We mentioned jquery library file in template.html in PWA Venia setup as below : <script async src="//asset.fwcdn3.com/js/embed-feed.js" type="text/javascript" ></script&...
Baby in Magento's user avatar
0 votes
3 answers
99 views

How to hide admin product form tabs for specific admin user?

I want to have an admin user who would only be able to view the 'Images And Videos' and 'Search Engine Optimiation' in the admin product edit form. I tried the following. Created app/code/Vendor/...
Aniruddha Ray's user avatar
0 votes
0 answers
23 views

Magento2 how to load payment page withot loading the page.?

Magento2 how to load the payment page without loading the page.? I want to refresh my payment page without loading into the js file. can anyone give a solution for this? Here is my js file with some ...
Ekta's user avatar
  • 101
1 vote
2 answers
683 views

Hide DIV if another DIV is active or visible with css/js

Trying to hide DIV if another DIV is active or visible with css/js. Basically if an item is out of stock I would like to hide my custom div. <script type="text/javascript"> require(['...
Shaun's user avatar
  • 109
1 vote
1 answer
88 views

How to retain line breaks when reading text from within <td></td>

With the jQuery below, I'm able to copy the content into clipboard but not to retain the line breaks. HTML: <td width="700" id="message_id2"> We are sorry you are ...
CodeForGood's user avatar
0 votes
0 answers
21 views

Magento 2.4: Pass jQuery value into checkout_cart_product_add_after observer

I have done some custom price calculation on product page using jQuery and I want to add the calculated price to the product during addtocart event. Any help would be appreciated.
mechanic's user avatar
  • 440
0 votes
0 answers
54 views

Open main menu on click and subcategories on hover

After magento upgrading to 2.4.5-p3 this doesn't work anymore. I want customers to be able to open the main menu on click and then continue to navigate the subcategories (and sub-sub categories) via ...
mullayo's user avatar
  • 23
0 votes
1 answer
111 views

How to add my custom jQuery in admin uiComponent form

Is there any way that I can add a JS/Jquery file which may able to listen my uicomponent's (checkbox/Radio) event (like OnClick or OnChange) so that I can do some operation with that. That UiComponent ...
Shahzad Hasan's user avatar
1 vote
0 answers
53 views

Add Custom Field to Braintree Credit Card Payment Method in Magento 2.4

I want to add the custom field i.e. po_number in the braintree credit card method in the payment page. Here is the code which I have added for field. <?xml version="1.0"?> <page ...
Mitul Vadalia's user avatar
0 votes
1 answer
177 views

Magento 2 / How to change to Camel Case an input in checkout form in real time?

I need to change to Camel Case the customer input name in checkout form in real time. Have Magento any method for this in Layout Processor or using JQuery? From: To: Thanks!
Diego Castro's user avatar
0 votes
1 answer
182 views

Magento 2.4.4: Attach event handler to Province dropdown to reload the checkout page

We developed a custom shipping module that displays shipping methods and the rates in Firecheckout page. The issue is the Shipping Method block in the firecheckout page doesn't refresh if one changes ...
CodeForGood's user avatar
0 votes
1 answer
120 views

Adding Constant Contact Inline Signup Javascript to Magento

I am trying to get the Constant Contact Inline Signup form and AlphaSSL Security banner working in my site footer. I copied the relevant code from the websites into a block in admin called footer: <...
MightyFeldar's user avatar
0 votes
1 answer
1k views

How to add Custom JS in admin side?

I want to add custom JS on product edit page in admin side. After doing some R&D, i found a solution but that didn't work. What I have done so far, app/code/Vendor/Module/view/adminhtml/layout/...
Asad Ali's user avatar
4 votes
1 answer
5k views

Uncaught TypeError: url.indexOf is not a function

After Magento Upgrade in latest version product list page showing this error, please suggest me what we can take step to solve this error. jquery.js:10363 Uncaught TypeError: url.indexOf is not a ...
Aashutosh Kumar's user avatar
1 vote
2 answers
384 views

Add Success Message in Custom Popup for Add to Compare in the listing or Category Page in Magento 2

I want to add custom pop-up in category page for showing success or error message for add to compare button. Any help is appreciated. Thanks in Advance !!!
Mitul Vadalia's user avatar
0 votes
2 answers
411 views

Switch between accordion behavior on resize not working properly

I am trying to get a different behaviour of the product tabs/accordion on desktop vs. mobile. I use the matchMedia function to do so. So in the desktop part I use: entry: function () { $('....
Mario's user avatar
  • 478
0 votes
1 answer
1k views

Magento 2 : can I upgrade jQuery versions?

I opened the developer console and executed jQuery.fn.jquery and I get 1.12.4. Why does Magento 2 uses the old version even though the latest version is 3.6.0? I am running a pagespeed report on ...
Sejal Shah's user avatar
  • 2,153
1 vote
1 answer
146 views

Move Welcome Greet Message to header panel

I am using smarthwave porto theme, in which I need to move the Default Welcome Message from Nav Menu (shown in screenshot 1) to main header panel (which is in blue color at top)(shown in screenshot 2) ...
Mitul Vadalia's user avatar
0 votes
1 answer
130 views

how to pass javascript variable to php in template

I am creating admin form using template I have multiple select dropdown. I want to filter dropdown based on the value of other but problem is how i can assign the javascript value to php variable so ...
Syed Hassan Zamir's user avatar
0 votes
1 answer
97 views

How do I select multiple Tax Rates - BY TEXT SEARCH in Magento 2?

I am struggling with selecting Tax Rates in Magento 2.4.4. There was a fantastic answer to this issue: How to select multiple tax-rate In Magento 2? Where the Console code lets us select ALL tax rates ...
Brianna's user avatar
1 vote
1 answer
1k views

Magento2.4.5 google brower console display jquery-migrate.js:100 JQMIGRATE: jQuery.fn.bind() is deprecated

Magento CE 2.4.5 I install some theme after google brower console display follow info ,how to fix? JQMIGRATE: jQuery.fn.click() event shorthand is deprecated JQMIGRATE: jQuery.fn.resize() event ...
sq y's user avatar
  • 137
2 votes
0 answers
110 views

Disable Payment Method By JS

I have a requirement to disable the payment method based on a custom product attribute in the cart and payments page, whose value is stored in the cookie local. Till Now I have been able to get a ...
Mitul Vadalia's user avatar
5 votes
2 answers
9k views

Uncaught Error: Mismatched anonymous define() module

I'm trying to use jquery in an adminhtml js file...but it seems not to be working and can't get to understand why...any help would be appreciated ! Layout is like <head> <script src="...
Claims's user avatar
  • 1,236
1 vote
1 answer
726 views

How to remove disable attribute from a button in form-mini

I'm trying to remove disable from a button in form-mini.phtml but couldn't find a way through jquery/javascript. I know it gets enabled after adding a few characters, but by default, it remains ...
Sara Whitmore's user avatar
1 vote
0 answers
301 views

How we get an element from second tab of ui component on edit magento 2.4

I have an Admin UI form with two tabs. There is a dropdown field on first tab .Based on this dropdown value I want to show or hide an another field which appeared on the second tab. But we could not ...
Anjaly Suresh's user avatar
1 vote
0 answers
74 views

Wishlist item Always Return 3 items

define([ 'jquery', 'uiComponent', 'Magento_Customer/js/customer-data', 'domReady' ], function ($, Component, customerData) { 'use strict'; return Component.extend({ /** @...
imtraf's user avatar
  • 11
0 votes
1 answer
231 views

i want to get data from attribute data-post

<a href="#" class="action towishlist btn-round pink" title="Add to Wish List" aria-label="Add to Wish List" data-post="{&quot;action&quot;:&...
imt's user avatar
  • 161
1 vote
1 answer
435 views

Get System Config Values in JS file without use of phtml

I want to get System Config Value in my JS file directly without using phtml template. thanks in advance.
Muhammad Ali's user avatar
-1 votes
1 answer
2k views

How to Create a Dynamic Owl Carousel

Using code below you can create a fully responsive dynamic owl carousel. The same way you can implement this carousel in magento2 as well.
Syed Hassan Zamir's user avatar
0 votes
2 answers
774 views

Magento2 Jquery Post Form via Ajax

I have a basic html form and what I want is when clicking the submit button to use Jquery and Ajax to post the contents to an external url instead of reloading the entire page. However whats happening ...
Jayreis's user avatar
  • 725
0 votes
1 answer
109 views

Custom js Script not working . when magento upgraded 2.3.3 into 2.4

category-map.js define( [ 'underscore', 'jquery', 'mage/template', "prototype", "mage/adminhtml/form" ], function (_,JQuery) { // <![CDATA[...
R J's user avatar
  • 5
0 votes
1 answer
437 views

Magento2 - How to pass query parameter in curl get method

I have a curl request example, it is working once I'm checking it with command line. curl https://api.stripe.com/v1/payment_intents/search -u secret key: --data-urlencode query="status:'...
Suresh Chikani's user avatar
0 votes
0 answers
114 views

Jquery code doesn't work when deployed but runs fine in the browser console in Magento cart page

We're trying to just display the text in the code below if the page is the cart page so that visitors are aware that they can add a gift message to their order. Code works fine by displaying the text ...
CodeForGood's user avatar
0 votes
1 answer
81 views

how to get the return of an ajax request that I didn't send

there is a request that is being made on the site, but I didn't make this request, but I need to get the result of it. Is there anything I can do?
lucas's user avatar
  • 309
-2 votes
1 answer
449 views

How to solve this error ? menuAim is not a function

Error: at HTMLDocument.<anonymous> (mega-menu.js:41:28) at fire (jquery.js:3238:32) at Object.fireWith [as resolveWith] (jquery.js:3368:8) at Function.ready (jquery.js:3588:14) ...
Parth Patel's user avatar
0 votes
1 answer
2k views

How to stop Playing video in the background when popup modal is closed or click on out side of the popup

I have a button. When user click on button i am showing the video in popup modal. But when i click on outside of the popup the popup is closing but video is keep playing and when i close the popup ...
Mani's user avatar
  • 392
0 votes
1 answer
52 views

Owl Carsouel in Magento2

I am creating owl carsouel for compare products <div class="main-padding"> <div class="message-container"> </div> <div class="compare-inner-block "&...
Syed Hassan Zamir's user avatar
4 votes
6 answers
3k views

jquery.mobile.custom js file error after upgrade to Magento 2.4.4

I just upgraded my magento version 2.4.3-p1 to 2.4.4, and i noticed in console.log there is an error stating: i tried to access the js file using the js file link, but here's what i got after ...
blue's user avatar
  • 128
0 votes
0 answers
45 views

How to show thanku popup only, if user alredy submitted the form in magento 2 untill user leaves page

I have custom popup form, when the user click on 'get in touch' button i am showing popup to fill the form, once user submitted the form i am showing thanku popup.So if the user again click on 'get in ...
Mani's user avatar
  • 392
1 vote
2 answers
3k views

Form validation is not working in my custom form in Magento 2

<div id="popup-modal"> <div class="contact-form-popup" style="display:none;"> <form class="form contact" action="<?= $...
Mani's user avatar
  • 392
0 votes
0 answers
1k views

How to show success message in popup modal after submitting the form in magento 2

here i did this to show popup modal <div id="popup-modal" style="display:none;"> <form class="form contact" action="<?= $block->getUrl(...
Mani's user avatar
  • 392
0 votes
1 answer
379 views

How can i move Strategery InfiniteScroll "Load More" button?

I installed Strategery InfiniteScroll to my Magento 2 project. The plugin provides an option to display a "load more" btn at the bottom of the listing page. However there's a problem. The ...
Annak942's user avatar
0 votes
0 answers
742 views

Get Mini Cart Update Cart Button Event

I want to obtain the event during which this Mini cart update cart button is clicked I want to observe when and how many the amount of it being clicked I try to put below code inside app/design/...
Mohd Farhan Bin Ramli's user avatar

1
2 3 4 5
17