Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
39 views

Changing logic - jQuery

I have some buttons to buy and remove products in the cart and I do this through two ajax requests. Everything is working properly, however for a new product to be added, it is mandatory that the ...
0
votes
1answer
308 views

How to disable ajax animation for the the 'Add to Cart' button of products grid in Magento 2?

I try to save Ajax for the the 'Add to Cart' button. But to remove the class and title changes during the addition of the product. Example: when I put "Add to cart" - all time see "Add to cart", not "...
0
votes
1answer
442 views

Magento 2 | How can we use jQuery without “require(['jquery'],function($){” this code

We have face problem we implement some slider and also we have wrighten many script in phtml. If we add the jquery library then magento is giving the error in core files and all script are stopped ...
0
votes
1answer
174 views

Changing button span via jQuery [closed]

I have a slide that displays products in magento. Every time the user clicks on the buy button, I need the span of that button to change to remove and the other buttons to be disabled for the click ...
0
votes
2answers
2k views

How can I add JQuery to magento 2 custom module [duplicate]

I have test.js file like below function Calculation(){ //area calculation var width = document.getElementById('width').value; var height = document.getElementById('height').value; var ...
0
votes
1answer
413 views

jQuery css is not working for mobile

Referring to my question here: Magento 2 Add custom tab to product details page conditionally As suggested in the answer, I am trying to hide the custom tab if response is "No Data to display!". ...
1
vote
1answer
64 views

Manipulating variables in jQuery to be displayed in html code

I make a request in Ajax at the click of the button passing the id of a product to a controller and it passes to the helper. In the helper, through this id of the product, I add it to the cart, but ...
1
vote
1answer
354 views

Display an array of Jquery data in HTML

I make a request in ajax at the click of the button passing as parameter the id of a certain product to the controller. This controller directs the product id to a helper that adds the same to the ...
2
votes
2answers
5k views

window.on 'load', function not useable with require JS loaded file

I am trying to use $(window).on('load', function(){}); in file that is being pulled into my template with require JS, but no matter how i configure the JS, it will not execute. The odd part is, this ...
0
votes
3answers
185 views

Compare data in database with jquery and json

Is it returning me error 500 syntax, does anyone see any errors? jQuery Code var ordertxt = $j("#ordertxt"); ordertxt.blur(function() { $j.ajax({ ...
0
votes
2answers
459 views

Custom Contact Form translation

I have a custom contact form, I send all the fields I need, but I can not translate a field. Realizou compra: Sim Pedido: Pedido #100000001 - Total: R$105.00 - Data: 31-07-2017 - Status: pending ...
3
votes
1answer
525 views

Datatables jquery plugin in Magento 2?

Datatable version 1.10.15 requirejs-config.js var config = { paths:{ 'dataTables': 'df_Comercial/js/datatables.min', }, map: { '*': { 'dataTables': '...
0
votes
1answer
1k views

Error cart message on Ajax

My goal is to have a cart that live updates when you change the quantity's. Normally you need to press the 'update cart' button. So I update my cart live by doing this: require(['jquery', '...
1
vote
0answers
58 views

Magento 2 Add Javascript

I have the following code in a custom module for admin backend, which is not running. tinymce.html <textarea class="admin__control-textarea wysiwyg" data-bind=" value: value, valueUpdate: ...
0
votes
1answer
184 views

Compare Products link or button does not work in Magento 1.9.3.2

Compare Products link or button does not work in Magento 1.9.3.2 i have added product comparison link doesn't work. This is in Magento 1.9.3.2 My issues are almost identicalto this post, with ...
0
votes
0answers
177 views

Magento1.9 jquery calendar not working properly

I have added jquery calendar for a product to take date and time and kept as not required. If I add that product to cart without disturbing the date field its working.If I select date, time and trying ...
1
vote
1answer
249 views

magento2 : so many jquery & require.js error when activating ssl

Magento2: so many jquery & require.js error when activating SSL. On Backend & Frontend Both. Is there any common problem? Error screenshot: Front End Error screenshot: BackEnd
2
votes
3answers
5k views

Magento 2, Cannot read property 'ui' of undefined

I don't get why adding my custom js file causes below issue. Please help understand the cause. Let me know if more details should be provided here. Is it dependency issue? edit: My requirejs-config....
0
votes
1answer
87 views

Get Orders related to an email address via Ajax

I'm trying to create a module that creates a JSON collection of orders from an email entered into a form. When am email is entered into a field within my form, the on blur event of the email input ...
0
votes
2answers
976 views

How can I make the login window pop up in magento

I'm in the checkout page and there are two options there: one radio button so that the user can choose a receipt when he/she submits the order and one button so the user can choose an invoice instead. ...
1
vote
1answer
539 views

Add to cart is not working: Uncaught TypeError

Add to cart is not working and getting error: section-config.js:33 Uncaught TypeError: Cannot read property '*' of undefined I am very new to magento and by following docs, I have created a ...
0
votes
1answer
1k views

add to cart using ajax

I'm having a problem, I've placed an ajax Request in my cart, and she's doing what she has to do that is adding the product to the cart, but she does not redirect to the next page, she stands in the ...
1
vote
3answers
2k views

Statick Block wysiwyg Image Uploader Button is not shown in Magento

This is the Image with Problem in which I did not see "image upload" and "Delete" button Our Magento See this button like below image The Magento Actual Output So how can i display this button ...
0
votes
1answer
48 views

An input appears when selecting an option

I'm trying to create a form that brings the order number to the client select "Yes" or "no" this is my code Contato.phtml ... <li> <label for="f_f_compra" class="...
5
votes
2answers
5k views

Issue with jQuery usage in Magento 2

Currently I have a custom block loaded almost last on the page containing: <script type="text/javascript" src="/test.js"></script> This script is pretty much the usual stuff, just ...
2
votes
1answer
2k views

magento 2: js function not working from template file

I have created a js file in my custom module: components.js which contains the following code: require([ 'jquery', 'jquery/ui' ], function($) { function checkFormValues(inputs, radio) { ...
2
votes
2answers
1k views

Magento2 add js files via requirejs

Been trying to figure out how to add some custom JS files with requirejs. I've been successful in adding them via default_head_blocks.xml, however... in doing so... they get loaded before the jquery ...
0
votes
1answer
369 views

How to call magento 2 validation with using button type is button?

I have custom form with 3 fields i.e Name, Email Id, Mobile No. require([ 'jquery', 'mage/validation' ], function($){ var dataForm = $('#product_addtocart_form'); var ignore = null; dataForm....
0
votes
2answers
502 views

Including Jquery in magento conflict the prototype.js [duplicate]

I cannot include Jquery in magento because after including jquery-2.2.2.min.js in magento admin side,it have conflict with prototype.js. Adding $.noConflict(); can remove the conflict,but the jquery ...
1
vote
1answer
142 views

What stopObserving() function is used for - Magento 1.9

I want to know what the js function stopObserving() is used for.
0
votes
1answer
3k views

How to save a image upload to a folder in magento2? [duplicate]

Created a custom tab on admin product edit page. Here added a image upload section. I need to save the uploaded image to a folder.
1
vote
1answer
38 views
0
votes
1answer
521 views

Organic Simple Configurable Product Prices In Swatch

I am currently using Organic Simple Configurable Products extension for Magento CE 1.9.3.2 I have configurable products that are successfully changing the price displayed for the products total price ...
1
vote
1answer
222 views

Magento + RequireJS - How to use non-AMD custom javascript with jQuery?

First off, I made a custom javascript file, main.js. Quite simple; it's just this: $("#testp").text("Hello!"); #testp is in one of my phtml files, with just <p id="testp">Hello World!</p>...
1
vote
0answers
294 views

How to use region updater in magento 2 custom module?

I am working on the region updater in magento 2. Region Field needs to change based on the selection of country. Below is my region updater code: var billingRegionUpdater = new RegionUpdater('#...
0
votes
1answer
2k views

Uncaught TypeError: $(…).jqzoom is not a function

I am trying to add an image zoom to our Magento EE 1.14.2.1 which apparently was removed by a prior developer. So I found a script called "jqzoom" http://www.myjqueryplugins.com/jquery-plugin/jqzoom ...
2
votes
2answers
3k views

Fixed Headers in Magento

I want to fix my header for my magento site. Please get me some solutions so that I will be helpful
0
votes
1answer
503 views

Product grid is not loading in admin, - Error: Unresponsive script

The product grid is not loading properly in the backend when logged in as the Administrator. I get an error of unresponsive script. But if I login to the backend with another user (personal user) the ...
4
votes
2answers
3k views

How to pass phtml variable in js file in magento2 [duplicate]

This is my phtml file .... <?php $currentCategory = $block->getCurrentCategory(); //echo $currentCategory; ?> I want to set $currentCategory value in js file and display in alert ......
0
votes
1answer
334 views

how to use value of jquery variable in phtml file in magento2

I want to use variable in phtml file which is in jquery. I want to use this abc variable in phtml file. How to use it? var abc = $('#limiter option:selected').val();
0
votes
2answers
104 views

Magento change quantity shown for mobile only

I have this code here to show me a product collection. Currently shows me 12 on desktop and mobile. I would like to keep it at 12 on desktop. And only 5 on mobile devices. Code is below and the part ...
1
vote
1answer
265 views

Google Map with Drop down functionality not working

I Make a file of Google Map in which there are a drop-down functionality but first i created this file in html it's working perfectly but when i tried in CMS page or phtml page the map not shown. As ...
0
votes
1answer
323 views

Adding custom javascript to Magento 2 to be use in both product and category page

I am trying to add custom javascript to all product page and category page. but I don't known if to create custom magento 2 module or can edit the magento vendor module. If I can use the two above ...
4
votes
1answer
858 views

magento 2 Add to cart popup is not working after load the product using infinite ajax scroll [closed]

I have used infinite ajax scrolling on product listing page.Its working but there are one issue. Add to cart popup is not working after load product using infinite ajax scrolling. Please check ...
0
votes
1answer
251 views

Include JQuery script to every CMS page within theme

How can I include a JQuery script to every CMS page within a theme. Placing the .js file in: app/design/frontend/<company>/<theme>/web/js/file.js and using script tags(below) in the ...
0
votes
0answers
246 views

jQuery Too much recursion error in Magento Advanced products Options extension

I am using Advanced Product Options Extension (https://www.mageworx.com/advanced-product-options-magento-extension.html) in my magento store. Problem is when I add a product in cart and try to add ...
0
votes
1answer
369 views

Ajax.Responders.register's onComplete Executes Before Ajax Complete

I'm trying to add background colors on the admin orders grid based on the order status in a Magento 1.9 install. I have colors coming fine on page load, but when the grid is reloaded with ajax if any ...
1
vote
3answers
238 views

inserting an image in owl slider in magento [closed]

I want to insert an image in following code jQuery(document).ready(function() { jQuery("#owl-test-feature").owlCarousel({ navigation : true, slideSpeed : 400, paginationSpeed : 400, items : 5, ...
0
votes
1answer
179 views

Magento 1.7.0.2 CE: jQuery conditional show <dd> if top element has specific class

We use bundle item. Customer can make a combination of different sku's. We group the sku' in logical sections (e.g. motor, color, wheels, ...). Some groups are required to have at least one entry ...
1
vote
1answer
5k views

How to call custom jquery function in phtml in magento 2.1

I have some custom jquery functions and I want to create a common js files for all custom functions. But I am unable to find a way to achieve this. I have created requirejs-config.js file at theme ...