Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
4 views

ajaxExpired problem after php7.3 update

Any thoughts on this would be greatly appreciated….. Since we have updated our production server to php 7.3 (due to magneto's recommendations), we have this weird bug where when loading product pages....
0
votes
1answer
36 views

Magento 2: How to get product by SKU in custom page?

I created a custom page, where users can input SKU of product and after they submit the button, its load product details, like name, image and a configurable option for configurable product. Here is ...
0
votes
2answers
27 views

jquery ajax sort response

I am showing ajax response in select options as below code. I want to sort the select options in alphabetical order of values. Please provide a solution to sort below data on values basis. My data ...
1
vote
1answer
33 views

Magento 2 Adding custom parameter to the ajax url, from the admin grid row issue

I am on the edit page with the following url: https://local.magento/admin/hello_test/shipping/edit/shippingmethod_id/1/key/df70da11cddd2ee1c41aa67a8cbccf6d9403207740547719560dec30a3fd9ceb/ , where I ...
0
votes
0answers
8 views

Uncaught Syntax Error: Unexpected number in JSON at position 2. Why in Magento2?

["092019,082019,072019,062019,052019,042019,032019,022019,012019"] Uncaught SyntaxError: Unexpected number in JSON at position 2 at JSON.parse (<anonymous>) at Object.success (admin.php:667)...
0
votes
0answers
21 views

How To Customize Newsletter PHTML? [closed]

I used an extension but I don't know how to customize its phtml, extension send's ajax based newsletter subscription request... /app/code/Vendor/Module/view/frontend/layout/default.xml <?xml ...
0
votes
1answer
37 views

The file was not uploaded in Magento 2

I'm trying to save the attachment file in my custom module using $.ajax({}) request. But it's not working for me. For these, I tried the below code. In cart page having below code. <dl class="...
0
votes
0answers
9 views

Magento 2 Resize and draggable modal popup

I want to open a popup with an external site using iframe when a custom link is clicked in addtocart.phtml. I am facing three issues 1> Iframe gets loaded as soon as external site url is dynamically ...
0
votes
1answer
53 views

Magento 2 - Call Ajax controller on click of place order?

I've set up the JS, and controller and checkout.html I need to call the controller with ajax to getPrice() method. My controller name is GetAjax.php and here is the controller code. <?php ...
0
votes
0answers
19 views

How i can prevent Default Action in Magento 2

In Magento 2 I want to Override Default Action on Add to WishList I have tried e.preventDefaults() but i think it only override Href Actions Here is My Code require(['jquery', 'mage/url', '...
0
votes
0answers
19 views

Clear cache vs Ajax

I need to create Magento 2 extension that will be adding some content (information) to products on category and product page, that information will update depending on the configuration of extension (...
0
votes
0answers
12 views

magento1.9, adminhtml, request ajax return 404

i am calling to ajax, when the user entered the data in input, but it constantly returns 404 status my code on my phtml file <script> $j(document).ready(function(){ var typingTimer;...
0
votes
0answers
19 views

Magento1.9 How to update quantity on cart page ajax based

I am using Mangeto 1.9 and in cart page when I update qty same reflects on mini cart using ajax based work and if I update cart item button click than work same ajax based.
1
vote
2answers
35 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
13 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
60 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
38 views

Magento 2 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
28 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') ...
1
vote
1answer
45 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
22 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
46 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
44 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
64 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
17 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
45 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
42 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
44 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
15 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
17 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
16 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
17 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
37 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
48 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
18 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
72 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
59 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
434 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
31 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
40 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
22 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
37 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
28 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
55 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
28 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"> <...