Magento 2: Change UI templateHow can i rewrite TierPrice Block in Magento2How to add new custom field to billing address section in magento2Data population in UI formuiComponent Form. How to show data from DB tableMagento 2: How to add a Color Picker in Grid?Magento 2.2.0 - checkout_index_index.xml shippingAdditional not workingMultiple knockout uiComponents should not share the same data / seperate view instancesMagento 2.2.1: Add Custom Upload file attribute in CheckoutGrid action column custom callback with multiple params in magento2Shipping estimation block missing if there are many products on the cart

How to hide rifle during medieval town entrance inspection?

Can a human be transformed into a Mind Flayer?

Is it fine to get '204 No Content' in PATCH method

Bb13b9 confusion

How to make insert mode mapping count as multiple undos?

Why Does Mama Coco Look Old After Going to the Other World?

How to “listen” to existing circuit

Has there been a multiethnic Star Trek character?

How can one's career as a reviewer be ended?

New bike, tubeless tire will not inflate

Why are MBA programs closing?

Proving that a Russian cryptographic standard is too structured

What should I write in an apology letter, since I have decided not to join a company after accepting an offer letter

How can I remove material from this wood beam?

Why did my credit score plummet after a balance transfer?

Russian word for a male zebra

My boss want to get rid of me - what should I do?

Longest bridge/tunnel that can be cycled over/through?

Explain the ending of Black Mirror's "Smithereens"

What is the meaning of the Russian idiom "to taste tuna" ("отведать тунца")?

I've been given a project I can't complete, what should I do?

How to trick the reader into thinking they're following a redshirt instead of the protagonist?

A word that means "blending into a community too much"

With Ubuntu 18.04, how can I have a hot corner that locks the computer?



Magento 2: Change UI template


How can i rewrite TierPrice Block in Magento2How to add new custom field to billing address section in magento2Data population in UI formuiComponent Form. How to show data from DB tableMagento 2: How to add a Color Picker in Grid?Magento 2.2.0 - checkout_index_index.xml shippingAdditional not workingMultiple knockout uiComponents should not share the same data / seperate view instancesMagento 2.2.1: Add Custom Upload file attribute in CheckoutGrid action column custom callback with multiple params in magento2Shipping estimation block missing if there are many products on the cart






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








0















For the checkout, I would like to use a different UI template to that which is used on the cart. Currently, they both use the same UI template: <item name="template" xsi:type="string">ui/form/field</item>



checkout_cart_index.xml



...
<block class="MagentoCheckoutBlockCartShipping" name="checkout.cart.shipping" as="shipping" template="cart/shipping.phtml" after="checkout.cart.summary.title">
<arguments>
<argument name="jsLayout" xsi:type="array">
<item name="types" xsi:type="array">
<item name="form.input" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
<item name="config" xsi:type="array">
<item name="provider" xsi:type="string">checkoutProvider</item>
<item name="deps" xsi:type="array">
<item name="0" xsi:type="string">checkoutProvider</item>
</item>
<item name="template" xsi:type="string">ui/form/field</item>
<item name="elementTmpl" xsi:type="string">ui/form/element/input</item>
</item>
</item>
</item>
<item name="components" xsi:type="array">
<item name="summary-block-config" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item>
<item name="children" xsi:type="array">
<item name="shipping-rates-validation" xsi:type="array">
<item name="children" xsi:type="array">
<!--Step configuration components-->
</item>
</item>
</item>
</item>
...


checkout_index_index.xml



...
<block class="MagentoCheckoutBlockOnepage" name="checkout.root" template="onepage.phtml" cacheable="false">
<arguments>
<argument name="jsLayout" xsi:type="array">
<item name="types" xsi:type="array">
<item name="form.input" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
<item name="config" xsi:type="array">
<item name="provider" xsi:type="string">checkoutProvider</item>
<item name="deps" xsi:type="array">
<item name="0" xsi:type="string">checkoutProvider</item>
</item>
<item name="template" xsi:type="string">ui/form/field</item>
<item name="elementTmpl" xsi:type="string">ui/form/element/input</item>
</item>
</item>
</item>
...


As you can see, both are using the template <item name="template" xsi:type="string">ui/form/field</item>. I would like to change this template on the checkout to be something like: <item name="template" xsi:type="string">ui/form/field-checkout-only</item>, as I would like to add some more attributes to the fields when on checkout.



I've tried to do this by creating app/design/frontend/mitch/my_theme/Magento_Ui/web/templates/form/field-checkout-only.html – this didn't work.



I then tried to change the <item name="template" xsi:type="string">ui/form/field</item> to <item name="template" xsi:type="string">Magento_Ui::ui/form/field</item>, but this still doesn't work.



Any ideas?










share|improve this question




























    0















    For the checkout, I would like to use a different UI template to that which is used on the cart. Currently, they both use the same UI template: <item name="template" xsi:type="string">ui/form/field</item>



    checkout_cart_index.xml



    ...
    <block class="MagentoCheckoutBlockCartShipping" name="checkout.cart.shipping" as="shipping" template="cart/shipping.phtml" after="checkout.cart.summary.title">
    <arguments>
    <argument name="jsLayout" xsi:type="array">
    <item name="types" xsi:type="array">
    <item name="form.input" xsi:type="array">
    <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
    <item name="config" xsi:type="array">
    <item name="provider" xsi:type="string">checkoutProvider</item>
    <item name="deps" xsi:type="array">
    <item name="0" xsi:type="string">checkoutProvider</item>
    </item>
    <item name="template" xsi:type="string">ui/form/field</item>
    <item name="elementTmpl" xsi:type="string">ui/form/element/input</item>
    </item>
    </item>
    </item>
    <item name="components" xsi:type="array">
    <item name="summary-block-config" xsi:type="array">
    <item name="component" xsi:type="string">uiComponent</item>
    <item name="children" xsi:type="array">
    <item name="shipping-rates-validation" xsi:type="array">
    <item name="children" xsi:type="array">
    <!--Step configuration components-->
    </item>
    </item>
    </item>
    </item>
    ...


    checkout_index_index.xml



    ...
    <block class="MagentoCheckoutBlockOnepage" name="checkout.root" template="onepage.phtml" cacheable="false">
    <arguments>
    <argument name="jsLayout" xsi:type="array">
    <item name="types" xsi:type="array">
    <item name="form.input" xsi:type="array">
    <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
    <item name="config" xsi:type="array">
    <item name="provider" xsi:type="string">checkoutProvider</item>
    <item name="deps" xsi:type="array">
    <item name="0" xsi:type="string">checkoutProvider</item>
    </item>
    <item name="template" xsi:type="string">ui/form/field</item>
    <item name="elementTmpl" xsi:type="string">ui/form/element/input</item>
    </item>
    </item>
    </item>
    ...


    As you can see, both are using the template <item name="template" xsi:type="string">ui/form/field</item>. I would like to change this template on the checkout to be something like: <item name="template" xsi:type="string">ui/form/field-checkout-only</item>, as I would like to add some more attributes to the fields when on checkout.



    I've tried to do this by creating app/design/frontend/mitch/my_theme/Magento_Ui/web/templates/form/field-checkout-only.html – this didn't work.



    I then tried to change the <item name="template" xsi:type="string">ui/form/field</item> to <item name="template" xsi:type="string">Magento_Ui::ui/form/field</item>, but this still doesn't work.



    Any ideas?










    share|improve this question
























      0












      0








      0


      1






      For the checkout, I would like to use a different UI template to that which is used on the cart. Currently, they both use the same UI template: <item name="template" xsi:type="string">ui/form/field</item>



      checkout_cart_index.xml



      ...
      <block class="MagentoCheckoutBlockCartShipping" name="checkout.cart.shipping" as="shipping" template="cart/shipping.phtml" after="checkout.cart.summary.title">
      <arguments>
      <argument name="jsLayout" xsi:type="array">
      <item name="types" xsi:type="array">
      <item name="form.input" xsi:type="array">
      <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
      <item name="config" xsi:type="array">
      <item name="provider" xsi:type="string">checkoutProvider</item>
      <item name="deps" xsi:type="array">
      <item name="0" xsi:type="string">checkoutProvider</item>
      </item>
      <item name="template" xsi:type="string">ui/form/field</item>
      <item name="elementTmpl" xsi:type="string">ui/form/element/input</item>
      </item>
      </item>
      </item>
      <item name="components" xsi:type="array">
      <item name="summary-block-config" xsi:type="array">
      <item name="component" xsi:type="string">uiComponent</item>
      <item name="children" xsi:type="array">
      <item name="shipping-rates-validation" xsi:type="array">
      <item name="children" xsi:type="array">
      <!--Step configuration components-->
      </item>
      </item>
      </item>
      </item>
      ...


      checkout_index_index.xml



      ...
      <block class="MagentoCheckoutBlockOnepage" name="checkout.root" template="onepage.phtml" cacheable="false">
      <arguments>
      <argument name="jsLayout" xsi:type="array">
      <item name="types" xsi:type="array">
      <item name="form.input" xsi:type="array">
      <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
      <item name="config" xsi:type="array">
      <item name="provider" xsi:type="string">checkoutProvider</item>
      <item name="deps" xsi:type="array">
      <item name="0" xsi:type="string">checkoutProvider</item>
      </item>
      <item name="template" xsi:type="string">ui/form/field</item>
      <item name="elementTmpl" xsi:type="string">ui/form/element/input</item>
      </item>
      </item>
      </item>
      ...


      As you can see, both are using the template <item name="template" xsi:type="string">ui/form/field</item>. I would like to change this template on the checkout to be something like: <item name="template" xsi:type="string">ui/form/field-checkout-only</item>, as I would like to add some more attributes to the fields when on checkout.



      I've tried to do this by creating app/design/frontend/mitch/my_theme/Magento_Ui/web/templates/form/field-checkout-only.html – this didn't work.



      I then tried to change the <item name="template" xsi:type="string">ui/form/field</item> to <item name="template" xsi:type="string">Magento_Ui::ui/form/field</item>, but this still doesn't work.



      Any ideas?










      share|improve this question














      For the checkout, I would like to use a different UI template to that which is used on the cart. Currently, they both use the same UI template: <item name="template" xsi:type="string">ui/form/field</item>



      checkout_cart_index.xml



      ...
      <block class="MagentoCheckoutBlockCartShipping" name="checkout.cart.shipping" as="shipping" template="cart/shipping.phtml" after="checkout.cart.summary.title">
      <arguments>
      <argument name="jsLayout" xsi:type="array">
      <item name="types" xsi:type="array">
      <item name="form.input" xsi:type="array">
      <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
      <item name="config" xsi:type="array">
      <item name="provider" xsi:type="string">checkoutProvider</item>
      <item name="deps" xsi:type="array">
      <item name="0" xsi:type="string">checkoutProvider</item>
      </item>
      <item name="template" xsi:type="string">ui/form/field</item>
      <item name="elementTmpl" xsi:type="string">ui/form/element/input</item>
      </item>
      </item>
      </item>
      <item name="components" xsi:type="array">
      <item name="summary-block-config" xsi:type="array">
      <item name="component" xsi:type="string">uiComponent</item>
      <item name="children" xsi:type="array">
      <item name="shipping-rates-validation" xsi:type="array">
      <item name="children" xsi:type="array">
      <!--Step configuration components-->
      </item>
      </item>
      </item>
      </item>
      ...


      checkout_index_index.xml



      ...
      <block class="MagentoCheckoutBlockOnepage" name="checkout.root" template="onepage.phtml" cacheable="false">
      <arguments>
      <argument name="jsLayout" xsi:type="array">
      <item name="types" xsi:type="array">
      <item name="form.input" xsi:type="array">
      <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
      <item name="config" xsi:type="array">
      <item name="provider" xsi:type="string">checkoutProvider</item>
      <item name="deps" xsi:type="array">
      <item name="0" xsi:type="string">checkoutProvider</item>
      </item>
      <item name="template" xsi:type="string">ui/form/field</item>
      <item name="elementTmpl" xsi:type="string">ui/form/element/input</item>
      </item>
      </item>
      </item>
      ...


      As you can see, both are using the template <item name="template" xsi:type="string">ui/form/field</item>. I would like to change this template on the checkout to be something like: <item name="template" xsi:type="string">ui/form/field-checkout-only</item>, as I would like to add some more attributes to the fields when on checkout.



      I've tried to do this by creating app/design/frontend/mitch/my_theme/Magento_Ui/web/templates/form/field-checkout-only.html – this didn't work.



      I then tried to change the <item name="template" xsi:type="string">ui/form/field</item> to <item name="template" xsi:type="string">Magento_Ui::ui/form/field</item>, but this still doesn't work.



      Any ideas?







      magento2 checkout cart xml






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 9 '16 at 11:13









      Mitch7663Mitch7663

      81112




      81112




















          1 Answer
          1






          active

          oldest

          votes


















          0














          For custom theme remove web folder



          Change



          app/design/frontend/mitch/my_theme/Magento_Ui/web/templates/form/field-checkout-only.html 


          To



          app/design/frontend/mitch/my_theme/Magento_Ui/templates/form/field-checkout-only.html 





          share|improve this answer























          • Unfortunately, that didn't work. Any other ideas? Thanks for your input.

            – Mitch7663
            Nov 9 '16 at 13:46











          • @Mitch7663 did you check with default file it is working or not?

            – Fme Extensions
            Nov 10 '16 at 5:30











          • I worked out Magento have also specified the template in the MagentoCheckoutBlockCheckoutAttributeMerger class... ` 'config' => [ 'customScope' => $dataScopePrefix, 'template' => 'ui/form/field', 'elementTmpl' => 'ui/form/element/input' ],` Which isn't helpful :-(

            – Mitch7663
            Nov 10 '16 at 9:25












          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%2f144891%2fmagento-2-change-ui-template%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          For custom theme remove web folder



          Change



          app/design/frontend/mitch/my_theme/Magento_Ui/web/templates/form/field-checkout-only.html 


          To



          app/design/frontend/mitch/my_theme/Magento_Ui/templates/form/field-checkout-only.html 





          share|improve this answer























          • Unfortunately, that didn't work. Any other ideas? Thanks for your input.

            – Mitch7663
            Nov 9 '16 at 13:46











          • @Mitch7663 did you check with default file it is working or not?

            – Fme Extensions
            Nov 10 '16 at 5:30











          • I worked out Magento have also specified the template in the MagentoCheckoutBlockCheckoutAttributeMerger class... ` 'config' => [ 'customScope' => $dataScopePrefix, 'template' => 'ui/form/field', 'elementTmpl' => 'ui/form/element/input' ],` Which isn't helpful :-(

            – Mitch7663
            Nov 10 '16 at 9:25
















          0














          For custom theme remove web folder



          Change



          app/design/frontend/mitch/my_theme/Magento_Ui/web/templates/form/field-checkout-only.html 


          To



          app/design/frontend/mitch/my_theme/Magento_Ui/templates/form/field-checkout-only.html 





          share|improve this answer























          • Unfortunately, that didn't work. Any other ideas? Thanks for your input.

            – Mitch7663
            Nov 9 '16 at 13:46











          • @Mitch7663 did you check with default file it is working or not?

            – Fme Extensions
            Nov 10 '16 at 5:30











          • I worked out Magento have also specified the template in the MagentoCheckoutBlockCheckoutAttributeMerger class... ` 'config' => [ 'customScope' => $dataScopePrefix, 'template' => 'ui/form/field', 'elementTmpl' => 'ui/form/element/input' ],` Which isn't helpful :-(

            – Mitch7663
            Nov 10 '16 at 9:25














          0












          0








          0







          For custom theme remove web folder



          Change



          app/design/frontend/mitch/my_theme/Magento_Ui/web/templates/form/field-checkout-only.html 


          To



          app/design/frontend/mitch/my_theme/Magento_Ui/templates/form/field-checkout-only.html 





          share|improve this answer













          For custom theme remove web folder



          Change



          app/design/frontend/mitch/my_theme/Magento_Ui/web/templates/form/field-checkout-only.html 


          To



          app/design/frontend/mitch/my_theme/Magento_Ui/templates/form/field-checkout-only.html 






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 9 '16 at 11:29









          Fme ExtensionsFme Extensions

          1,258415




          1,258415












          • Unfortunately, that didn't work. Any other ideas? Thanks for your input.

            – Mitch7663
            Nov 9 '16 at 13:46











          • @Mitch7663 did you check with default file it is working or not?

            – Fme Extensions
            Nov 10 '16 at 5:30











          • I worked out Magento have also specified the template in the MagentoCheckoutBlockCheckoutAttributeMerger class... ` 'config' => [ 'customScope' => $dataScopePrefix, 'template' => 'ui/form/field', 'elementTmpl' => 'ui/form/element/input' ],` Which isn't helpful :-(

            – Mitch7663
            Nov 10 '16 at 9:25


















          • Unfortunately, that didn't work. Any other ideas? Thanks for your input.

            – Mitch7663
            Nov 9 '16 at 13:46











          • @Mitch7663 did you check with default file it is working or not?

            – Fme Extensions
            Nov 10 '16 at 5:30











          • I worked out Magento have also specified the template in the MagentoCheckoutBlockCheckoutAttributeMerger class... ` 'config' => [ 'customScope' => $dataScopePrefix, 'template' => 'ui/form/field', 'elementTmpl' => 'ui/form/element/input' ],` Which isn't helpful :-(

            – Mitch7663
            Nov 10 '16 at 9:25

















          Unfortunately, that didn't work. Any other ideas? Thanks for your input.

          – Mitch7663
          Nov 9 '16 at 13:46





          Unfortunately, that didn't work. Any other ideas? Thanks for your input.

          – Mitch7663
          Nov 9 '16 at 13:46













          @Mitch7663 did you check with default file it is working or not?

          – Fme Extensions
          Nov 10 '16 at 5:30





          @Mitch7663 did you check with default file it is working or not?

          – Fme Extensions
          Nov 10 '16 at 5:30













          I worked out Magento have also specified the template in the MagentoCheckoutBlockCheckoutAttributeMerger class... ` 'config' => [ 'customScope' => $dataScopePrefix, 'template' => 'ui/form/field', 'elementTmpl' => 'ui/form/element/input' ],` Which isn't helpful :-(

          – Mitch7663
          Nov 10 '16 at 9:25






          I worked out Magento have also specified the template in the MagentoCheckoutBlockCheckoutAttributeMerger class... ` 'config' => [ 'customScope' => $dataScopePrefix, 'template' => 'ui/form/field', 'elementTmpl' => 'ui/form/element/input' ],` Which isn't helpful :-(

          – Mitch7663
          Nov 10 '16 at 9:25


















          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%2f144891%2fmagento-2-change-ui-template%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?