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
0answers
7 views

Send data from input checked to controller using ajax in magento 1.x

I want to use ajax to send data from the table to the controller SaveController. The PICK-UP ADDRESS is the required field. How to check when the PICK-UP ADDRESS has data, it will send that line ...
0
votes
1answer
21 views

Dependent dropdowns in Magento 2 Frontend

How can I create a pair of dropdowns such that when one is selected, the options for the other one are updated? PHTML <?php $stateList = $block->getStates(); ?> <div> &...
0
votes
0answers
44 views

Get Data from Controller

I'm trying to create some type of search method for customers where they select the product's brand they want to search and then, if they want, they can also select the category they want (if there ...
0
votes
2answers
36 views

Magento 2 : Exception #0 (InvalidArgumentException): Invalid return type

Exception Exception #0 (InvalidArgumentException): Invalid return type #0 /var/www/html/magento/folder/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch() ...
0
votes
0answers
14 views

Ajax call on product view page and that ajax calls on page load in magenro 2

I have different ajax call on product view page and that ajax calls on page load. when I try to do add to cart it waits for that ajax calls to be completed first before process the add to cart. so ...
2
votes
1answer
45 views

Get current Logged user Wishlist products id in Ajax Call Magento 2.3

I Want currently logged user all wishlist products id's json array via ajax call ?
0
votes
1answer
29 views

Magento 2 How to send data to Controller with Ajax from a template?

I'm trying to send some data to my Controller from a template.html using Ajax, so my checkout page does not refresh when I send a custom form, but I don't get anything, the information is an extra ...
0
votes
0answers
21 views

Magento 2: Validating input in the admin before submit

Is there a way in which I can add an ajax call to an admin field so I can validate the data against an external system? For example, if an admin enters an SKU I want to validate against that the ...
1
vote
1answer
66 views

How to refresh shipping and billing address after checkout page load just like shipping Rates refresh using Knockout Js magento 2

Hi guys, i want to refresh shipping and billing address after checkout page load using Knockout Js magento 2. If you guys have any idea please guide me. Please check the code i tried below ...
2
votes
0answers
19 views

Magento 2 - Add to cart not working after products loaded by ajax

I have loaded products collection using ajax. My controller URL is something like this: www.example.com/whoboughtthisproduct/index/getproducts Now products are loading properly, but when user click ...
2
votes
0answers
28 views

in custom module ajax-loading form translations not working magento 2.3

in ajax-loading form Change English it to italiano and it works but italiano to English not working proper. once transalte to italiano then switch to english store not transalte to english ...
0
votes
0answers
17 views

Firefox android on use desktop loading mobile theme instead of desktop on ajax request

Basically, I have 2 theme desktop and mobile using Magento ver 1.9.1.0. The problem currently is when the user using firefox on android and use request desktop sites, website turn into the desktop ...
0
votes
1answer
15 views

Form which i getting from ajax not working in admin panel Magento 2

I have a form in the content of the ajax response, but when I submit the form, the action does'nt work (redirected to dashboard), form action same page, but when I use this form without Ajax, then it ...
0
votes
0answers
17 views

Magento 2 Custom Module - Product Selector

I wonder if you can help me out. I've just created a customer Ajax module for a product selector. It's been working fine locally, I've just pushed it LIVE and unfortunatley it's now stopped working. ...
1
vote
0answers
28 views

magento-2 ajax redirect response Status Code: 302 Found

below is shopping-cart.js file to increment/and decrement of product quantity with update subtotal, is working fine but getting Status Code: 302 Found, how can I solve it? define([ 'jquery',...
2
votes
1answer
29 views

Magento 2 Product Filter By Category & Multiple Product Attributes

I'm currently building a custom product filter via Ajax. I've got the basics working but now I'm trying to filter via category and a specific product attribute. Here is my code $collection = $this-&...
0
votes
1answer
25 views

Magento 2 - First Module - AJAX

I'm creating my first module which has been going well, I've managed to create the controller, block and route and can access the page. I'm now trying to perform an ajax query and return some product ...
2
votes
2answers
39 views

How to get Current Module and Full Action Name in ajax controller

I need Full Action Name in Ajax Controller Magento 2. protected $request; public function __construct( ... \Magento\Framework\App\Request\Http $request ) { $this->request = $request; }...
0
votes
0answers
18 views

How to get admin base Url or ajax request to any controller in magento2?

I have not any phtml file to set base url. How can i call ajax form admin side in customjs magento2 form.xml <field name="type"> <argument name="data" xsi:type="array"> <...
1
vote
0answers
51 views

Magento 2 How to dynamically change custom attributes when click on the color attributes in the configurable product?

I need dynamically change custom attribute on the configurable page when I click to the swatch color attribute. On this purpose I programmatically created custom attributes with options on the admin ...
2
votes
0answers
19 views

Magento 1.x - Ajax auto choose product

I want after I have pasted sku or name product into the input seach, it will automatically check and notify. I am currently using autoComplete jQuery. But the problem is that if it doesn't show drop ...
0
votes
0answers
28 views

Magento2: How to get product collection with pagination wise using ajax?

I want to get the product collection using ajax with pagination. I have implement the product collection using ajax but pagination is not working.
0
votes
2answers
51 views

How to add ajax increment and decrement button in minicart magento2?

I have follow many article but i don't get proper answer please help me, provide me step by step.
2
votes
0answers
17 views

Magento2: How to implement simple Ajax demo for Product Collection?

I want to display product using ajax method on button click same page. How is it possible in Magento?
1
vote
0answers
169 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 ...
0
votes
0answers
32 views

Edit in Cart using AJAX with model popup to update qty and options of product

From the cart page, if we want to edit and change production option and qty then there is an option to edit that product from cart page. If we click on the edit button then it will take me to this ...
1
vote
0answers
23 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
79 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
1answer
56 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
281 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
43 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
345 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
82 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
38 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
24 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
32 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
27 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
67 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
34 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
80 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
27 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
53 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
63 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
56 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
44 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
74 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
39 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 '...
2
votes
0answers
103 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
152 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/...