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

          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