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

Open subspaces of CW complexes

Can I renew my USA passport book and passport card separately?

74S vs 74LS ICs

Where does learning new skills fit into Agile?

Is this password scheme legit?

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

Why is "dyadic" the only word with the prefix "dy-"?

What is the loud noise of a helicopter when the rotors are not yet moving?

Why is getting a PhD considered "financially irresponsible" by some people?

Why does a sticker slowly peel off, but if it is pulled quickly it tears?

Set orthographic view using python?

Is it ok to record the 'environment' around my workplace?

What are the IPSE’s, the ASPE’s, the FRIPSE’s and the GRIPSE’s?

1mth baby boy keeps peeing through diapers, sometimes diper seems practically unused

Hangman game in Python - need feedback on the quality of code

Discussing work with supervisor in an invited dinner with his family

Expanding powers of expressions of the form ax+b

Book featuring a child learning from a crowdsourced AI book

What is this fighter jet at Weymouth NAS?

Why is the UK so keen to remove the "backstop" when their leadership seems to think that no border will be needed in Northern Ireland?

Count the number of paths to n

Using Update Cursor within Search Cursor with ArcGIS Pro?

Who was the most successful German spy against Great Britain in WWII, from the contemporary German perspective?

Why is adding AC power easier than adding DC power?



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 () !quote.isVirtual())
)
if(quote.shippingMethod()['method_code']=='store pick_up code')
//uncheck here
else
//check here
selectBillingAddress(quote.shippingAddress());





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 () !quote.isVirtual())
    )
    if(quote.shippingMethod()['method_code']=='store pick_up code')
    //uncheck here
    else
    //check here
    selectBillingAddress(quote.shippingAddress());





    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 () !quote.isVirtual())
      )
      if(quote.shippingMethod()['method_code']=='store pick_up code')
      //uncheck here
      else
      //check here
      selectBillingAddress(quote.shippingAddress());





      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 () !quote.isVirtual())
      )
      if(quote.shippingMethod()['method_code']=='store pick_up code')
      //uncheck here
      else
      //check here
      selectBillingAddress(quote.shippingAddress());





      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

      5131 silver badge14 bronze badges




      5131 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