Magento 2 : checkout_cart_index.xml problemMagento 2 Override Shipping TemplateMagento 2 - Update Cart Block...

Why do no American passenger airlines still operate dedicated cargo flights?

How to remove lines through the legend markers in ListPlot?

How to count the characters of jar files by wc

Can making a creature unable to attack after it has been assigned as an attacker remove it from combat?

Why would the Pakistan airspace closure cancel flights not headed to Pakistan itself?

Why avoid shared user accounts?

Publishing research using outdated methods

Can I use a mote from Crown of Stars to attack and also cast Eldritch Blast on the same turn?

Avoiding morning and evening handshakes

How much mayhem could I cause as a sentient fish?

Why did other German political parties disband so fast when Hitler was appointed chancellor?

What is the purpose of easy combat scenarios that don't need resource expenditure?

What is 6÷2×(1+2) =?

My cat mixes up the floors in my building. How can I help him?

Can I string the D&D Starter Set campaign into another module, keeping the same characters?

Why has the mole been redefined for 2019?

Why are the books in the Game of Thrones citadel library shelved spine inwards?

How to say "Brexit" in Latin?

Finding a mistake using Mayer-Vietoris

How to solve a large system of linear algebra?

Caruana vs Carlsen game 10 (WCC) why not 18...Nxb6?

Which one of these password policies is more secure?

In Linux what happens if 1000 files in a directory are moved to another location while another 300 files were added to the source directory?

Intern applicant asking for compensation equivalent to that of permanent employee



Magento 2 : checkout_cart_index.xml problem


Magento 2 Override Shipping TemplateMagento 2 - Update Cart Block with Custom Discount ValueAre we forced to rewrite a template in Magento2 when rewritting a block?Override module-contact view and controllerMagento 2: Adding a new Block to Checkout_Cart_Item_RendererCreate a horizontal menu into a block using megamenuMagento2: Apply coupon code to regular price not to special priceGENERATE THIS REPORT: main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_Move/Push page.main.title block into Breadcrumbs Magento2Working of discount coupons on the checkout page in Magento 2.2.2













1















When I copy checkout_cart_index.xml page to my theme it works fine but when I change



<block class="MagentoCheckoutBlockCartGrid" name="checkout.cart.form" as="cart-items" template="Magento_Checkout::cart/form.phtml" after="cart.summary">


to



<block class="MagentoCheckoutBlockCartGrid" name="checkout.cart.form" as="cart-items" template="Magento_Theme::cart/form.phtml" after="cart.summary">


For overriding a template file from my theme the discount coupon form disappears and it also disappears from from html too.



Thanks in advance.










share|improve this question




















  • 1





    only phtml file override as your theme path folder not to xml file need to override.

    – Vijay-CyberLocker
    Feb 21 '18 at 12:40











  • If I do not override XML theme path it get template from module_checkout rather than my custom_theme

    – Abdullah Shahid
    Feb 21 '18 at 13:10
















1















When I copy checkout_cart_index.xml page to my theme it works fine but when I change



<block class="MagentoCheckoutBlockCartGrid" name="checkout.cart.form" as="cart-items" template="Magento_Checkout::cart/form.phtml" after="cart.summary">


to



<block class="MagentoCheckoutBlockCartGrid" name="checkout.cart.form" as="cart-items" template="Magento_Theme::cart/form.phtml" after="cart.summary">


For overriding a template file from my theme the discount coupon form disappears and it also disappears from from html too.



Thanks in advance.










share|improve this question




















  • 1





    only phtml file override as your theme path folder not to xml file need to override.

    – Vijay-CyberLocker
    Feb 21 '18 at 12:40











  • If I do not override XML theme path it get template from module_checkout rather than my custom_theme

    – Abdullah Shahid
    Feb 21 '18 at 13:10














1












1








1








When I copy checkout_cart_index.xml page to my theme it works fine but when I change



<block class="MagentoCheckoutBlockCartGrid" name="checkout.cart.form" as="cart-items" template="Magento_Checkout::cart/form.phtml" after="cart.summary">


to



<block class="MagentoCheckoutBlockCartGrid" name="checkout.cart.form" as="cart-items" template="Magento_Theme::cart/form.phtml" after="cart.summary">


For overriding a template file from my theme the discount coupon form disappears and it also disappears from from html too.



Thanks in advance.










share|improve this question
















When I copy checkout_cart_index.xml page to my theme it works fine but when I change



<block class="MagentoCheckoutBlockCartGrid" name="checkout.cart.form" as="cart-items" template="Magento_Checkout::cart/form.phtml" after="cart.summary">


to



<block class="MagentoCheckoutBlockCartGrid" name="checkout.cart.form" as="cart-items" template="Magento_Theme::cart/form.phtml" after="cart.summary">


For overriding a template file from my theme the discount coupon form disappears and it also disappears from from html too.



Thanks in advance.







magento2 layout






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 21 '18 at 14:03









Matt Antley

1,061518




1,061518










asked Feb 21 '18 at 12:33









Abdullah ShahidAbdullah Shahid

7910




7910








  • 1





    only phtml file override as your theme path folder not to xml file need to override.

    – Vijay-CyberLocker
    Feb 21 '18 at 12:40











  • If I do not override XML theme path it get template from module_checkout rather than my custom_theme

    – Abdullah Shahid
    Feb 21 '18 at 13:10














  • 1





    only phtml file override as your theme path folder not to xml file need to override.

    – Vijay-CyberLocker
    Feb 21 '18 at 12:40











  • If I do not override XML theme path it get template from module_checkout rather than my custom_theme

    – Abdullah Shahid
    Feb 21 '18 at 13:10








1




1





only phtml file override as your theme path folder not to xml file need to override.

– Vijay-CyberLocker
Feb 21 '18 at 12:40





only phtml file override as your theme path folder not to xml file need to override.

– Vijay-CyberLocker
Feb 21 '18 at 12:40













If I do not override XML theme path it get template from module_checkout rather than my custom_theme

– Abdullah Shahid
Feb 21 '18 at 13:10





If I do not override XML theme path it get template from module_checkout rather than my custom_theme

– Abdullah Shahid
Feb 21 '18 at 13:10










2 Answers
2






active

oldest

votes


















1














If you want to override the the .phtml template file try to put your form.phtml file inside




app/design/frontend/YourVendorThemeName/YourAciveThemeName/Magento_Checkout/templates/cart/form.phtml




You should use setTemplate action in layout xml file, if you want to override phtml from your custom module



checkout_cart_index.xml



    <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.cart.form">
<action method="setTemplate">
<argument name="template" xsi:type="string">Magento_Theme::cart/form.phtml</argument>
</action>
</referenceBlock>
</body>
</page>





share|improve this answer

































    0














    All I do is move checkout.cart.coupon to my container and it is was apparent where I want. Here is the code



    <move element="checkout.cart.coupon" destination="summary-col1" before="-"/>





    share|improve this answer

























      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%2f214439%2fmagento-2-checkout-cart-index-xml-problem%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      If you want to override the the .phtml template file try to put your form.phtml file inside




      app/design/frontend/YourVendorThemeName/YourAciveThemeName/Magento_Checkout/templates/cart/form.phtml




      You should use setTemplate action in layout xml file, if you want to override phtml from your custom module



      checkout_cart_index.xml



          <?xml version="1.0"?>
      <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
      <body>
      <referenceBlock name="checkout.cart.form">
      <action method="setTemplate">
      <argument name="template" xsi:type="string">Magento_Theme::cart/form.phtml</argument>
      </action>
      </referenceBlock>
      </body>
      </page>





      share|improve this answer






























        1














        If you want to override the the .phtml template file try to put your form.phtml file inside




        app/design/frontend/YourVendorThemeName/YourAciveThemeName/Magento_Checkout/templates/cart/form.phtml




        You should use setTemplate action in layout xml file, if you want to override phtml from your custom module



        checkout_cart_index.xml



            <?xml version="1.0"?>
        <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
        <referenceBlock name="checkout.cart.form">
        <action method="setTemplate">
        <argument name="template" xsi:type="string">Magento_Theme::cart/form.phtml</argument>
        </action>
        </referenceBlock>
        </body>
        </page>





        share|improve this answer




























          1












          1








          1







          If you want to override the the .phtml template file try to put your form.phtml file inside




          app/design/frontend/YourVendorThemeName/YourAciveThemeName/Magento_Checkout/templates/cart/form.phtml




          You should use setTemplate action in layout xml file, if you want to override phtml from your custom module



          checkout_cart_index.xml



              <?xml version="1.0"?>
          <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
          <body>
          <referenceBlock name="checkout.cart.form">
          <action method="setTemplate">
          <argument name="template" xsi:type="string">Magento_Theme::cart/form.phtml</argument>
          </action>
          </referenceBlock>
          </body>
          </page>





          share|improve this answer















          If you want to override the the .phtml template file try to put your form.phtml file inside




          app/design/frontend/YourVendorThemeName/YourAciveThemeName/Magento_Checkout/templates/cart/form.phtml




          You should use setTemplate action in layout xml file, if you want to override phtml from your custom module



          checkout_cart_index.xml



              <?xml version="1.0"?>
          <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
          <body>
          <referenceBlock name="checkout.cart.form">
          <action method="setTemplate">
          <argument name="template" xsi:type="string">Magento_Theme::cart/form.phtml</argument>
          </action>
          </referenceBlock>
          </body>
          </page>






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 21 '18 at 14:24

























          answered Feb 21 '18 at 14:18









          Idham ChoudryIdham Choudry

          1,27811038




          1,27811038

























              0














              All I do is move checkout.cart.coupon to my container and it is was apparent where I want. Here is the code



              <move element="checkout.cart.coupon" destination="summary-col1" before="-"/>





              share|improve this answer






























                0














                All I do is move checkout.cart.coupon to my container and it is was apparent where I want. Here is the code



                <move element="checkout.cart.coupon" destination="summary-col1" before="-"/>





                share|improve this answer




























                  0












                  0








                  0







                  All I do is move checkout.cart.coupon to my container and it is was apparent where I want. Here is the code



                  <move element="checkout.cart.coupon" destination="summary-col1" before="-"/>





                  share|improve this answer















                  All I do is move checkout.cart.coupon to my container and it is was apparent where I want. Here is the code



                  <move element="checkout.cart.coupon" destination="summary-col1" before="-"/>






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 42 mins ago









                  Teja Bhagavan Kollepara

                  2,96341847




                  2,96341847










                  answered Feb 22 '18 at 8:09









                  Abdullah ShahidAbdullah Shahid

                  7910




                  7910






























                      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%2f214439%2fmagento-2-checkout-cart-index-xml-problem%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

                      “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

                      How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

                      變成蝙蝠會怎樣? 參考資料 外部連結 导航菜单Thomas Nagel, "What is it like to be a...