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.

0
votes
0answers
25 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
42 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
23 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
25 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
34 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
49 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
25 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
40 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
21 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
19 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
26 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
19 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
29 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
33 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
30 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
19 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
40 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
21 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
27 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
119 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
22 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
42 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
23 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
56 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
50 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
175 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
22 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
45 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
31 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
29 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
83 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
25 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
130 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
30 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
10 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 ...
0
votes
2answers
37 views

Calling M2 REST API from browser for anonymous users

I'm trying to call REST endpoints from the browser. Initially, I'd like to be able to fetch product information. It looks like session-based authorization is what I'm after. I started by grabbing a ...
0
votes
0answers
28 views

Magento Amasty FPC and Dynamic Content

We have Amasty FPC and want to use their hole punch method for Dynamic Content but I’m a little confused on the XML configuration file. Their is two methods which have the block exclusions - one is ...
0
votes
2answers
108 views

How to create AJAX action for POST requests in Magento 2.3?

How to create a controller action that can be requested by POST properly in own custom payment module in Magento 2.3? How to create a parent class that will be extended by classes corresponding to ...
0
votes
0answers
83 views

Category page custom category filter magento2

I have loaded custom template before the product list in category list page. this is my block file Vendor/Module/Block/Category.php <?php namespace Vendor\Module\Block; class Category extends \...
1
vote
0answers
148 views

Populate sub category drop down based on category selected magento2

I have used below code to populate sub categories in other dropdown once the parent category is selected. Used this code in my template file. app/code/Vendor/Module/view/frontend/template/category....
0
votes
0answers
18 views

magento 2 getting product grid on passing category id in frontend

Is there a way i can get ajax response of product grid on passing category id. On a custom page i want to pass category id as ajax so that it can return product collection with image,title etc how it ...
2
votes
1answer
153 views

Generation does not exist

I have this code for a AJAX call: Controller/Data/Get.php <?php namespace Vendor\Module\Controller\Data; class Get extends \Magento\Framework\App\Action\Action { protected $...
1
vote
0answers
27 views

Forms not working with array fields

Don't know something has gone wrong. Suddenly on my magento (1.9) site forms which have array fields are not working. for example :- <input type="text" name="inputfield['first']" id="...
0
votes
2answers
98 views

Invalid Return Type in Ajax Call

I made an ajax script to (at the moment) simply return some HTML to a select. My function looks like this: $.ajax({ showLoader: true, data: {val: inputVal}, /*dataType: 'json', (un)...
1
vote
1answer
31 views

Get breadcrumb in Controller Action

I need to get the breadcrumb in the controller action because I am using the cache modules(FPC and another system externally). It cached the breadcrumb in the frontend page. With that, I would use ...
0
votes
1answer
18 views

I wish to add custom section in product detail page in magento 2

How to add custom button in product page,while clicking that button it needs to show custom form in a popup ?
0
votes
0answers
27 views

I want to update qty on checkout page using ajax without page load in magento1

When I update my qty page reload I am using this code qty update but when I refresh page /* here is mu code */ jQuery(document).ready(function(){ jQuery('.btn-update').on('click', ...
0
votes
2answers
93 views

Unable to call function in ajax success in magento2

I have found below error: > Uncaught TypeError: Cannot read property 'set' of undefined. Code: <script> require(['jquery','Magento_Customer/js/customer-data','domReady!'], function ($, ...
0
votes
1answer
193 views

Magento 2 Update cart automatically on carty quantity update gives error “Mismatched anonymous define() module”

I have done everything mentioned in this post, however, it gives me an error in console: require.js:166 Uncaught Error: Mismatched anonymous define() module: function ($, getTotalsAction, ...