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
2 answers
62 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
26 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
37 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
16 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
48 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
  • 173
0 votes
1 answer
80 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
29 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
  • 351
0 votes
0 answers
27 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,103
0 votes
0 answers
28 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,671
0 votes
6 answers
109 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
0 votes
0 answers
37 views

magento 2.4 work with requests in aroundExecute()

I have a magento ajax execute method that gets parameters from the ajax requests, calls the magento objects using those parameters, then return a json response, something like this: $credentials = $...
Lou Nik's user avatar
  • 351
1 vote
2 answers
193 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
86 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
  • 31
1 vote
0 answers
19 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
26 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
  • 43
1 vote
0 answers
28 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
237 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
125 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
218 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
1 vote
0 answers
20 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
  • 35
0 votes
1 answer
615 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
547 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
  • 685
0 votes
0 answers
112 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
449 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
  • 626
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
35 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
826 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,526
0 votes
1 answer
131 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
94 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
528 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
402 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
770 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
154 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
1k 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
222 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
282 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
760 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
432 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
  • 147
0 votes
0 answers
795 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
51 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
252 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
  • 327
0 votes
1 answer
740 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
198 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
21 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
75 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,189
0 votes
2 answers
192 views

How to run ajax in certain time interval in Magento2

I have added ajax to show a text which is fetched from my scope config(The value is given in the store->configuration). In my controller I am getting the value using scope config and used echo in ...
Jarvis AI's user avatar
0 votes
2 answers
450 views

can't send data from ajax to controller

in my case I have a controller and an Ajax data sending, but when I check the code the AJAX doesn't send anything and Magento doesn't enter to my controller, is it a problem of routing or what, this ...
coding mv's user avatar
  • 129
0 votes
1 answer
45 views

Change minisearch bar input width on hover

I am trying to change the search bar input width when it expands on hover. <div class="search-wrapper"> <div class="search-content block block-search" id="search-...
totneschap's user avatar
0 votes
1 answer
198 views

How to force reviews to appear on page load? trigger processReviews

I'm trying to make customer reviews appear on the PDP page without clicking on the reviews button. On reviews tab click, ajax request is being sent to the server and I want to send this request on ...
Hgresa's user avatar
  • 11

1
2 3 4 5
16