Questions tagged [ajax]

AJAX (Asynchronous JavaScript and XML) is a technique for creating seamless interactive websites via asynchronous data exchange between client and server. AJAX facilitates communication with the server or partial page updates without a traditional page refresh.

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

In magento, how can we bring the swatch options of a configurable product and it's corresponding image url's in an array?

I need to bring the swatch options of a configurable product and its corresponding image url's stored in an array in PLP page in magento. How can I do that? I got an empty image url array while trying....
Farseen's user avatar
0 votes
1 answer
35 views

Magento 2 custom validation rule in UI component form field with Ajax

I have created a custom validation rule in my admin ui form using the below link https://webkul.com/blog/add-custom-validation-rule-in-ui-component-form-field/ If I use a direct condition then it is ...
Jancy Abraham's user avatar
0 votes
0 answers
71 views

After upgrade to magento 2.4.6-p3, the pagination is not working

Upgraded my magento to 2.4.6 from 2.4.0 and the pagination is showing but it is not working. when i am clicking on page 2, it is not going on next page and the url is also not updating. Here is my ...
Tisha Jhanwar's user avatar
0 votes
2 answers
39 views

error messages disappear quickly when updating quantities on product detail page

error messages disappear quickly when updating quantities on the product detail page I am using Magento 2.4.5 I have changed the code in the below files but there is no effect /Magento_Ui/web/js/view/...
Ishu Kakria's user avatar
1 vote
0 answers
48 views

Magento 2 - How can I update the cart summary totals when quote grand total is modified

I have a controller that is called by ajax in the cart page. A gift card amount is passed to the controller and a function then updates the quote grand total based on that amount. protected ...
nickcobb's user avatar
0 votes
2 answers
158 views

Magento 2.4.6: How to display Order IDs Based on Selected Customers in a UI Form?

I've created a UI component form that consists of two dropdown fields. The first dropdown successfully displays customer IDs and names. However, I'm encountering challenges with the second dropdown, ...
MagentoDev's user avatar
0 votes
2 answers
51 views

Mageplaza Ajax search not working after remove .html prefix

After i removed the standard .html URL prefix from all URL's, the mageplaza ajax search module doesn't work propperly anymore. It shows me the right products but is linked to the old .html url. ...
Nick Reijrink's user avatar
1 vote
1 answer
39 views

custom Section data need to update on cart item delete in magento2

I have created custom section data called test and create sections.xml file with below code <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
Rutvee Sojitra's user avatar
0 votes
0 answers
18 views

Related Search Terms Duplicating by ajax call

Related search term is repeating via ajax call. We are using mageplaza layered navigation
Amiyo Ghosh's user avatar
0 votes
1 answer
99 views

Ajax call to inline grid text field from block grid

I have created the block grid in admin product edit page section, I have added a text field in that grid column using below addcolumn method. $this->addColumn( 'position', [ ...
user73267's user avatar
  • 183
0 votes
1 answer
120 views

A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later. Ajax call

I have a problem here. I use Ajax call to send data to controller. define([ 'jquery', 'Magento_Ui/js/form/components/button' ], function($, button){ 'use strict'; return button.extend(...
Nghia Hoang Trong's user avatar
0 votes
0 answers
36 views

magento 2.4 call stock alert via ajax

I'd like to implement the magento standard out of stock alert feature. This works out of the box for simple products but not for grouped products. I know there are ready make modules that extends this ...
Lou Nik's user avatar
  • 443
0 votes
0 answers
35 views

Magento 2: how to get the grand total of the minicart and cart on custom header template in when we add new products in the cart

how to get the grand total of the minicart and cart on custom header template when we add or update the new products in the cart in magento 2 witout refreshing the page. We can get via ajax of ...
Shomita's user avatar
  • 1,113
0 votes
0 answers
56 views

Call custom Admin Controller in magento 2 product edit giving an error, How to call admin controller in Ajax?

I have created a button in product admin image popup by overriding the gallery.phtml. Created the custom js mixin to the product-gallery.js requirejs-config.js (path - Ayakil/ProcessImage/view/...
Mujahidh's user avatar
  • 2,791
1 vote
6 answers
127 views

Dropdown Set tax on product page

I'm working on a dropdown where user can select tax. So I edited addtocart.phtml to put my custom code: I've added an ajax call but I'm stuck how set product tax from 10% to 22% Can anyone help me? ...
Petacchi's user avatar
1 vote
2 answers
294 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
0 answers
99 views

Strange AJAX error in Magento 2.4

I developed a module for Magento 2.4 that consumes an API with multiple endpoints and one of them is returning the response as JSON. If I create an AJAX call, the response I will get on the desktop ...
iupaem's user avatar
  • 41
1 vote
0 answers
23 views

Pass value from checkout to some backend method (Magento 2.4)

Every time I get from external service different number value. I just pass this value by AJAX to Controller: return storage.post( 'somemodule/controller', someNumber, false ).done(function ...
Elf-12's user avatar
  • 11
1 vote
0 answers
34 views

Search not working no suggestions in WELT PEARL THEME "Ajax Auto Complete"

I have just fixed the problem searches in the search field offered no product results It was nothing to do with Pearl Theme, we are quite sure it is because of some legacy attributes that did not work ...
artco's user avatar
  • 53
2 votes
0 answers
30 views

Instead of update cart button, qty should get update on click of Increment And Decrement button

I want to implement Ajax Cart Page : Qty should get changes on click of +/- button instead of update cart button I didn't find any article or any module to achieve this. as qty increment(+) and ...
pranav kolle's user avatar
0 votes
2 answers
310 views

What is wrong in my ajax url?

I have written the following code the js $.ajax({ showLoader: true, cache: false, url: url.build('multiplecustomer/account/Logout'), type: "POST", }).done(function (data) { ...
Mohmad Ashik M A's user avatar
0 votes
1 answer
156 views

what is the correct way to add ajax url?

My controller file is Vendor/MultipleCustomerAccount/Controller/Account/LogoutPost.php what should be the ajax url?
Mohmad Ashik M A's user avatar
0 votes
1 answer
324 views

Magento 2.4.4 Change shipping method when cart value changes by adding quantity

I am having a bit of a issue figuring out the correct method to implement this. I am using OneStepCheckout on my site with free delivery for minimum cart value. When customers add product to their ...
rohit's user avatar
  • 11
2 votes
0 answers
24 views

I have to add loader inside return pickupLocationsService (till get result from server side)

/** Copyright © Magento, Inc. All rights reserved. See COPYING.txt for license details. */ define([ 'jquery', 'underscore', 'uiComponent', 'uiRegistry', 'Magento_Ui/js/modal/modal', '...
K-N's user avatar
  • 45
0 votes
1 answer
749 views

Send Custom Data to Controller

I am new to magento 2. I want to send the day and time option selected by user at checkout to my Controller. When the user selects a day and time slot from the dropdown, it gets the value but I do not ...
Muhammad Muiz Ather's user avatar
0 votes
2 answers
656 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
  • 705
0 votes
0 answers
136 views

Magento 2 - Owl Carousel

I am adding the slides in owl carousel dynamically but it is not working fine when I try to remove them some of the properties of owl carousel won't work at all like margin, lazyload nav etc , ...
Syed Hassan Zamir's user avatar
0 votes
1 answer
572 views

messages disappear too fast when updating quantities via an ajax request

I'm trying to update quantities in the shopping cart in Magento 2.3.2 via an ajax request but I'm confused about the error messages. In my code after the ajax request has completed I execute the ...
gabtzi's user avatar
  • 656
0 votes
2 answers
3k views

Magento 2: Open Popup Modal on Button Click in Admin Grid

UPDATED I'm using Magento 2.4, I want to open a popup modal to display some info, currently, when I hit the button I am redirected to phtml file but I want to open a popup on the same page. I have a ...
Partab Saifuddin Zakir's user avatar
0 votes
1 answer
44 views

its my html form I have used Ajax in it. now I need to clear the data in the form after submitting it by pressing the submit button

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> &...
fathima umaima's user avatar
0 votes
1 answer
988 views

Uncaught SyntaxError: Unexpected token < in JSON at position 0

Magento2 Error Uncaught SyntaxError: Unexpected token < in JSON at position 0 in the Ajax response $.get(url, function(data) { $('#load-more-loader').hide(); $('#load-more-product').show(); var ...
Arjun's user avatar
  • 3,576
0 votes
1 answer
145 views

How to add add to cart with ajax to custom phtml

I have to add add to cart button on homepage. I have custom phtml in my own module. I would like this button to work with ajax. Could someone please suggest something?
mrcl's user avatar
  • 37
0 votes
2 answers
102 views

Field number validation

I need to validate a field in a custom form. The field should be not required, and should validate if the content entered in it are numbers. I added the validation on the form which works. What does ...
mrcl's user avatar
  • 37
0 votes
2 answers
22 views

Can't load any data in backend

I've a (random ?) <pre> added in the end of the default json rendering content in backend (for users, products...). I'm sure I didn't touch anything from this part of the website, any ideas ?
Morgan Tartreau's user avatar
0 votes
1 answer
735 views

Load More Produtcs Ajax functionality in magento 2

I want to add Ajax functionality for Loading Products on catalog page. https://prnt.sc/TbgsghHe-gVz I have added the button on the first page . Can anybody help me with the script plz. I want to make ...
Nicola Smith's user avatar
0 votes
1 answer
476 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
0 votes
1 answer
930 views

Emoji is saving as (???????) in the database Magento 2

I added the Emojo library including JS and CSS files. Then it starts to display on the frontend. When I send the Emoji character via ajax. I am getting Emoji in the param request so while saving the ...
Manoj Jarial's user avatar
0 votes
1 answer
169 views

Add pagination in custom module by ajax call

I have developed Custom module in which data retrieving from db perfectly, but i want to show first ten data(10 rows) at first page and at second page display next ten data and so on by Ajax call.
Muhammad Zahoor's user avatar
0 votes
1 answer
2k views

Adding Dynamic Ui Components on select value change

I have a modal where I put a select ui component. I want than when the value of that select is changed I send an Ajax request to one of my controllers search in database an get a json response wich ...
EL Med's user avatar
  • 1
1 vote
2 answers
234 views

Ajax api call doesn't works using onclick returns error 400

So I'm trying to do an API call using Ajax on the Admin page, when I add this API call in onclick attribute, it doesn't work it returns error 400 Bad request, BUT when the API call isn't vinculated at ...
Rafael Fagundes's user avatar
1 vote
1 answer
326 views

Ajax api call returning Bad Request decoding error

I'm trying to do an ajax API call on the admin page, but it returns a Decoding error: \nUnable to unserialize value. Error: Syntax error... $('#button').on('click', function(){ $.ajax({ ...
Rafael Fagundes's user avatar
1 vote
2 answers
878 views

Api call using ajax on admin page returns invalid form key

i'm trying to do an api call using ajax on admin page, but it keeps returning "Invalid form key" <script type="text/javascript"> require([ "jquery" ], function (...
Rafael Fagundes's user avatar
0 votes
1 answer
544 views

Magento 2 - Direct download external file

In Magento 2, I try to force download a pdf file from an external link (I don't have the source file). All I succeed is opening the file in the new browser tab but the direct download doesn't work. Do ...
Fbr's user avatar
  • 157
0 votes
0 answers
964 views

The requested URL was rejected while trying to save the address book using special characters

Steps to Reproduce: Go to the storefront Log in as a customer Go to My Account Now go to Address Book and click on add new address button Fill the address form ( add special characters in mandatory ...
Suthapriya's user avatar
0 votes
1 answer
65 views

How to show a popup when the checkbox is ticked in Magento using ajax

Just needed to add a popup modal when the checkbox is ticked and post the values to the controller.
Praveen C's user avatar
0 votes
1 answer
264 views

Magento 2.4.3 - Reload totals cart after ajax change quantity - shipping costs error

I use this code to reload cart with ajax after quantity changing - $.ajax({ url: form.attr('action'), data: form.serialize(), showLoader: true, success: ...
iskander's user avatar
  • 329
0 votes
1 answer
844 views

How to set data into session with ajax magento 2

How to set data into the session with ajax Magento 2, I want to store price into the session with ajax for when the site is refreshed price gets from the session, not from the database.
NoOn's user avatar
  • 65
0 votes
1 answer
209 views

How to add product price to session with AJAX Magento 2

How to add the product price to session with AJAX Magento 2. Please give me an example of the custom module of this solution.
NoOn's user avatar
  • 65
0 votes
1 answer
24 views

Use AJAX and get the values of text from the Admin Panel

I want to get the values from store->configuration. And print that value in the PDP page using AJAX. The value should be refresh all the time using AJAX.
Jarvis AI's user avatar
0 votes
1 answer
81 views

Magento 2 : What is Purpose of Custom Varnish Synthetic Rule For Customer Ajax Login?

I have a situation where customer ajax login is not working even though the customer submits valid credentials. Instead, the page reloads and the customer is not logged in. To clarify, it DOES work ...
sdaugherty's user avatar
  • 1,229

1
2 3 4 5
17