Skip to main content

Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
69 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
16 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
18 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
51 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
97 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
22 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
321 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
41 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
20 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
52 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
89 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
49 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
155 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
167 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
113 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
859 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
346 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
382 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,141
1 vote
1 answer
130 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
121 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
91 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
101 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
4 votes
2 answers
8k 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,191
1 vote
1 answer
667 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
294 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
70 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
207 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
356 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
0 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
716 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
94 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
399 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
109 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
77 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
439 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
  • 393
0 votes
1 answer
50 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
2k 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
  • 393
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
  • 393
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
  • 393
0 votes
1 answer
350 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
728 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
0 votes
2 answers
51 views

Custom Javascript not loded properly in magento2

Custom Javascript is not working with infinite scroll or after applying some filters from shopping options Working Fine with the first 12 products. but after applying some filters or working with the ...
Syed Hassan Zamir's user avatar
0 votes
1 answer
436 views

jQuery listen to ko data bound input

I have a component with for a "quantity changer", comprising of an input field and plus/minus buttons. The input and buttons are connected via data-binding on a KO observable. This works as ...
king_nak's user avatar
  • 131
0 votes
1 answer
502 views

Magento 2: Create Dynamic Category Dropdowns on Frontend

I, once again, have to ask for your help. I need to create a modal that let the customer select their car brand, model and year, and I need to populate the select options depending on the selections ...
Alberto Privado's user avatar

1
2 3 4 5
17