Replace the Add to Cart button
What it does
Put text or a button where a hidden Add to Cart button would be, so customers know how to order: "Contact us to order", a button with ordering information, a sign-in button or a WebForms form. Choose whether it shows on product pages, in product lists or in both. You set this up in Stores → Configuration → MageMe Extensions → HidePrice, in the Add To Cart Replacement group under General.
Before you start
- Elements to Hide is set to Both Price and Add to Cart or Add to Cart Only. The Add To Cart Replacement group appears only then. See Choose what to hide.
- For WebForms: Button With Popup, the WebForms Hide Price add-on is installed and the form exists. See Price request through a WebForms form.
Steps
-
Go to Stores → Configuration → MageMe Extensions → HidePrice. Expand General, then Add To Cart Replacement.
-
In Replace Add To Cart With, select what to show instead of the button. The options are described in Replace Add To Cart With.
-
If you selected Text, enter the text in Text, for example
Contact us to order. -
In Show In, select where the replacement shows. See Show In.

-
Click Save Config.
Replace Add To Cart With
| Option | What customers see where Add to Cart was | Fields that appear |
|---|---|---|
| N/A | Nothing. The button is removed and nothing takes its place. | None |
| Text | The text you enter. | Text |
| Button With Alert | A button that opens a dialog with your title, icon, message and a close button, for example your showroom addresses. | Button texts, colors and the dialog content |
| Authentication Button | A sign-in button. Signed-in customers don't see it. | Button text and colors |
| WebForms: Button With Popup | A button that opens a WebForms form in a popup. In the list only when the WebForms Hide Price add-on is installed. | Form, button text and CSS classes |
HidePrice Pro ships no default for Replace Add To Cart With. While nothing is saved, nothing takes the button's place, as with N/A.
Text is the field for the text replacement. It appears only when Replace Add To Cart With is Text and is empty until you fill it in. A product with its own Custom Text to Display Instead of Price shows that text in place of the price only: the Add to Cart spot still shows this Text.
The texts and colors of Button With Alert and Authentication Button are set in the same group. See Button text and colors. How the sign-in button works is described in Sign-in button (Authentication Button).
WebForms: Button With Popup appears in the list only when the WebForms Hide Price add-on is installed. The add-on adds the fields to pick the form and the button text. The setup is described in Price request through a WebForms form.
Show In
Show In appears for every option except N/A. Both options are selected by default.
| Option | Where the replacement shows |
|---|---|
| Product View | The product page. |
| Product Listing | Category pages, search results and other product lists. |
Where you clear an option, Add to Cart is still hidden there, but nothing takes its place.
In product lists
When a card's Add to Cart is hidden, the replacement shows in the button's place. If the price request form is on, its button (Ask for Price by default) also takes the place of Add to Cart on that card, so cards with and without a hidden button line up. On other cards it stays by the price. See Set up the price request form.
What you should see
Open a category with covered products. The cards show your replacement where Add to Cart was. On Luma, the card shows it when you point at the product.


Limits
- Every field of Add To Cart Replacement can differ per store view. See Store views and customer groups.
- The replacement takes the place the theme gives the button. If your theme moves it, your developer can set its position. See Theme integration.
- The replacement doesn't open a way to buy. The product can't be added to the cart while Add to Cart is hidden. See Where hidden prices stay hidden.
Troubleshooting
- Add to Cart is still visible. See Add to Cart is still visible.
- The replacement shows in the wrong place or twice. See The replacement shows in the wrong place or twice.
- WebForms: Button With Popup is not in the list. Install the WebForms Hide Price add-on. See Price request through a WebForms form.
What's next
- Button text and colors: match the buttons to your store.
- Catalogue without online ordering: prices stay visible, ordering goes through your team.
- Product options, wishlist and compare: hide the links that go with a hidden button.
- Add To Cart Replacement settings: every field of this group in one table.