1

I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.

On the cart page, the cart totals are the above the cart products:

enter image description here

I want the "totals" to go below the products table, inside the cart form:

enter image description here

Question:

  1. Would doing this affect the checkout process?
  2. Can I achieve this by copying the contents of totals.html inside form.phtml? The path:

    app/design/frontend/Vendor/Theme/Magento_Checkout/templates/cart/form.phtml

The checkout_cart_index.xml in the theme is:

app/design/frontend/Vendor/Theme/Magento_Checkout/layout/checkout_cart_index.xml

The full code of checkout_cart_index.xml is in this Pastebin.

  • It will not affect the checkout process, & there is no need to do copy the code from totals.html to form.phtml. Can you put the code of checkout_index.index.xml – Abhishek Tripathi Feb 5 '18 at 16:53
  • Is it not checkout_cart_index.xml? – Razvan Zamfir Feb 6 '18 at 9:03
  • Yes for cart it is checkout_cart_index.xml – Abhishek Tripathi Feb 6 '18 at 18:25
  • I think it is not that xml file please put the xml file which is present in your theme/Magento_Checkout – Abhishek Tripathi Feb 7 '18 at 19:00
  • That is the XML file in my theme. – Razvan Zamfir Feb 12 '18 at 9:01
0

I copied checkout_cart_index.xmlto

app/design/frontend/Vendor/Theme/Magento_Checkout/layout/checkout_cart_index.xml

In this file I added:

<move element="cart.summary" destination="checkout.cart.items" after="checkout.cart.form"/>

The totals went under the products.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.