How to Add checkboxes for default billing/shipping address and show as check/uncheck Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manarabilling and shipping address should have different addressHow to Check If given address is Default Shipping or Billing address using Address id MagentoHow to clear billing form validation errors when using Magento UI componentsWant to edit Default Billing and Default shipping address individuallyProgramatically load default billing and shipping addressMagento 2: How to submit form on checkbox click?UI component hidden input on checkout addressDefault Billing and Shipping addressHow to set a default value for the city field in checkout shipping address - magento 2Magento 2.2.5 - First Name is not visible in Shipping and Billing Address

Why did Israel vote against lifting the American embargo on Cuba?

Is a 5 watt UHF/VHF handheld considered QRP?

Why did C use the -> operator instead of reusing the . operator?

Israeli soda type drink

Did the Roman Empire have penal colonies?

Check if a string is entirely made of the same substring

Is there any hidden 'W' sound after 'comment' in : Comment est-elle?

Retract an already submitted recommendation letter (written for an undergrad student)

Protagonist's race is hidden - should I reveal it?

Implementing 3DES algorithm in Java: is my code secure?

All ASCII characters with a given bit count

Would reducing the reference voltage of an ADC have any effect on accuracy?

What ability score does a Hexblade's Pact Weapon use for attack and damage when wielded by another character?

Justification for leaving new position after a short time

Why does the Cisco show run command not show the full version, while the show version command does?

finding a tangent line to a parabola

Will I lose my paid in full property

Trumpet valves, lengths, and pitch

Rolling Stones Sway guitar solo chord function

Is it acceptable to use working hours to read general interest books?

"My boss was furious with me and I have been fired" vs. "My boss was furious with me and I was fired"

I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?

How to translate "red flag" into Spanish?

Split coins into combinations of different denominations



How to Add checkboxes for default billing/shipping address and show as check/uncheck



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manarabilling and shipping address should have different addressHow to Check If given address is Default Shipping or Billing address using Address id MagentoHow to clear billing form validation errors when using Magento UI componentsWant to edit Default Billing and Default shipping address individuallyProgramatically load default billing and shipping addressMagento 2: How to submit form on checkbox click?UI component hidden input on checkout addressDefault Billing and Shipping addressHow to set a default value for the city field in checkout shipping address - magento 2Magento 2.2.5 - First Name is not visible in Shipping and Billing Address



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








2















Currently Billing and Shipping address don't have checkboxes to
select, to change it from Billing to Shipping or Shipping to Billing.
It only shows a message info.



So, I want to be checkboxes as same as an additional address form.
So that user change




Billing Address -> Shipping Address



Shipping Address -> Billing Address




The problem is how can I get the Use as my default billing address checkbox selected when the user edits Billing Address and vice versa for Shipping Address.



Old Code



 <?php if ($block->isDefaultBilling()): ?>
<div class="message info">
<span><?= $block->escapeHtml(__("It's a default billing address.")) ?></span>
</div>
<?php elseif ($block->canSetAsDefaultBilling()): ?>
<div class="field choice set shipping">
<input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
<label class="label" for="primary_billing">
<span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
</label>
</div>
<?php else: ?>
<input type="hidden" name="default_billing" value="1">
<?php endif; ?>
<input type="hidden" name="default_billing" value="1" />
<?php endif; ?>


Changed Code



 <?php if ($block->isDefaultBilling()): ?>
<div class="field choice set billing">
<input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
<label class="label" for="primary_billing">
<span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
</label>
</div>
<?php elseif ($block->canSetAsDefaultBilling()): ?>
<div class="field choice set billing">
<input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
<label class="label" for="primary_billing">
<span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
</label>
</div>
<?php else: ?>
<input type="hidden" name="default_billing" value="1" />
<?php endif; ?>









share|improve this question




























    2















    Currently Billing and Shipping address don't have checkboxes to
    select, to change it from Billing to Shipping or Shipping to Billing.
    It only shows a message info.



    So, I want to be checkboxes as same as an additional address form.
    So that user change




    Billing Address -> Shipping Address



    Shipping Address -> Billing Address




    The problem is how can I get the Use as my default billing address checkbox selected when the user edits Billing Address and vice versa for Shipping Address.



    Old Code



     <?php if ($block->isDefaultBilling()): ?>
    <div class="message info">
    <span><?= $block->escapeHtml(__("It's a default billing address.")) ?></span>
    </div>
    <?php elseif ($block->canSetAsDefaultBilling()): ?>
    <div class="field choice set shipping">
    <input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
    <label class="label" for="primary_billing">
    <span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
    </label>
    </div>
    <?php else: ?>
    <input type="hidden" name="default_billing" value="1">
    <?php endif; ?>
    <input type="hidden" name="default_billing" value="1" />
    <?php endif; ?>


    Changed Code



     <?php if ($block->isDefaultBilling()): ?>
    <div class="field choice set billing">
    <input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
    <label class="label" for="primary_billing">
    <span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
    </label>
    </div>
    <?php elseif ($block->canSetAsDefaultBilling()): ?>
    <div class="field choice set billing">
    <input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
    <label class="label" for="primary_billing">
    <span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
    </label>
    </div>
    <?php else: ?>
    <input type="hidden" name="default_billing" value="1" />
    <?php endif; ?>









    share|improve this question
























      2












      2








      2








      Currently Billing and Shipping address don't have checkboxes to
      select, to change it from Billing to Shipping or Shipping to Billing.
      It only shows a message info.



      So, I want to be checkboxes as same as an additional address form.
      So that user change




      Billing Address -> Shipping Address



      Shipping Address -> Billing Address




      The problem is how can I get the Use as my default billing address checkbox selected when the user edits Billing Address and vice versa for Shipping Address.



      Old Code



       <?php if ($block->isDefaultBilling()): ?>
      <div class="message info">
      <span><?= $block->escapeHtml(__("It's a default billing address.")) ?></span>
      </div>
      <?php elseif ($block->canSetAsDefaultBilling()): ?>
      <div class="field choice set shipping">
      <input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
      <label class="label" for="primary_billing">
      <span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
      </label>
      </div>
      <?php else: ?>
      <input type="hidden" name="default_billing" value="1">
      <?php endif; ?>
      <input type="hidden" name="default_billing" value="1" />
      <?php endif; ?>


      Changed Code



       <?php if ($block->isDefaultBilling()): ?>
      <div class="field choice set billing">
      <input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
      <label class="label" for="primary_billing">
      <span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
      </label>
      </div>
      <?php elseif ($block->canSetAsDefaultBilling()): ?>
      <div class="field choice set billing">
      <input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
      <label class="label" for="primary_billing">
      <span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
      </label>
      </div>
      <?php else: ?>
      <input type="hidden" name="default_billing" value="1" />
      <?php endif; ?>









      share|improve this question














      Currently Billing and Shipping address don't have checkboxes to
      select, to change it from Billing to Shipping or Shipping to Billing.
      It only shows a message info.



      So, I want to be checkboxes as same as an additional address form.
      So that user change




      Billing Address -> Shipping Address



      Shipping Address -> Billing Address




      The problem is how can I get the Use as my default billing address checkbox selected when the user edits Billing Address and vice versa for Shipping Address.



      Old Code



       <?php if ($block->isDefaultBilling()): ?>
      <div class="message info">
      <span><?= $block->escapeHtml(__("It's a default billing address.")) ?></span>
      </div>
      <?php elseif ($block->canSetAsDefaultBilling()): ?>
      <div class="field choice set shipping">
      <input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
      <label class="label" for="primary_billing">
      <span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
      </label>
      </div>
      <?php else: ?>
      <input type="hidden" name="default_billing" value="1">
      <?php endif; ?>
      <input type="hidden" name="default_billing" value="1" />
      <?php endif; ?>


      Changed Code



       <?php if ($block->isDefaultBilling()): ?>
      <div class="field choice set billing">
      <input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
      <label class="label" for="primary_billing">
      <span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
      </label>
      </div>
      <?php elseif ($block->canSetAsDefaultBilling()): ?>
      <div class="field choice set billing">
      <input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
      <label class="label" for="primary_billing">
      <span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
      </label>
      </div>
      <?php else: ?>
      <input type="hidden" name="default_billing" value="1" />
      <?php endif; ?>






      magento2 shipping-address billing-address address






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 20 at 11:17









      summusummu

      31210




      31210




















          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%2f270846%2fhow-to-add-checkboxes-for-default-billing-shipping-address-and-show-as-check-unc%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%2f270846%2fhow-to-add-checkboxes-for-default-billing-shipping-address-and-show-as-check-unc%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

          Sum ergo cogito? 1 nng

          419 nièngy_Soadمي 19bal1.5o_g

          Queiggey Chernihivv 9NnOo i Zw X QqKk LpB