Skip to main content

All Questions

Filter by
Sorted by
Tagged with
16 votes
5 answers
19k views

How to "add to cart" a product with custom input field and save it to Database?

I had created a custom module in which I am overriding the add to cart form on the product page, and I successfully did it with catalog_product_view.xml file. Now I can see a custom input field on the ...
Fayyaz Khattak's user avatar
1 vote
0 answers
288 views

Magento 2 Remove Add to Cart button and Add New Custom Button

I am creating a module. I have create one custom product attribute which value is YES/NO. if product attribute value is Yes then Add to Cart Button hide And Show Custom Button if product attribute ...
Msquare's user avatar
  • 9,328
3 votes
2 answers
4k views

Magento 2 . How to hide 'Add to cart' button while not logged in

This is how I tried but its not working Bodak/DisableAddToCart/etc/adminhtml/system.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
Asad Khan's user avatar
  • 1,486
2 votes
1 answer
1k views

Magento 2: Add multiple products to cart programmatically does not work if cart is empty!

I have the same problem as mentioned in this Question: Magento 2: Add multiple products to cart programmatically But it was never answered. This is my Controller.php: <?php namespace MassiveArt\...
Felix Schönherr's user avatar