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
1answer
103 views

js file not loading in ajax returned phtml file magento2

I am returning phtml file content on ajax call in Magento2 its working fine, In the phtml file I am loading jquery and mine custom js file booking, using below code. A query function running fine, ...
1
vote
2answers
752 views

return phtml file content in ajax response in magento2

I am calling an controller function via Ajax and its calling and returning correct data. But how can I return Controller function respective phtml file content instead of some data from controller ...
1
vote
1answer
189 views

How to fix “403 forbidden” redirect issue happens while adding shopping cart price rule condition in magento 1.9?

My task is to add new shopping cart price rule in magento admin section. I have added rule information, then I need to add conditions for that rule .When I change the condition select box option, it's ...
0
votes
1answer
115 views

Magento : Convert Ajax Request To Normal Page Call

I am trying to change the ajax call on click of add to cart button to a normal page call. This is the code for the button <button type="button" title="<?php echo $buttonTitle ?>" id="...
2
votes
1answer
119 views

after magento upgrade 1.7.0.2 to 1.9.3.9 add to cart after blank screen open

URL like generate https://domain.com/stage/checkout/cart/add/uenc/ how to solve it this issue Thank you in advance!
0
votes
0answers
273 views

Add to cart with ajax not working in homepage

I installed Magento 2.2.5, and set Luma theme as default. In my homepage add to cart is not working with ajax, while on the other pages works just fine. Any idea?
1
vote
0answers
56 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
273 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 ...
0
votes
1answer
871 views

Retrieve Values passed in Ajax Magento 1.9

After making the ajax call, i try to recover the values, but returns null this is function inside controller public function checkAction() { # Retrieve value //$checkbox = Mage::app()-&...
1
vote
0answers
365 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 ...
2
votes
2answers
473 views

How to compose URL for AJAX in Adminhtml Magento 1.9

I'm inside the Admin area, I'm adding a check inside the products, inside my File phtml write: <?php $ajaxUrl = Mage::helper('adminhtml')->getUrl('adminhtml/MyCompany_MyModule_AjaxController/...
1
vote
1answer
36 views

Can I make separate controller for AJAX actions? (Magento 1.x)

I have my custom module and everything works fine, but I would like to create separately controller for AJAX actions (AjaxController). Currently I Have only IndexController. Everytime I get: {"error":...
2
votes
3answers
4k views

How to update cart qty using ajax Magento 2

How to update cart qty using ajax magento 2 I want to change qty on cart page. I don't want to use the update button. It should be update automatically without reloading the page.
1
vote
1answer
299 views

Call multiple ajax simultaneously in Magento2 [Concurrent Request Blocking in magento2]

I am trying to import data with one ajax and trying to do live tracking of this imported data with another ajax to show progress bar(how many records have been uploaded). checkPrgressVar = ...
2
votes
1answer
29 views

Cant Access a Value on Input or Button with type Submit

I want individual add to cart buttons for grouped products but keep the original add to cart button so that multiple products can be added to cart if needs be with a single click. This was fine ...
0
votes
1answer
52 views

Model Factory not calling from Controller

I am creating simple ajax newsletter module, but default controller of magento not going in Model. <?php /** * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt ...
1
vote
0answers
73 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 ...
0
votes
3answers
2k views

How can I get my controller to update a block via Ajax?

I'm trying to write a module that adds a finance section on my product pages. I've managed to get the initial block to show, but on page-load I'm trying to get it to populate the box with finance ...
0
votes
1answer
142 views

After change server getting issue Ajax blocked if the site is on HTTPS

I have point to the website on another server. After that ajax has blocked on https url. If I run on HTTP then it is working fine. Mixed Content: The page at 'https://www.exampple.com/' was loaded ...
1
vote
0answers
129 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 ...
0
votes
1answer
870 views

Magento2 - Reload JS file after ajax call [duplicate]

After the ajax call my new elements which are created are not recognized by the event handlers in my jQuery code. Is there a way to reload the JS file when the ajax URL is called?
1
vote
2answers
286 views

Can't upload file with ajax and Magento 1.9

I have a form with 3 input file, and I need to upload their files without reload the page. I use formData object but when I take params in Magento controller it return [native code]... opcheckout.js ...
0
votes
1answer
310 views

Configurable product is not added to cart in catalog page Magento 2.2.2

I recently created a configurable product, when I select any of the size and color from catalog page then click add to cart button, it will redirect to the cart page. Not Added any item in my Cart. ...
0
votes
1answer
359 views

Ajax Call Taking Too Long

In my .phtml i have: require([ 'jquery' ], function ($) { $.ajax({ url: "get_shipment_info.php", type: "get", //send it through get method data: { company: ...
0
votes
2answers
428 views

Ajax Layered Navigation module?

Does anyone know a simple Magento 2 module which enables Ajax in the layered navigation?
3
votes
0answers
251 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 ...
0
votes
1answer
51 views

Layout type controller does not render scripts

I have a controller which I want to use to load scripts via ajax however whenever I add scripts to the block within the layout page type all script tags seem to be stripped out. Is there a way I can ...
1
vote
0answers
367 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/...
0
votes
1answer
226 views

API integrates and return the value in ajax

I have integrated the third party API for validating a correct email address with the domain. The API call is returning the value in the ajax call as Boolean. How to retrieve the value from the API ...
0
votes
1answer
2k views

Shopping cart page, update quantity by ajax

Issue:- Is there a ready solution to update shopping cart page by ajax url/checkout/cart/? I found similar questions but there is no working solution, but as for me, it's very useful feature and ...
0
votes
1answer
236 views

AJAX login, how to pass data response from controller to jQuery with Ajax

I created some module to login and register with Ajax, so I rewrite the : vendor/magento/module-customer/Controller/Account/LoginPost.php vendor/magento/module-customer/Controller/Account/...
1
vote
2answers
400 views

Magento2 Trigger ajax call after Full page load

I am using Magento 2.2.1, I am trying to trigger ajax call after Full page load. I tried with below scripts but no luck. Did anyone faced this issue and found any solution for it. window.load ...
1
vote
0answers
80 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 ...
9
votes
1answer
1k views

Magento 2 Error in browser console Expected to start loader but did not find one in the dom

I have developed site in Magento 2.2.0 and created custom product listing page. I have used add to cart functionality using ajax but in console giving error:- "VM1386:5 Expected to start loader ...
0
votes
0answers
208 views

How to make ajax call for product description

I am showing a button in product description. After button click it should translate the description using 3rd party PHP library. I checked some answers to find a solution (How to make a simple ajax ...
2
votes
0answers
123 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 ...
4
votes
1answer
2k views

How to get the Quote Id from Masked Quote Id (QuoteIdMask) in magento 2

I need to do something after applying the coupon code in the checkout page, So I have created the ajax call in the response of set-coupon-code.js in Sales Rule module. But I got the Masked quote Id ...
0
votes
1answer
231 views

I can not get data from AJAX (jQuery Widget)

I need to get data from AJAX, but the Post is empty. <?php namespace Namespace\Mymodule\Controller\Query; use Magento\Framework\App\Action\Context; use Magento\Framework\Controller\ResultFactory; ...
0
votes
2answers
98 views

Controller observer is not triggered using ajax request

I am using this event: controller_action_predispatch_sales_order_create_showUpdateResult this is my xml code: <controller_action_predispatch_sales_order_create_showUpdateResult> &...
0
votes
1answer
608 views

return array of json after call ajax magento 1.9.3.x

I have create a search bar for search zip code for storelocator. So in my code, i have create a request ajax who send param of zip code : jQuery(document).ready(function(){ jQuery("#searchzip")....
0
votes
1answer
626 views

ajax add to cart on product list

I want a trick to add product to cart whitout reloading page, I'm not looking for a paid extension , just code ajax to make product added to cart on my product list. thank you
0
votes
1answer
285 views

How to create “Buy in one click module”

I need help to add "Buy Now" button on the product detail page and on product list page.It not the same as "Add to cart" button, "Buy now" button should show popup which asked only phone number, it ...
1
vote
0answers
136 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 ...
1
vote
0answers
648 views

How to Implement Ajax Pagination in Custom module

Phtml File $('.pagination a').on('click', function() { var pagNo = $('a').val(); $("#data-loader").css("background", "url("+ajaxloader+") no-repeat"); $("#data-loader")....
0
votes
0answers
306 views

How to make magento core pagination as ajax pagination in a custom module

I am using magento 2.2.2 and I want to implement Ajax pagination in my custom module. Magento has a pagination (getPagerHtml), but it's not implemented using Ajax, and I am trying to implement it ...
1
vote
0answers
403 views

Magento 2: How to place order using REST api url via ajax

I want to create a order in Magento 2 using REST api url i.e. http://localhost/taleb_check/rest/default/V1/carts/mine/payment-information. When we click place order button then this url get calls ...
1
vote
0answers
60 views

Magento 2 wrong session_id ajax

I have several mismatches with session_id in my production website : if I add a simple product to my cart with a freshly created customer, the session_id in the store switcher urls is not updated (...
0
votes
1answer
542 views

Load all gallery images in category on hover (Ajax)

I have a code to load all the gallery images of a product in category, it will work but the problem is that will load ALL gallery images for products in the category (list.phtml) so will increase ...
0
votes
1answer
585 views

How to get estimate shipping method in magento 2?

There are two problems mainly: my Ajax request not firing on change of postal code in cart. don't know why When I'm changing postal code on cart checkout page, Ajax request need to be fire on this ...
1
vote
0answers
209 views

Magento price slider not working

I have installed 4 price sliders from 3rd party extensions and in each one I am facing the same issue. The slider is not functioning the way I would like it. For example, we have products from $99 - $...