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
1
vote
2answers
20 views

Invalid form key while making an ajax request in Admin panel in Magento 2.3

I have Magento 2.3 installed, and I'm trying to create a small form in sales_order_view.xml and saving the form using ajax. Following is the code XYZ/Sales/view/adminhtml/layout/sales_order_view....
0
votes
0answers
10 views

Uncaught ReferenceError: ConfigurableMediaImages is not defined error Magento 1.9.4.2

I have been looking to incorporate infinite scrolling into my site. So, when I came across the InfiniteScroll Magento Plugin by Strategery-Inc I was excited to give it a go. However, I get the error: ...
0
votes
1answer
33 views

Magento 2 - 401 controller in magento admin

I currently have a module that adds a field to the admin cms page. I've written a controller and on input change I want to ajax this controller. This is the simple controller I added to start testing:...
0
votes
3answers
30 views

admin url using Ajax

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $configLoader = $objectManager->get('\Magento\Backend\Model\UrlInterface'); $url = $configLoader->getUrl('testing/queue/...
0
votes
1answer
26 views

Error when add product to cart in magento 1

I installed a module ajax add to cart and when click add to cart, it show error Refused to execute script from 'http://.../ajaxcartsuper/ajaxcart/delete/id/...' because its MIME type ('text/html') ...
0
votes
0answers
11 views

How to an click event on Column of Admin Grid

In my Admin Grid, I want to add Jquery click event on the delete button as shown in picture bellow on delete button click I want to add an ajax request to my controller I added this picture and using ...
0
votes
1answer
27 views

Magento 2 pass data from template phtml to js file

I want to call an ajax function on a button click. All other things are working fine. But I can't read the parameter which is passed to the js. How can I do it? Here is my code. Phtml file <...
0
votes
2answers
21 views

Get Model Data in ajax request

I am making an ajax request in my module to grab some custom CRUD data to populate a select box on the fly. I have a working ajax request and controller Javascript define(["jquery"], function($){ ...
0
votes
0answers
15 views

Magento 1.9 catalog layered filter via ajax

How can we get the filtered data via ajax without using any plugin? I have created a module for ajax filtering. But don't know how to render the data through catalog/product/list.phtml. Does anyone ...
3
votes
1answer
44 views

Magento 2: Ajax without effect

My problem is as follow, my script except ajax in working (no problem with giving value or console.log) but my ajax doesn't give me the result expected (remove hidden class and fill a drop list with ...
0
votes
0answers
38 views

Magento2: Save data of popup form in database using ajax in controller

I set button in form popup in product-detail page in addtocart.phtml in my custom module. But form submit button is not working and data not passed to controller so not saved in the database Here is ...
0
votes
2answers
61 views

Magento 2: Calling module script, controller, template (app/code/vendor/module) from design (app/design/frontend/vendor)

First of all, I am kind of new in Magento then sorry if my question looks stupid. I would like to use a template, controller, block, and the script from my module (app/code) into the header of my ...
0
votes
1answer
13 views

unexpected SyntaxError from Template/Ajax - Magento 2

I am a newby in Magento, so sorry if my question seem stupid. I have an error SyntaxError: JSON.parse: expected double-quoted property name at line 6 column 17 of the JSON data that I don't ...
3
votes
0answers
42 views

Page getting cached in Magento 2

I am trying to display random products on the homepage. but my page is getting cached and on refresh, same products are displayed. I used AJAX post request also but did not work. Can anybody say how ...
1
vote
1answer
30 views

Using AJAX for displaying Random Products on Home Page

Can any one give me an example of Displaying Random Products on homepage using AJAX in Magento 2.3
0
votes
0answers
23 views

Magento 2 : How to add value to shipping address from

I am facing issue to add Dynamic value (Via Ajax) in shipping address I was trying to do so with JQuery but validations are failing But my text box has dynamic data assigned to it. please find some ...
0
votes
0answers
24 views

Issue with flat catalog table product collection in Magento 1.9

I am facing an issue regarding magento product collection as I have some additional product attribute and use general way to get product collection like: Mage::getModel('catalog/product')->...
0
votes
0answers
14 views

How to save file in directory using ajax post with php in magento 2

I have a Js code in my phtml like below. var data = new FormData(); data.append("data" , "the_text_you_want_to_save"); var xhr = new XMLHttpRequest(); xhr.open( 'post', 'http://mysite/...
0
votes
0answers
16 views

Validate email using MAGENTO 1.9 (not way)

I've been trying several times to validate an email from my website against MAGENTO without success. I know it is possible to use MAGENTO REST API through JAVASCRIPT or maybe a PHP script but THIS IS ...
0
votes
0answers
15 views

Update table after success AJAX in Magento 1.x

Update table after success AJAX in Magento 1.x. I want update table after success AJAX. I can update it, but it work wrong for me. I have a pagination of custom table. When i click number, it load ...
0
votes
0answers
15 views

Ajax html response issue in Magento 1.9

I am facing an issue while getting html response from ajax. My ajax response contains an html element having "onclick" attribute, when I removed the onclick I have got the response else it is showing ...
0
votes
0answers
10 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
27 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
2answers
41 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
15 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
65 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
40 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
245 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 ...
3
votes
0answers
23 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 ...
3
votes
0answers
39 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
18 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
18 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
19 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. ...
2
votes
1answer
34 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
47 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
20 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
101 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
34 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
73 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
20 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
308 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
49 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
27 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
96 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
83 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
374 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\...