Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
0answers
29 views

Load a ui component with ajax within admin tab

Using the below method to attempt to load a uicomponent over ajax into a tab within custom admin page shows a loading spinner which never completely loads. XML for controller added buttons to the ...
1
vote
0answers
17 views

Magento2: Issue with load more products

We have any issue with load more products (no load photo product). Please on down page click "load more". https://gerris.pl/new-arrivals Any solution?
3
votes
1answer
41 views

Magento 2 create ajax request from out of magento

I wanna create Ajax request from empty HTML with jQuery. I do like this $.ajax({ url: "http://****.com/rest/V1/integration/admin/token?username=***&password=****", type: "POST", ...
0
votes
0answers
10 views

Incrementing cart total price with ajax but total price is not displaying at correct place

When trying to update cart......total price is not showing at right place. I am using below mentioned code : <script> function postStuff(){ // Create our XMLHttpRequest object var hr = new ...
0
votes
0answers
24 views

Magento 2.2 Ajax not working on second time in category page

My site was working fine, suddenly the ajax on category pages is not working on second time. On first time it works fine, whether it is pagination or layered navigation but on second time it doesn't ...
1
vote
3answers
155 views

Quote id is empty when inserting multiple records into cart in magento2

I am adding product to cart from ajax by passing product id Here is my controller code. use Magento\Framework\Controller\ResultFactory; use Magento\Framework\App\Action\Action; use Magento\...
1
vote
1answer
31 views

How to use ajax in alert modal magento 2?

I have this ajax code and i want to use alert modal of magento 2. <script> require(['jquery'],function($){ $(document).ready(function() { $("#vendor_search").on('click',...
4
votes
2answers
218 views

Magento 2 - Slick slider function not working

Slick slider function is not working after ajax response, This is the order of my code. Firstly I got a product collection response, Then I wrote a slick slider function. but slider function is not ...
1
vote
1answer
19 views

In Magento 2, Why it is not refreshing shipping methods after State field select

In Magento 2, after Country filed select then shipping methods refreshing automatically. But why it is not refreshing shipping methods after State field select and how to apply refresh to state field ...
1
vote
0answers
28 views

Filter product with Ajax and return Json Array from a controller to show in a phtml file

Is it possible to return an array from a controller or from a block function to the phtml file? <?php namespace Mnuhell\FormSearchAttributes\Controller\Index; use Magento\Framework\App\Action\...
2
votes
0answers
18 views

Magento 2.2: Ajax login is not working in Mozilla and IE

I added ajax login form in my custom theme and it's working fine in chrome but in Mozilla when I try to log in it redirects me to the same page. I am unable to log in. Here is my ajax code: <...
0
votes
0answers
22 views

Magento Show Payment Method Validation

I'm working on a magento 1.9 payment gateway extension. It have a little form on payment method step and when we fill and clickon next button it validate after validate it call to this function /...
0
votes
0answers
25 views

How to make words translatable in js file , Magento 1.9

I have a problem with translation in Magento 1.9. I want to translate the "Search:" word, but have no idea how. As you can see the "Search:" word isn't in the red frame. In project i found one place ...
0
votes
0answers
14 views

Magento 2 Newsletter Subscription via Ajax

I've installed the module to subscribe to the newsletter via ajax. Without using the javascript file I get a new page with the message it's okay. When I make use of the javascript file, I get the ...
0
votes
0answers
27 views

Prevent Ajax calls on Homepage

What is the purpose of these ajax calls and how to prevent these Ajax calls on magento 2 homepage, or atleast minimize their execution time because they are taking load time of around 3-4 secs on my ...
2
votes
2answers
51 views

Magento 2 secret key problem

I've a form that performs an Ajax call to a controller, but the response always is You entered an invalid Secret Key. Please refresh the page. PereiraTech/Faturamento/Controller/Adminhtml/Ac/Index....
1
vote
0answers
24 views

AJAX call returns the same page html

I have a module that I need to do a php GET action and get some informations from php file. The problem is that the returned value is the Dashboard html. Faturamento/Controller/Adminhtml/Ac/Index....
0
votes
0answers
28 views

Magento 2 Change Store View using Ajax

I want to change the store-view according to user-address in checkout. If store view does not change by using ajax, then can we change the cart summary.
0
votes
1answer
43 views

How to Fetch results from server using JQuery AJAX? on the basis of Drop-down Condition

I have two conditions, if two conditions are matching the given value should display. I am using input value as Drop down. If the value of two drop-downs matched i need to display my value on same ...
0
votes
0answers
52 views

AJAX login/register with Amasty_Fpc does not update full page cache

When you log in with an AJAX request, the full page cache is not updated when using Amasty_Fpc. This happens only on the page on which user log in. The problem is observed with many modules (for ...
0
votes
1answer
27 views

Magento 1.9.2. - Validate email if already exist with ajax without custom module

Before registering I would like to validate the email field entered by the user to know if it exists in the database. This is my code: <input type="text" name="emailreg" value="" id="emailPreReg" ...
0
votes
1answer
49 views

Magento2 update cart on qty change event plugin created

My website i have updatecart on qty btn change event call so with ajax how to created a plugin for this.
1
vote
1answer
28 views

Magento 2.2.7 - Reload totals cart using Ajax

I have tried below code var deferred = $.Deferred(); getTotalsAction([], deferred); But no luck and instead below error i am facing Uncaught TypeError: Cannot read property '...
1
vote
0answers
39 views

Magento 2.3 Ajax Breadcrumb Product-Detail

When the Product-Detail Page is loaded, on Magento 2.3 the Breadcrumb is loaded via an Ajax request. This causes a large delay, because of the amount of requests on the product page. How could I ...
1
vote
0answers
47 views

Ajax call always returns in error from controller Magento 2

From my controller, I return a JSON data to my Ajax call but it always goes in the error section, even when it's not an error. jQuery.ajax({ type: 'POST', url: '/yxcustomer/index/...
1
vote
0answers
36 views

Show notification message after ajax call

I have my own controller for a customer address delete, so at the end of the controller, I send a notification message to notify the user. try{ $this->_addressRepository->deleteById($...
1
vote
0answers
41 views

Magento2 Checkout cart automatically updates when qty changes with ajax

Magento2 checkout cart page Please ensure when quantities are changed that the cart automatically updates. Some customers might change the quantity and if they dont click update cart they might move ...
4
votes
0answers
36 views

How to create a basic progress bar with ajax, when il click add to cart in Magento 2?

I try to make a basic progress bar with ajax , when I click button add to cart, but I don't know how catch the xhr on console,to put on alert() or prepend()function I follow a video example in ...
3
votes
0answers
31 views

Adding a configurable item to cart via ajax

I've inherited a project which lists configurable products in the catalog view, as well as listing the simple products attached to that configurable product. For example; Configurable Product: ...
1
vote
0answers
31 views

Show magento loader ajax

how can I show the loader only on my div and not on the body during an ajax call ? Can't make it work. Here's my code, I have the show loader and the context but I'm missing something ? <div id="...
0
votes
0answers
53 views

Magento 2 401 Ajax Post Request

So I have the following AJAX Post request within vendor/MyModule/view/frontend/templates: let controllerUrl = "<?php echo $block->getUrl('MyModule/index/GetDates'); ?>"; $.post(...
2
votes
1answer
22 views

Magento2 ajaxsuite- ajax login

I want to show Ajax suit modules, Ajax login popup on cart page when press checkout button. right now, I used $('.modals-wrapper .popup-authentication').addClass("_show") and it shows magento2 ...
1
vote
1answer
34 views

Magento 2 Ajax call not working

I am trying to update whole minicart content but my ajax call is not working $.ajax({ url: "my_controller_url", type: "POST", success: function (result) { $(".minicart").html(...
0
votes
2answers
231 views

Magento 2 layered navigation Ajax jquery problem

I am having this problem from Magento 2.2.5 and when upgraded to Magento 2.3 also. I use custom template Layered navigation with Ajax isn't working. I use Amasty one It just refreshes the page and ...
0
votes
1answer
24 views

Magento 2 AJAX Post to another module's controller

I was wondering if it were possible to send an AJAX Post over to a controller contained within a custom module I have created. The reason for doing this is because I want to separate my logic out from ...
2
votes
1answer
45 views

Load a jQuery script after fully loading the page

I'm struggeling with this. My jQuery script works fin with every of my input, but not with the input loaded by AJAX, such as the mini-cart input. The code (and the css) is used to do this : add to ...
2
votes
0answers
24 views

Amazon Payment agreement checkbox not working

Checkbox for agree not work currently and always show this message. I think does this is javascript or Ajax conflict. Please agree to all the terms and conditions before placing the order.
1
vote
1answer
76 views

Magento 2 Minicart Ajax update

I need to update mini cart without the need to click on update button (just clicking on +/- button) I can't find module or code to do that!
1
vote
1answer
57 views

Database-Based & Redis-Based Customer-Session Empty Data Issue in Magento 2 Using 2 Web-Servers

I am facing a problem in getting session data in Magento 2, when I deploy my Build on 2 Web-Servers. I am facing no issue on Single Web-Server. Problem Details I am setting some data in session, in ...
1
vote
0answers
281 views

Expected to start loader but did not find one in the dom - Ajax Call Magento 2

I have implemented Ajax call to add product to cart, which is somewhat like below: $.ajax({ showLoader: true, url: SERVER_URL+'common/custompurchase/addtocart', data: data, type: "...
1
vote
0answers
25 views

how to edit quantity in cart with ajax magento 2?

I'd like to know how to change the quantity of a product on front using ajax ? When I change the quantity in the input and them click on the small pencil to apply modification, I'm redirected to the ...
0
votes
0answers
56 views

Ajax call on controller and get collection in grid

I am creating a functionality on my custom phtml. I want simple ajax call on my controller and get product grid in response. to ajax call I used this: require(['jquery'], function($){ $.ajax({ ...
1
vote
1answer
32 views

save-data-using-sales-order-model

I am sending ajax request to save data in my custom field in sales_order table , It saves data successfully in case of exit, but not with out exit, any suggestion //Not working public function ...
0
votes
1answer
45 views

What is the ajax url if

help, what will be the ajax url if method is in: /app/code/core/Mage/Adminhtml/controllers/CmsBlockController.php ?
0
votes
0answers
35 views

How to make an AJAX button on an admin grid container?

I have my admin grid container working and I have added a button to the top right of the page using this: class My_Class extends Mage_Adminhtml_Block_Widget_Grid_Container { public function ...
1
vote
1answer
118 views

How to re init ajax add to cart inside the response in magento2

I have installed third-party module Infinite scroll for the lazy load(Lof_Ajaxscroll). The problem I am facing is Once the page loads new HTML content is generated from ajax. So add to cart is not ...
1
vote
2answers
26 views

Magento 2 custom ajax request

In my custom module have a custom ajax request for sending selected date (datepicker) to controller and found this exception when access controller Block1 exception(s): Exception #0 (...
0
votes
2answers
214 views

Add multiple items to cart in Magento2

I am implementing add to cart functionality from ajax using product id. This is my code of template file <tr class="border_bottom child-items selected"> <td >...
0
votes
0answers
36 views

Magento 1.9.2. - Update breadcrumb with ajax filter category

I created a filter in my layered navigation that covers all the categories of my site. The effect with ajax seems to work correctly and the contents update just like other normal filters. The problem ...
0
votes
0answers
11 views

Magento 2 user field validation using an API

In a dedicated data table where we stored customer's privilege card number in order to validate them with users that they enter to a field called "privilege card no" On such an occasion I'll have to ...