0

I want to customize the bundle product page on the magento2 store. How to move the "add to cart" button to before "Go back before link", Also I want to validate fixed quantity too. So I can hide the "Customize and Add to Cart" button. Any help will be appreciated. Thanks

budle page

1

1 Answer 1

1

add the below code in

app/design/frontend/[Vendor_Theme]/[Theme]/Magento_Bundle/layout/catalog_product_view_type_bundle.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="product.info.addtocart.bundle" destination="product.info.bundle.options.top" before="-"/>
    </body>
</page>

Clear the cache and check.

3
  • Thanks Kishor, but the image gallery doesn't show. When I revert code it show again.
    – Tung
    Commented Feb 18, 2020 at 6:02
  • If you already have the catalog_product_view_type_bundle.xml in your theme, Then just add the <move element="product.info.addtocart.bundle" destination="product.info.bundle.options.top" before="-"/> in <body> tag, Don't replace whole file code. Commented Feb 18, 2020 at 6:04
  • Is it worked for you? Commented Feb 18, 2020 at 6:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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