Magento 2 - Uncheck Billing and Shipping are the same for selected Payment MethodMagento 2: How shipping rest api function called On Checkout?Magento 2 : Implement update functionality of new customer billing address on place order button in checkout pageMagento2: How to override paypal-express.html & authorizenet-directpost.html?When we add custom form field in Shipping Address form in Magento2 checkout page,it doesnot reflect in frontendCan't validate Post Code on checkout pageMagento 2.1 - How to set shipping method at Checkout page programmatically

Should I use the words "pyromancy" and "necromancy" even if they don't mean what people think they do?

Did anybody find out it was Anakin who blew up the command center?

Why not explainability is a metric for publishability?

Is it true that different variants of the same model aircraft don't require pilot retraining?

Time difference between banns and marriage

Is the Amazon rainforest the "world's lungs"?

Why did Lucius make a deal out of Buckbeak hurting Draco but not about Draco being turned into a ferret?

Notice period 60 days but I need to join in 45 days

Federal Pacific 200a main panel problem with oversized 100a 2pole breaker

A first "Hangman" game in Python

Can someone identify this unusual plane at airport?

Why does this London Underground poster from 1924 have a Star of David atop a Christmas tree?

How to prevent a hosting company from accessing a VM's encryption keys?

Is the internet in Madagascar faster than in UK?

Unlock your Lock

What's the point of fighting monsters in Zelda BoTW?

Is it unusual for a math department not to have a mail/web server?

Why does Windows store Wi-Fi passwords in a reversible format?

Fantasy Macro Economics: What would Merfolk Trade?

Does trying to charm an uncharmable creature cost a spell slot?

Can a DM change an item given by another DM?

Will removing shelving screws from studs damage the studs?

Is there a difference between 辞典 and 辞書 ?

Was a star-crossed lover



Magento 2 - Uncheck Billing and Shipping are the same for selected Payment Method


Magento 2: How shipping rest api function called On Checkout?Magento 2 : Implement update functionality of new customer billing address on place order button in checkout pageMagento2: How to override paypal-express.html & authorizenet-directpost.html?When we add custom form field in Shipping Address form in Magento2 checkout page,it doesnot reflect in frontendCan't validate Post Code on checkout pageMagento 2.1 - How to set shipping method at Checkout page programmatically






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm trying to uncheck Billing and Shipping Address are the same but for only one payment method and leave all the other with this option selected but I'm unable to do it with this solution bellow. The bellow solution will uncheck all boxes for all payment methods and I want to uncheck just one. Does anyone have an idea on how to do that?



Copy the following file to your theme:



vendor/magento/module-checkout/view/frontend/web/js/model/checkout-data-resolver.js

applyBillingAddress: function ()
var shippingAddress;

if (quote.billingAddress())
selectBillingAddress(quote.billingAddress());

return;

shippingAddress = quote.shippingAddress();

if (shippingAddress &&
shippingAddress.canUseForBilling() &&
(shippingAddress.isDefaultShipping()


And also copy the following file to your theme:



vendor/magento/module-checkout/view/frontend/web/js/model/shipping-save-processor/default.js

saveShippingInformation: function ()
var payload;

if (!quote.billingAddress())
if(quote.shippingMethod()['method_code']=='store pick_up code')
//uncheck here
else
//check here
selectBillingAddress(quote.shippingAddress());



payload =
addressInformation:
'shipping_address': quote.shippingAddress(),
'billing_address': quote.billingAddress(),
'shipping_method_code': quote.shippingMethod()['method_code'],
'shipping_carrier_code': quote.shippingMethod()['carrier_code']

;

payloadExtender(payload);

fullScreenLoader.startLoader();

return storage.post(
resourceUrlManager.getUrlForSetShippingInformation(quote),
JSON.stringify(payload)
).done(
function (response)
quote.setTotals(response.totals);
paymentService.setPaymentMethods(methodConverter(response['payment_methods']));
fullScreenLoader.stopLoader();

).fail(
function (response)
errorProcessor.process(response);
fullScreenLoader.stopLoader();

);



Don't forget to run static-content:deploy and cache flush.










share|improve this question
































    1















    I'm trying to uncheck Billing and Shipping Address are the same but for only one payment method and leave all the other with this option selected but I'm unable to do it with this solution bellow. The bellow solution will uncheck all boxes for all payment methods and I want to uncheck just one. Does anyone have an idea on how to do that?



    Copy the following file to your theme:



    vendor/magento/module-checkout/view/frontend/web/js/model/checkout-data-resolver.js

    applyBillingAddress: function ()
    var shippingAddress;

    if (quote.billingAddress())
    selectBillingAddress(quote.billingAddress());

    return;

    shippingAddress = quote.shippingAddress();

    if (shippingAddress &&
    shippingAddress.canUseForBilling() &&
    (shippingAddress.isDefaultShipping()


    And also copy the following file to your theme:



    vendor/magento/module-checkout/view/frontend/web/js/model/shipping-save-processor/default.js

    saveShippingInformation: function ()
    var payload;

    if (!quote.billingAddress())
    if(quote.shippingMethod()['method_code']=='store pick_up code')
    //uncheck here
    else
    //check here
    selectBillingAddress(quote.shippingAddress());



    payload =
    addressInformation:
    'shipping_address': quote.shippingAddress(),
    'billing_address': quote.billingAddress(),
    'shipping_method_code': quote.shippingMethod()['method_code'],
    'shipping_carrier_code': quote.shippingMethod()['carrier_code']

    ;

    payloadExtender(payload);

    fullScreenLoader.startLoader();

    return storage.post(
    resourceUrlManager.getUrlForSetShippingInformation(quote),
    JSON.stringify(payload)
    ).done(
    function (response)
    quote.setTotals(response.totals);
    paymentService.setPaymentMethods(methodConverter(response['payment_methods']));
    fullScreenLoader.stopLoader();

    ).fail(
    function (response)
    errorProcessor.process(response);
    fullScreenLoader.stopLoader();

    );



    Don't forget to run static-content:deploy and cache flush.










    share|improve this question




























      1












      1








      1








      I'm trying to uncheck Billing and Shipping Address are the same but for only one payment method and leave all the other with this option selected but I'm unable to do it with this solution bellow. The bellow solution will uncheck all boxes for all payment methods and I want to uncheck just one. Does anyone have an idea on how to do that?



      Copy the following file to your theme:



      vendor/magento/module-checkout/view/frontend/web/js/model/checkout-data-resolver.js

      applyBillingAddress: function ()
      var shippingAddress;

      if (quote.billingAddress())
      selectBillingAddress(quote.billingAddress());

      return;

      shippingAddress = quote.shippingAddress();

      if (shippingAddress &&
      shippingAddress.canUseForBilling() &&
      (shippingAddress.isDefaultShipping()


      And also copy the following file to your theme:



      vendor/magento/module-checkout/view/frontend/web/js/model/shipping-save-processor/default.js

      saveShippingInformation: function ()
      var payload;

      if (!quote.billingAddress())
      if(quote.shippingMethod()['method_code']=='store pick_up code')
      //uncheck here
      else
      //check here
      selectBillingAddress(quote.shippingAddress());



      payload =
      addressInformation:
      'shipping_address': quote.shippingAddress(),
      'billing_address': quote.billingAddress(),
      'shipping_method_code': quote.shippingMethod()['method_code'],
      'shipping_carrier_code': quote.shippingMethod()['carrier_code']

      ;

      payloadExtender(payload);

      fullScreenLoader.startLoader();

      return storage.post(
      resourceUrlManager.getUrlForSetShippingInformation(quote),
      JSON.stringify(payload)
      ).done(
      function (response)
      quote.setTotals(response.totals);
      paymentService.setPaymentMethods(methodConverter(response['payment_methods']));
      fullScreenLoader.stopLoader();

      ).fail(
      function (response)
      errorProcessor.process(response);
      fullScreenLoader.stopLoader();

      );



      Don't forget to run static-content:deploy and cache flush.










      share|improve this question
















      I'm trying to uncheck Billing and Shipping Address are the same but for only one payment method and leave all the other with this option selected but I'm unable to do it with this solution bellow. The bellow solution will uncheck all boxes for all payment methods and I want to uncheck just one. Does anyone have an idea on how to do that?



      Copy the following file to your theme:



      vendor/magento/module-checkout/view/frontend/web/js/model/checkout-data-resolver.js

      applyBillingAddress: function ()
      var shippingAddress;

      if (quote.billingAddress())
      selectBillingAddress(quote.billingAddress());

      return;

      shippingAddress = quote.shippingAddress();

      if (shippingAddress &&
      shippingAddress.canUseForBilling() &&
      (shippingAddress.isDefaultShipping()


      And also copy the following file to your theme:



      vendor/magento/module-checkout/view/frontend/web/js/model/shipping-save-processor/default.js

      saveShippingInformation: function ()
      var payload;

      if (!quote.billingAddress())
      if(quote.shippingMethod()['method_code']=='store pick_up code')
      //uncheck here
      else
      //check here
      selectBillingAddress(quote.shippingAddress());



      payload =
      addressInformation:
      'shipping_address': quote.shippingAddress(),
      'billing_address': quote.billingAddress(),
      'shipping_method_code': quote.shippingMethod()['method_code'],
      'shipping_carrier_code': quote.shippingMethod()['carrier_code']

      ;

      payloadExtender(payload);

      fullScreenLoader.startLoader();

      return storage.post(
      resourceUrlManager.getUrlForSetShippingInformation(quote),
      JSON.stringify(payload)
      ).done(
      function (response)
      quote.setTotals(response.totals);
      paymentService.setPaymentMethods(methodConverter(response['payment_methods']));
      fullScreenLoader.stopLoader();

      ).fail(
      function (response)
      errorProcessor.process(response);
      fullScreenLoader.stopLoader();

      );



      Don't forget to run static-content:deploy and cache flush.







      magento2 checkout customer-address






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 15 at 10:36









      Sumit

      6471 silver badge14 bronze badges




      6471 silver badge14 bronze badges










      asked Aug 14 at 13:41









      GabrielaGabriela

      317 bronze badges




      317 bronze badges























          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
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f285501%2fmagento-2-uncheck-billing-and-shipping-are-the-same-for-selected-payment-metho%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















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f285501%2fmagento-2-uncheck-billing-and-shipping-are-the-same-for-selected-payment-metho%23new-answer', 'question_page');

          );

          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







          Popular posts from this blog

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form