Skip to main content

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
1 answer
26 views

Admin JS Ajax call in the Controller

I am trying to get the response of my Ajax in the Controller : require(['jquery', 'mage/url', 'mage/cookies'], function ($, url) { 'use strict'; window.updateStatus = function (element) { ...
Rana Zain's user avatar
  • 699
0 votes
1 answer
44 views

Update billing address dropdown in checkout after AJAX call

I implemented the functionality of editing a customer address in checkout using AJAX. Everything works as expected for the shipping address, as it is updated automatically, but I can't figure out how ...
jupa's user avatar
  • 11
0 votes
1 answer
57 views

Magetno 2 how to send the request of place order when user checked on the check box of terms and condtion

I have changed the checkout process into 4 steps Adress Shipping Payment methods and agreement Summary and place order button everything is working fine accept the terms and condition. I have put ...
Harris's user avatar
  • 1
0 votes
0 answers
24 views

Magento 2 - Get qty from ajax response add to cart post parameters

When click in add to cart button in view page product, with ajax response get in checkout/cart/add the qty added, i need this qty value for datalayer push in phtml, i tried getAddToCartPostParams ...
Diego Castro's user avatar
0 votes
0 answers
9 views

AJAX and pure JS API token request break user session

API token request break user session if logged in, but request successful. The result is the same for $.ajax and pure JS fetch Tested on two projects let url = '<?php echo $this->getUrl('...
Max.A's user avatar
  • 117
0 votes
0 answers
10 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
1 vote
1 answer
153 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
170 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
118 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
0 votes
2 answers
239 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
98 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
51 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
1 answer
152 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', [ ...
Sheshadri Ahankari's user avatar
0 votes
1 answer
220 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
103 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,823
1 vote
6 answers
135 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
407 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
110 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 ...
user avatar
1 vote
0 answers
24 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
38 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
34 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
348 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
166 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
452 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
  • 21
2 votes
0 answers
34 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
918 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
826 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
0 answers
164 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
764 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
  • 686
0 votes
2 answers
4k 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
55 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
1k 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,606
0 votes
1 answer
186 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
122 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
23 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's user avatar
  • 945
0 votes
1 answer
960 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
522 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
1k 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
177 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
260 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
364 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
1k 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
610 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
  • 177
0 votes
1 answer
1k 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
88 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
301 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
969 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
223 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

1
2 3 4 5
17