Magento 2 Payment validation not working,Offline order from admin in Magento-2.2.6 — with Virtual Productcustom form validation not workingDistinguish Offline payment methods in MagentoMagento admin form validation doesn't working?Magento 2 offline payment method new order statusAdmin new order create payment methods not showingMagento 2 Admin customer form range validation is not working?Magento 2 : Payment Method is Hidden in Admin When Creating Manual OrderMagento offline custom Payment method with drop down listMagento 2.2.6 - Attribute with ID “Manufacturer” does not existCustom cron not working in magento 2.2.6

Why will we fail creating a self sustaining off world colony?

Family-wise Type I error OLS regression

How can solar sailed ships be protected from space debris?

Runtime too long for NDSolveValue, FindRoot breaks down at sharp turns

Is my background sufficient to start Quantum Computing

Was Wolfgang Unziker the last Amateur GM?

Simplify the code

How might boat designs change in order to allow them to be pulled by dragons?

Which high-degree derivatives play an essential role?

What's the idiomatic (or best) way to trim surrounding whitespace from a string?

Odd PCB Layout for Voltage Regulator

What do you call the fear of forgetting (specifically something one cherishes a lot)?

Why is quantum gravity non-renormalizable?

How can I change my buffer system for protein purification?

How to extract coefficients of a generating function like this one, using a computer?

What is the function of const specifier in enum types?

Is it theoretically possible to hack printer using scanner tray?

How to model a Coral or Sponge Structure?

Why is the saxophone not common in classical repertoire?

Why did the Middle Kingdom stop building pyramid tombs?

German idiomatic equivalents of 能骗就骗 (if you can cheat, then cheat)

Can I hire several veteran soldiers to accompany me?

What could a Medieval society do with excess animal blood?

What does this Pokemon Trainer mean by saying the player is "SHELLOS"?



Magento 2 Payment validation not working,Offline order from admin in Magento-2.2.6 — with Virtual Product


custom form validation not workingDistinguish Offline payment methods in MagentoMagento admin form validation doesn't working?Magento 2 offline payment method new order statusAdmin new order create payment methods not showingMagento 2 Admin customer form range validation is not working?Magento 2 : Payment Method is Hidden in Admin When Creating Manual OrderMagento offline custom Payment method with drop down listMagento 2.2.6 - Attribute with ID “Manufacturer” does not existCustom cron not working in magento 2.2.6













0















Magento 2.2.6 When we do order offline,Payment validation not working.



I tried



<?php if ($block->hasMethods()) : ?>
<div id="order-billing_method_form">
<dl class="admin__payment-methods">
<?php
$_methods = $block->getMethods();
$_methodsCount = count($_methods);
$_counter = 0;
$currentSelectedMethod = $block->getSelectedMethodCode();
?>
<?php foreach ($_methods as $_method) :
$_code = $_method->getCode();
$_counter++;
?>
<dt class="admin__field-option">
<?php if ($_methodsCount > 1) : ?>
<input id="p_method_<?= $block->escapeHtml($_code); ?>"
value="<?= $block->escapeHtml($_code); ?>"
type="radio" name="payment[method]"
title="<?= $block->escapeHtml($_method->getTitle()); ?>"
onclick="payment.switchMethod('<?= $block->escapeHtml($_code); ?>')"
<?php if ($block->getSelectedMethodCode() == $_code) : ?>
checked="checked"
<?php endif; ?>

class="admin__control-radio"
**[![enter image description here][1]][1]**data-validate="'validate-one-required-by-name':true"/>****
<?php else : ?>
<span class="no-display">
<input id="p_method_<?= $block->escapeHtml($_code); ?>"
value="<?= $block->escapeHtml($_code); ?>"
type="radio"
name="payment[method]" class="admin__control-radio"
checked="checked"/>
</span>
<?php endif; ?>

<label class="admin__field-label" for="p_method_<?= $block->escapeHtml($_code); ?>">
<?= $block->escapeHtml($_method->getTitle()) ?>
</label>
</dt>
<dd class="admin__payment-method-wrapper">
<?= /* @noEscape */ $block->getChildHtml('payment.method.' . $_code) ?>
</dd>
<?php endforeach; ?>
</dl>
</div>
<script>
require([
'mage/apply/main',
'Magento_Sales/order/create/form'
], function(mage)
mage.apply();
<?php if ($_methodsCount != 1) : ?>
order.setPaymentMethod('<?= $block->escapeHtml($currentSelectedMethod); ?>');
<?php else : ?>
payment.switchMethod('<?= $block->escapeHtml($currentSelectedMethod); ?>');
<?php endif; ?>
);
</script>
<?php else : ?>
<div class="admin__message-empty"><?= $block->escapeHtml(__('No Payment Methods')); ?></div>
<?php endif; ?>


I used data-validate="'validate-one-required-by-name':true"



But its not working in 2.2.6 , its working fine in 2.3.1.



Note- This issue is only coming with "Virtual Product".



Admin Order Create



please help










share|improve this question




























    0















    Magento 2.2.6 When we do order offline,Payment validation not working.



    I tried



    <?php if ($block->hasMethods()) : ?>
    <div id="order-billing_method_form">
    <dl class="admin__payment-methods">
    <?php
    $_methods = $block->getMethods();
    $_methodsCount = count($_methods);
    $_counter = 0;
    $currentSelectedMethod = $block->getSelectedMethodCode();
    ?>
    <?php foreach ($_methods as $_method) :
    $_code = $_method->getCode();
    $_counter++;
    ?>
    <dt class="admin__field-option">
    <?php if ($_methodsCount > 1) : ?>
    <input id="p_method_<?= $block->escapeHtml($_code); ?>"
    value="<?= $block->escapeHtml($_code); ?>"
    type="radio" name="payment[method]"
    title="<?= $block->escapeHtml($_method->getTitle()); ?>"
    onclick="payment.switchMethod('<?= $block->escapeHtml($_code); ?>')"
    <?php if ($block->getSelectedMethodCode() == $_code) : ?>
    checked="checked"
    <?php endif; ?>

    class="admin__control-radio"
    **[![enter image description here][1]][1]**data-validate="'validate-one-required-by-name':true"/>****
    <?php else : ?>
    <span class="no-display">
    <input id="p_method_<?= $block->escapeHtml($_code); ?>"
    value="<?= $block->escapeHtml($_code); ?>"
    type="radio"
    name="payment[method]" class="admin__control-radio"
    checked="checked"/>
    </span>
    <?php endif; ?>

    <label class="admin__field-label" for="p_method_<?= $block->escapeHtml($_code); ?>">
    <?= $block->escapeHtml($_method->getTitle()) ?>
    </label>
    </dt>
    <dd class="admin__payment-method-wrapper">
    <?= /* @noEscape */ $block->getChildHtml('payment.method.' . $_code) ?>
    </dd>
    <?php endforeach; ?>
    </dl>
    </div>
    <script>
    require([
    'mage/apply/main',
    'Magento_Sales/order/create/form'
    ], function(mage)
    mage.apply();
    <?php if ($_methodsCount != 1) : ?>
    order.setPaymentMethod('<?= $block->escapeHtml($currentSelectedMethod); ?>');
    <?php else : ?>
    payment.switchMethod('<?= $block->escapeHtml($currentSelectedMethod); ?>');
    <?php endif; ?>
    );
    </script>
    <?php else : ?>
    <div class="admin__message-empty"><?= $block->escapeHtml(__('No Payment Methods')); ?></div>
    <?php endif; ?>


    I used data-validate="'validate-one-required-by-name':true"



    But its not working in 2.2.6 , its working fine in 2.3.1.



    Note- This issue is only coming with "Virtual Product".



    Admin Order Create



    please help










    share|improve this question


























      0












      0








      0








      Magento 2.2.6 When we do order offline,Payment validation not working.



      I tried



      <?php if ($block->hasMethods()) : ?>
      <div id="order-billing_method_form">
      <dl class="admin__payment-methods">
      <?php
      $_methods = $block->getMethods();
      $_methodsCount = count($_methods);
      $_counter = 0;
      $currentSelectedMethod = $block->getSelectedMethodCode();
      ?>
      <?php foreach ($_methods as $_method) :
      $_code = $_method->getCode();
      $_counter++;
      ?>
      <dt class="admin__field-option">
      <?php if ($_methodsCount > 1) : ?>
      <input id="p_method_<?= $block->escapeHtml($_code); ?>"
      value="<?= $block->escapeHtml($_code); ?>"
      type="radio" name="payment[method]"
      title="<?= $block->escapeHtml($_method->getTitle()); ?>"
      onclick="payment.switchMethod('<?= $block->escapeHtml($_code); ?>')"
      <?php if ($block->getSelectedMethodCode() == $_code) : ?>
      checked="checked"
      <?php endif; ?>

      class="admin__control-radio"
      **[![enter image description here][1]][1]**data-validate="'validate-one-required-by-name':true"/>****
      <?php else : ?>
      <span class="no-display">
      <input id="p_method_<?= $block->escapeHtml($_code); ?>"
      value="<?= $block->escapeHtml($_code); ?>"
      type="radio"
      name="payment[method]" class="admin__control-radio"
      checked="checked"/>
      </span>
      <?php endif; ?>

      <label class="admin__field-label" for="p_method_<?= $block->escapeHtml($_code); ?>">
      <?= $block->escapeHtml($_method->getTitle()) ?>
      </label>
      </dt>
      <dd class="admin__payment-method-wrapper">
      <?= /* @noEscape */ $block->getChildHtml('payment.method.' . $_code) ?>
      </dd>
      <?php endforeach; ?>
      </dl>
      </div>
      <script>
      require([
      'mage/apply/main',
      'Magento_Sales/order/create/form'
      ], function(mage)
      mage.apply();
      <?php if ($_methodsCount != 1) : ?>
      order.setPaymentMethod('<?= $block->escapeHtml($currentSelectedMethod); ?>');
      <?php else : ?>
      payment.switchMethod('<?= $block->escapeHtml($currentSelectedMethod); ?>');
      <?php endif; ?>
      );
      </script>
      <?php else : ?>
      <div class="admin__message-empty"><?= $block->escapeHtml(__('No Payment Methods')); ?></div>
      <?php endif; ?>


      I used data-validate="'validate-one-required-by-name':true"



      But its not working in 2.2.6 , its working fine in 2.3.1.



      Note- This issue is only coming with "Virtual Product".



      Admin Order Create



      please help










      share|improve this question
















      Magento 2.2.6 When we do order offline,Payment validation not working.



      I tried



      <?php if ($block->hasMethods()) : ?>
      <div id="order-billing_method_form">
      <dl class="admin__payment-methods">
      <?php
      $_methods = $block->getMethods();
      $_methodsCount = count($_methods);
      $_counter = 0;
      $currentSelectedMethod = $block->getSelectedMethodCode();
      ?>
      <?php foreach ($_methods as $_method) :
      $_code = $_method->getCode();
      $_counter++;
      ?>
      <dt class="admin__field-option">
      <?php if ($_methodsCount > 1) : ?>
      <input id="p_method_<?= $block->escapeHtml($_code); ?>"
      value="<?= $block->escapeHtml($_code); ?>"
      type="radio" name="payment[method]"
      title="<?= $block->escapeHtml($_method->getTitle()); ?>"
      onclick="payment.switchMethod('<?= $block->escapeHtml($_code); ?>')"
      <?php if ($block->getSelectedMethodCode() == $_code) : ?>
      checked="checked"
      <?php endif; ?>

      class="admin__control-radio"
      **[![enter image description here][1]][1]**data-validate="'validate-one-required-by-name':true"/>****
      <?php else : ?>
      <span class="no-display">
      <input id="p_method_<?= $block->escapeHtml($_code); ?>"
      value="<?= $block->escapeHtml($_code); ?>"
      type="radio"
      name="payment[method]" class="admin__control-radio"
      checked="checked"/>
      </span>
      <?php endif; ?>

      <label class="admin__field-label" for="p_method_<?= $block->escapeHtml($_code); ?>">
      <?= $block->escapeHtml($_method->getTitle()) ?>
      </label>
      </dt>
      <dd class="admin__payment-method-wrapper">
      <?= /* @noEscape */ $block->getChildHtml('payment.method.' . $_code) ?>
      </dd>
      <?php endforeach; ?>
      </dl>
      </div>
      <script>
      require([
      'mage/apply/main',
      'Magento_Sales/order/create/form'
      ], function(mage)
      mage.apply();
      <?php if ($_methodsCount != 1) : ?>
      order.setPaymentMethod('<?= $block->escapeHtml($currentSelectedMethod); ?>');
      <?php else : ?>
      payment.switchMethod('<?= $block->escapeHtml($currentSelectedMethod); ?>');
      <?php endif; ?>
      );
      </script>
      <?php else : ?>
      <div class="admin__message-empty"><?= $block->escapeHtml(__('No Payment Methods')); ?></div>
      <?php endif; ?>


      I used data-validate="'validate-one-required-by-name':true"



      But its not working in 2.2.6 , its working fine in 2.3.1.



      Note- This issue is only coming with "Virtual Product".



      Admin Order Create



      please help







      payment-methods magento2.2.6 form-validation admin-order-create






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 24 at 14:31







      Deepak Rai

















      asked Jun 24 at 12:13









      Deepak RaiDeepak Rai

      6061 gold badge13 silver badges36 bronze badges




      6061 gold badge13 silver badges36 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%2f279413%2fmagento-2-payment-validation-not-working-offline-order-from-admin-in-magento-2-2%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%2f279413%2fmagento-2-payment-validation-not-working-offline-order-from-admin-in-magento-2-2%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

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

          Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

          Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?