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.

5
votes
0answers
1k views

How to add product to wishlist after login by guest customer?

Add to wishlist is being done in AJAX for online customers and the products are successfully added in wishlist. For offline/guests, if they click add to wishlist a pop-up is shown with link to login. ...
4
votes
0answers
36 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
31 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: ...
3
votes
0answers
228 views

How to add a register form inside the login popup during the checkout

I want to add a register form directly inside the login modal during the checkout (instead of the register link that lead to a register customer form page), so that the customer can quickly register ...
3
votes
0answers
77 views

Initialise a Jquery Widget on Demand with Jquery

I have loaded my layered navigation over ajax to speed up my site load. The layered navigation also uses ajax and it's jQuery is normally initialised via RequireJS i believe with the below requireJS ...
3
votes
0answers
149 views

Magento2 : How can use ajax in custom module html file

I have added a template file .html on checkout page in order summary below Totals, In this file I want to add ajax to call my custom module controller and load some content on page. How can I achieve ...
3
votes
0answers
729 views

How to update product quantity on check out page using Ajax in Magento

I want to provide functionality to update product quantity on checkout page of magento. so if user want to update the product quantity he can do it on without reloading checkout page. I want to ...
3
votes
0answers
271 views

Need to create Ajax Category filter

Need to create ajax filter for category. Please help me to create AJAX category filter. I don't want any use extension. My Magento version : 1.9
2
votes
0answers
18 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: <...
2
votes
0answers
24 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.
2
votes
0answers
79 views

Mini Cart Update issue

I am facing mini cart update issue - to replicate the issue you need to browse the site and add a product to the cart - then continue shopping. If you press checkout (instead of continue shopping) the ...
2
votes
0answers
33 views

Need to Initialization js while ajax response magento 2

Need to Initialization js for particular div when the div append ajax response magento 2. i have append the div in ajax response and also i need initialize js for that div. How to do that
2
votes
0answers
93 views

Initialise swatches on product list loaded over ajax

I have noticed that on my infinite scroll the swatches are not showing for products loaded over ajax. I'm guessing that similar to ajax add to cart buttons needing to be initialised the swatch ...
2
votes
0answers
56 views

Show popup when update qty in mini cart using ajax magento

When I update qty in mini cart if qty is greater than the qty of products in stock, I want to show popup "The requested quantity for ...(my product name) is not available." using AJAX. How to do that?...
2
votes
0answers
197 views

Upload image with Ajax in M2

In my custom module i am trying to upload images. I am able to upload images with the help of this link https://webkul.com/blog/how-to-upload-image-in-magento2/ But is there any way where we can ...
2
votes
0answers
93 views

Magento 2 without user login add to cart ajax not working with redis session

I have Issue with Magento version. 2.2.0 with integration of redis session. In my magento 2.2.0 Redis Session is enabled , Now when user is not logged in(Guest User) to the system and try to add the ...
2
votes
0answers
21 views

Advice on most performant approach to get variables once per session

I need to pass deviceType and userState(IL, IN, IA, KS, etc) variables to GTM for marketing purporses and wondering what’s the best way to do it. To calculate deviceType I will use mobiledetect php ...
2
votes
0answers
113 views

How to show magento global message in pop up - Magento 2

I have created an ajaxcart custom plugin but I want to show the global message in which appear behind the ajax pop up.
2
votes
0answers
20 views

Display a custom text at the top of order grid

I have saved AWB no.s in my database and it is alloted according to a particular algorithm. I have specified a range of AWB no.s. From my order grid, I select the orders and allot AWB no.s to them. I ...
2
votes
0answers
341 views

Magento 2: Ajax call to customer edit form for dependent dropdown

I have created two attribute for customer as "Restaurant" and "Stores". Currently I am getting data from their respective model collection through InstallData.php in customer add/edit form. Now I want ...
2
votes
0answers
196 views

Manage checkout form validation (required fields) with ajax

How can I manage checkout page required fields programmatically. I want to Add or remove required fields with ajax based on customer selected parameter (country, shipping method...)? I have read the ...
2
votes
0answers
735 views

Magento SOAP API: How to get SOAP response using JavaScript

I'm able to get SOAP response using Magento SOAP API by using PHP code. Now I want it using JavaScript/AJAX request. How can I accomplish this? What steps should I follow prepare my Magento to allow ...
2
votes
0answers
822 views

Retrieve updated mini cart (cart_sidebar) block - not cached version

I'm using Magento EE 1.13.2 and use jQuery to add products to the cart: var url = "/checkout/cart/add?product=" + productId + "&qty=" + qty + "&form_key=" + formKey; $j.get(url, "", function(...
1
vote
0answers
17 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?
1
vote
0answers
28 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\...
1
vote
0answers
24 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....
1
vote
0answers
38 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
43 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
33 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
40 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 ...
1
vote
0answers
30 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="...
1
vote
0answers
261 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
25 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 ...
1
vote
0answers
196 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....
1
vote
0answers
28 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="...
1
vote
0answers
38 views

How to set success and error message when custompage ajaxcall in magento2?

I want to display success message when my custom form submitted . I am doing ajaxcall here. How to achieve this? I want default page.messages not custom message div.
1
vote
0answers
71 views

Update programmatically config content text/x-magento-init script inside of phtml template

For a requirement I had to override the config of the configurable.js script that is initialised inside configurable.phtml, this one specifically: <script type="text/x-magento-init"> { ...
1
vote
0answers
125 views

Magento 2 Ajax add to cart related products

So I've found the location to turn on ajax add to cart in the product page. I've also found where the; $showCart: true Lives to enable the related products to have an add to cart button on them. ...
1
vote
0answers
39 views

Toggle switch to change between Incl. and Exc. TAX with ajax continious loading

I've coded up a quick toggle switch which will change the price display between Including and Excluding tax using "display: none" with jQuery hide and show but i'm having problems with an Ajax ...
1
vote
0answers
219 views

How to add AJAX for the 'Add to Cart' button in wishlist page and in sidebar wishlist product in produst list page in Magento 2.2.3?

How to add AJAX for the 'Add to Cart' button in wishlist page and in sidebar wishlist product in product list page in Magento 2.2.3? Please help.
1
vote
0answers
26 views

Magento 2 : How to Use Custom AJAX Code in Admin Front End

I'm developing a delivery system for handling parcels that are handled the delivery agents. since I'm a open cart developer and new to magento, its hard for me to develop. Kindly tell me how to add ...
1
vote
0answers
94 views

How to update Knockout using PHP window data with Ajax? - Magento 2.1

I have the following code which is working fine. I want to update coupon Name, Description and Amount based on a coupon code name change. This is my php file use Magento\Checkout\Model\...
1
vote
0answers
29 views

How do I switch product pages using Ajax?

I need to implement a button on the product page to switch products (NEXT and PREV) without reloading the page (AJAX or KnockoutJS). Now I have ID NEXT and PREV product. Please tell me how it can be ...
1
vote
0answers
188 views

Create an AJAX coupon code button on checkout step

I have a step added to checkout where i want to put some pre defined coupon codes buttons so the user can just click a button to apply the code if they want a sample for example. For now I can apply ...
1
vote
0answers
246 views

How to configure InfiniteScroll with my (Porto) theme?

Magento 1.9.1 Porto theme I installed the InfiniteScroll extension by Strategery as suggested in my post here: How to load less products on the mobile/tablet front page? On the Github page of the ...
1
vote
0answers
68 views

Magento 1 get all checkout child's block on ajax request

I create an action that will return to checkout page when I called it. My code is, echo $this->getLayout()->createBlock('opc/wrapper')->setTemplate('opc/wrapper.phtml')->toHtml(); But it ...
1
vote
0answers
117 views

Unable to call the controller function from js file using Ajax in Magento 2

Path of js file- app/code/Company/Configuration/view/adminhtml/web/js/test.js code in js file - define(['jquery', 'mage/validation', 'mage/template'], function ($, _, template) { function ...
1
vote
0answers
309 views

Magento 2 how to refresh/reload shipping-method-item.html

I would like to reload the shipping methods information on a click of button for example. When the country change it does an ajax to http://magento2/rest/default/V1/guest-carts/...
1
vote
0answers
70 views

Magento 2 Product Images / Add to Cart / Variations not Loading

I had tried to install a new extension. And in the set up it told me to disable the cache. Which i did. I installed it and it seemed like everything was ok (loading slow) but the following issues ...
1
vote
0answers
88 views

Issue with Ajax calls in Chrome Magento 2

We are having an issue with Ajax calls in Chrome (only). The gist of it is that 1 in 50 or so calls will return a 500 error. If I refresh the page, it works. It does not appear to be tied to a ...