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

How can I display related products in the minicart? - Magento2

In Magento Commerce Cloud (Magento 2), I am trying to display related products in the Minicart after a user adds an item to the cart. The specific issue is that my code works in the Docker local ...
0
votes
1answer
48 views

Magento2 - How to clear data from jQuery modal popup after closing modal?

Here am using jQuery popup in my .phtml file on the first run it sending data properly, on send time it fetching old data as-swell as new data. So how to prevent this condition. Code: <div ...
0
votes
1answer
21 views

How to get already selected Shipping method and shipping Carrier using ajax in Checkout page Magento 2?

Basically I am trying to get the pre-selected shipping method and shipping carrier on the page load. Also it should capture the shipping method and shipping carrier as soon as the customer selects ...
0
votes
0answers
13 views

Magento2 AJAX JS Fetch Display

I have a code by which I add information to a database and display it on the same page where the form is (using AJAX), but after refreshing the page, the data disappears (in the database they are) How ...
0
votes
2answers
38 views

how to refresh a part of the page when configurable variation is selected in magento 2.3

I want to reload a div section on the product detail page of the configurable product when the configurable variation is selected. How do I achieve that? require(['jquery','jquery/ui'],function($){ ...
0
votes
2answers
114 views

AJAX IN MAGENTO2.HOW TO ADD information from form IN DATABASE?

I already have a form and controller action, that send data without using ajax.How to do it with AJAX? I would appreciate your help! view/frontend/templates/reviews.phtml <form action="<?...
1
vote
0answers
28 views

Slick slider with ajax not appending in slider

I am trying to follow this answer but for me its not working perfectly I created custom phtml & block which will show the product slick slider, till time is working perfectly, but after the use ...
0
votes
0answers
6 views

Multiple Private Content values - multiple blocks in one module

I need to access two dynamic pieces of information in a module. Each piece of data is rendered into separate blocks on the page, and I need the afterRender event to fire when the second block is ...
1
vote
1answer
33 views

Upload image or files in custom module from front-end with ajax magento 2

I want to upload image from frontend custom module using ajax method. Filepath : app/code/Chirag/Userform/view/frontend/templates/insert.phtml <?php $blockObj= $block->getLayout()->...
0
votes
0answers
21 views

Unable to access controller using AJAX in magento 2

I Have a very basic ajax function, where i want to access to the controller using AJAX.Below is the code. <script type="text/javascript"> require(['jquery', 'Magento_Customer/js/customer-data', ...
1
vote
0answers
11 views

Magento 2 - Add Product Search functionality using Ajax in Custom Admin Form

I had created an admin form in Magento 2. I had taken a text field for the product search. I want to search for a product by entering Product Name / SKU / ID in the text field. How could I do it? I ...
0
votes
0answers
10 views

How to reload order summary section on payment page?

I have custom input on payment page: URL..checkout/#payment and submit button. When click on button - we call the function which should add another field to order summary .js file: return storage....
0
votes
0answers
55 views

How to add options to multiselect after ajax?

In Magento 2.3, I have extended the UISelect components script. I am using the search field to get the options based on the input. I get the response, but how can I attach it to the select dropdown ...
0
votes
0answers
43 views

Show error on Ajax Response in Admin Config Field Magento 2

I have created some fields on Admin Configuration like below. I am sending an Ajax on Focus out of this field and populating some other fields based on the Ajax Response. What I want is to show an ...
0
votes
0answers
15 views

Magento 2 admin Ajax call failed bad request

I'm using custom js in Product Add/Edit page of magento 2 admin. I need to make a ajax call when the product save button clicked. I used the below code. require(['jquery', 'domReady!'], function ($) {...
0
votes
0answers
19 views

Getting 500 internal server on product details page

Everyone I'm getting 500 internal error whenever I open any product link on any browser or same browser. But if i open the product from the category it's opening well. Sorry I've to blur the domain ...
2
votes
1answer
78 views

plus, minus in cart page

I have the following design below, in which it has plus and minus on the cart page and mini cart page. I have achieved it in minicart but couldn't achieve it on the cart page. can someone help to ...
0
votes
0answers
49 views

Magento 2: How to Pass popup modal form data to the custom controller?

I want to redirect to the custom controller on the Continue button in the popup modal form. Vendor/Module/etc/frontend/routes.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3....
0
votes
0answers
21 views

Magento InfiniteScroll not working with AheadWorks Layered Navigation

I am using https://github.com/Strategery-Inc/Magento-InfiniteScroll extesion for infinite scroll with porto + AheadWorks Layered Navigation It's stops working when we apply any sorting? Do you have ...
0
votes
1answer
71 views

Plus, Minus, automatic cart update on maagento 2.3.3

I have normal magento 2.3.3 which has the default mini cart as shown below. And in the above pic by default the quantity as to be manually entered and updated the cart on click. But I want a mini ...
2
votes
2answers
48 views

Cart page update with AJAX using increment/decrements button

I am trying to update cart without refreshing when someone clicks on-increment or decrement button by creating custom module. I override the cart/item/default.xml and add button, script to send ...
0
votes
0answers
34 views

magneto2 No 'Access-Control-Allow-Origin' header is present on the requested resource

i am creating one payment module, i want to send data to api but when ajax call from js file it give error "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote ...
0
votes
1answer
19 views

Cannot get JSON response from custom controller

I have seen several examples where JSON is returned from a custom controller. I have tried many different ways and every time my controller always returns HTML. I do not know why it does not work. My ...
1
vote
0answers
18 views

Magento 2: How to show loader while customer-data is loading from server?

define([ 'Magento_Ui/js/form/form', 'Magento_Customer/js/customer-data' ], function (Component, customerData) { 'use strict'; return Component.extend({ isLoggedIn: function () {...
1
vote
0answers
24 views

Magento 2 : Frontend load ajax page custom product collection with search set total items

Facing issue with frontend load ajax page custom product collection with search set total items 1 in Magento 2.
2
votes
0answers
18 views

How to get the shipping rates via AJAX?

When I update the product qty in the cart page I want to have the shipping rates estimated again via AJAX, how could I call this JS method in order to do that?
1
vote
1answer
26 views

Magento2: How to send email to all admin users?

I have listed all the reviews of the merchant in the frontend. I want to remove the particular review from the list. So I have added a remove request button. When a merchant clicks on a button an ...
0
votes
0answers
29 views

How can I Override behavior product on home page or Widgets

I am trying to add Ajax add to wishlist functionality on in Magento I have overridden an other places like product view, category view now I want to add same functionality on home page products (...
0
votes
0answers
23 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....
2
votes
1answer
86 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
105 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 ...
2
votes
1answer
92 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
270 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
1answer
46 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
31 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
115 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
62 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
22 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
13 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
26 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
189 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
25 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
162 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
47 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
37 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
96 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
33 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
40 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
52 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
73 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 ...

1 2 3 4 5 15