0

I want to add customize add to add button near add to cart button and on that click, the product should add in the cart in magento2 I have followed this link:magento 2 Adding one more Add to cart button but no output is coming

1 Answer 1

2

Copy the below file:

vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml

to your theme like below:

app/design/frontend/[Vendor]/[theme]/Magento_Catalog/templates/product/view/addtocart.phtml

Add This For Secound Button :-

<div class="actions">
            <button type="submit"
                    title="<?= /* @escapeNotVerified */ $buttonTitle ?>"
                    class="action primary tocart"
                    id="product-addtocart-button">
                <span><?= /* @escapeNotVerified */ $buttonTitle ?></span>
            </button>
            <?= $block->getChildHtml('', true) ?>
        </div>

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.