How to Move Product Price Block After Add to Cart Button in Magento 2 Product Page
The default Magento 2 CMS offers features that prompt customers to make the purchase.
The layout of the online store plays an important role in the conversion rate. The default Magento 2 layout is designed in the same way.
However, sometimes as per the business requirements, the developer may need to customize the layout of the Magento 2 storefront.
For example, move product price block after add to cart button in Magento 2 product page.
The default Magento 2 displays the price as shown below:
Now, with the below method, you can customize the price position below the “Add to Cart” button.
Method to Move Product Price Block After Add to Cart Button in Magento 2 Product Page:
For simple products:
Go to app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml
1 |
<move element="product.info.price" destination="product.info.addtocart"/> |
For configurable products:
Go to app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view_type_configurable.xml
1 |
<move element="product.info.price" destination="product.info.addtocart.additional" /> |
That’s it.
Now, the product price is displayed as shown below:
Another amazing thing you can do while customizing the product page is to use custom price template in Magento 2 to change the way prices are displayed to the customers.
Any doubts? If so, feel free to mention them in the Comments section below.
I’d be happy to help you asap.
Also, do share the solution with the Magento community via social media.
Thank you.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
Prev
How to Configure Payment Failed Email in Magento 2
Meetanshi Magento Extensions Launches and Updates August [2021]
Next