Magento 2.3 - Onepage checkout : on click of payment method ajax call removes items from order summaryOnepage Checkout - Get selected payment methodShipping price in one page checkout - order review return zeroOnepage checkout update payment section on radio button clickRemove “CHECKOUT METHOD” from onepageMagento 2.1.4: Order Summary Modal on Checkout BreakpointCheckout Order Summary Update Selected Payment MethodCan't validate Post Code on checkout pageMagento 2 checkout payment method add subtitleHide Shipping Method Title from Order SummaryMagento 2: i need update order summary when click custom option payment method checkmo
How do I get a list of only the files (not the directories) from a package?
Is there a way to save this session?
Explain Ant-Man's "not it" scene from Avengers: Endgame
Looking for an old image of designing a cpu with plan laid out / being edited on a literal floor
Applicants clearly not having the skills they advertise
Are there mythical creatures in the world of Game of Thrones?
Should this code fail to compile in C++17?
How do I get a cleat that's stuck in a pedal, detached from the shoe, out?
Can a helicopter mask itself from Radar?
How can I offer a test ride while selling a bike?
What is a natural deduction proof from ~(A↔B) to ~(A→B)?
Scala list with same adjacent values
How to write a vulnerable moment without it seeming cliche or mushy?
What is the intuition behind uniform continuity?
What is the right way to float a home lab?
Can The Malloreon be read without first reading The Belgariad?
Can an old DSLR be upgraded to match modern smartphone image quality
If Sweden was to magically float away, at what altitude would it be visible from the southern hemisphere?
Can you use a concentration spell while using Mantle of Majesty?
How can I grammatically understand "Wir über uns"?
How should I push back against my job assigning "homework"?
Recording the inputs of a command and producing a list of them later on
How can a single Member of the House block a Congressional bill?
The deliberate use of misleading terminology
Magento 2.3 - Onepage checkout : on click of payment method ajax call removes items from order summary
Onepage Checkout - Get selected payment methodShipping price in one page checkout - order review return zeroOnepage checkout update payment section on radio button clickRemove “CHECKOUT METHOD” from onepageMagento 2.1.4: Order Summary Modal on Checkout BreakpointCheckout Order Summary Update Selected Payment MethodCan't validate Post Code on checkout pageMagento 2 checkout payment method add subtitleHide Shipping Method Title from Order SummaryMagento 2: i need update order summary when click custom option payment method checkmo
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have one ajax call on payment method select:select-payment-method.js
define(
[
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/full-screen-loader',
'jquery',
'Magento_Checkout/js/action/get-totals'
],
function (quote, fullScreenLoader, jQuery, getTotalsAction)
'use strict';
return function (paymentMethod)
quote.paymentMethod(paymentMethod);
fullScreenLoader.startLoader();
var tooltipText = "";
jQuery.ajax('/module_name/checkout/applyPaymentMethod',
data: payment_method: paymentMethod,
complete: function()
getTotalsAction([]);
fullScreenLoader.stopLoader();
);
);
ApplyPaymentMethod.php
-> execute()
$result = $this->resultJsonFactory->create();
$pMethod = $this->getRequest()->getParam('payment_method');
$quote = $this->checkoutSession->getQuote();
$quote->getPayment()->setMethod($pMethod['method']);
$quote->setTotalsCollectedFlag(false);
$quote->collectTotals();
$this->quoteResource->save($quote);
return $result->setData(['quote' => $quote->getData()]);
Result: Total calculation getting correct but it removes items rendered in order summary section.
See Screenshot!
Before select payment method:
After select payment method:
any help would be appreciated. Thank you!
magento2 onepage-checkout magento2.3 payment order-summary
add a comment |
I have one ajax call on payment method select:select-payment-method.js
define(
[
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/full-screen-loader',
'jquery',
'Magento_Checkout/js/action/get-totals'
],
function (quote, fullScreenLoader, jQuery, getTotalsAction)
'use strict';
return function (paymentMethod)
quote.paymentMethod(paymentMethod);
fullScreenLoader.startLoader();
var tooltipText = "";
jQuery.ajax('/module_name/checkout/applyPaymentMethod',
data: payment_method: paymentMethod,
complete: function()
getTotalsAction([]);
fullScreenLoader.stopLoader();
);
);
ApplyPaymentMethod.php
-> execute()
$result = $this->resultJsonFactory->create();
$pMethod = $this->getRequest()->getParam('payment_method');
$quote = $this->checkoutSession->getQuote();
$quote->getPayment()->setMethod($pMethod['method']);
$quote->setTotalsCollectedFlag(false);
$quote->collectTotals();
$this->quoteResource->save($quote);
return $result->setData(['quote' => $quote->getData()]);
Result: Total calculation getting correct but it removes items rendered in order summary section.
See Screenshot!
Before select payment method:
After select payment method:
any help would be appreciated. Thank you!
magento2 onepage-checkout magento2.3 payment order-summary
add a comment |
I have one ajax call on payment method select:select-payment-method.js
define(
[
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/full-screen-loader',
'jquery',
'Magento_Checkout/js/action/get-totals'
],
function (quote, fullScreenLoader, jQuery, getTotalsAction)
'use strict';
return function (paymentMethod)
quote.paymentMethod(paymentMethod);
fullScreenLoader.startLoader();
var tooltipText = "";
jQuery.ajax('/module_name/checkout/applyPaymentMethod',
data: payment_method: paymentMethod,
complete: function()
getTotalsAction([]);
fullScreenLoader.stopLoader();
);
);
ApplyPaymentMethod.php
-> execute()
$result = $this->resultJsonFactory->create();
$pMethod = $this->getRequest()->getParam('payment_method');
$quote = $this->checkoutSession->getQuote();
$quote->getPayment()->setMethod($pMethod['method']);
$quote->setTotalsCollectedFlag(false);
$quote->collectTotals();
$this->quoteResource->save($quote);
return $result->setData(['quote' => $quote->getData()]);
Result: Total calculation getting correct but it removes items rendered in order summary section.
See Screenshot!
Before select payment method:
After select payment method:
any help would be appreciated. Thank you!
magento2 onepage-checkout magento2.3 payment order-summary
I have one ajax call on payment method select:select-payment-method.js
define(
[
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/full-screen-loader',
'jquery',
'Magento_Checkout/js/action/get-totals'
],
function (quote, fullScreenLoader, jQuery, getTotalsAction)
'use strict';
return function (paymentMethod)
quote.paymentMethod(paymentMethod);
fullScreenLoader.startLoader();
var tooltipText = "";
jQuery.ajax('/module_name/checkout/applyPaymentMethod',
data: payment_method: paymentMethod,
complete: function()
getTotalsAction([]);
fullScreenLoader.stopLoader();
);
);
ApplyPaymentMethod.php
-> execute()
$result = $this->resultJsonFactory->create();
$pMethod = $this->getRequest()->getParam('payment_method');
$quote = $this->checkoutSession->getQuote();
$quote->getPayment()->setMethod($pMethod['method']);
$quote->setTotalsCollectedFlag(false);
$quote->collectTotals();
$this->quoteResource->save($quote);
return $result->setData(['quote' => $quote->getData()]);
Result: Total calculation getting correct but it removes items rendered in order summary section.
See Screenshot!
Before select payment method:
After select payment method:
any help would be appreciated. Thank you!
magento2 onepage-checkout magento2.3 payment order-summary
magento2 onepage-checkout magento2.3 payment order-summary
asked May 24 at 9:43
Ronak ChauhanRonak Chauhan
4,24911651
4,24911651
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f275975%2fmagento-2-3-onepage-checkout-on-click-of-payment-method-ajax-call-removes-it%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f275975%2fmagento-2-3-onepage-checkout-on-click-of-payment-method-ajax-call-removes-it%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown