I want to move product custom options section below add to cart button. I am using Luma theme. How to achieve this?
2
I found a solution with the help of @pritim Info 24. Here is the link:
https://magento.stackexchange.com/questions/251722/magento-2-how-to-move-custom-options-after-cart-button
In your /Vendor/Theme/Magento_Catalog/layout folder, create a catalog_product_view.xml
/Vendor/Theme/Magento_Catalog/layout
catalog_product_view.xml
Inside the <body> tag you can use the move directive to rearrange the standard layout from Luma. This should do the trick:
<body>
<?xml version="1.0"?> <page layout="2columns-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> <body> <move element="product.info.options.wrapper.bottom" destination="product.info.form.options" before="product.info.options.wrapper"></move> </body> </page>
Also, refer to magento devdocs on this topic: https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-manage.html
From an e-commerce point of view though I can’t think of a single usecase where this would be intuitive and good usablity. But that is offtopic.
Click here to cancel reply.
2
Answers
I found a solution with the help of @pritim Info 24. Here is the link:
https://magento.stackexchange.com/questions/251722/magento-2-how-to-move-custom-options-after-cart-button
In your
/Vendor/Theme/Magento_Catalog/layout
folder, create acatalog_product_view.xml
Inside the
<body>
tag you can use the move directive to rearrange the standard layout from Luma. This should do the trick:Also, refer to magento devdocs on this topic: https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-manage.html
From an e-commerce point of view though I can’t think of a single usecase where this would be intuitive and good usablity. But that is offtopic.