How can I move the add to cart button immediately below the price in Magento 2? I presume it's an XML update but I am unsure of the code required.

I want to move it from under the description to above the description.


copy "catalog_product_view.xml" file to your theme.




add below tag in body

<move element="product.info.addtocart" destination="product.info.price"  after="-" />

catalog_product_view file like

<?xml version="1.0"?>
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <move element="product.info.addtocart" destination="product.info.price" after="-"/>
  • I have applied the change in the file... redeployed static and cleared cache... but the page doesn't update. Any further advise please? – YorkieMagento Nov 17 '19 at 13:42
  • did you override catalog_product_view.xml file in your theme or custom module – Shinesh Nov 17 '19 at 15:40
  • Got it working Monarch. It seemed to be that I had to rm some of the var/ files. They must have been caching a layout element? – YorkieMagento Nov 28 '19 at 14:13

You need to add below code in catalog_product_view.xml file under


<move element="product.info.addtocart" destination="product.info.main" after="product.info.price"/>

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.