Questions tagged [custom-button]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
2 answers
2k views

Magento2 : How to show button in admin for custom module page?

I want to show the button in my custom module (admin page) but I am getting an error I want to add a button and how I add action process for that button i already tried this answer : (https://...
2 votes
1 answer
2k views

how to add onclick method in magento2 admin custom module page?

my edit.php file in magento admin custom module $this->addButton( 'approve', [ 'label' => __('Approve'), 'onclick' => 'deleteConfirm('...
0 votes
1 answer
18 views

Magento 2.4.2 - Create button for Notify me when this product is in stock

How do I change "Notify me when this product is in stock" text into a button? I have duplicated /vendor/magento/module-product-alert/view/frontend/templates/product/view.phtml to local theme....
3 votes
1 answer
446 views

How to get the Form post data on custom button click in magento2

I have created a custom button in UI component magento2 I want to have post data ( id ) on button click in controller Button in UI Component <item name="combinations" xsi:type="...
0 votes
1 answer
1k views

Failed to call function "on click" in magento 2

I have created the add button using the below block file. On button click, I have called return FilterControl.addItem() from my template file seo.phtml But it shows errors like below Uncaught ...
0 votes
2 answers
39 views

How can I make the button be black and white with round edges?

Banners have the correct button I want, black with white text and rounded edges The buttons added to the page have a burgundy boarder and blue text Can someone help as I cant find this anywhere in ...
0 votes
1 answer
60 views

How can we edit the general button text and URL

How can we change the text and link to this given button provided in screenshot? This is present at homepage of the website. We want it to text'Our Hot Sellers' and also change its landing page
1 vote
1 answer
71 views

Admin grid form submit button not working

When I open my admin grid form and click the Save button, nothing happens, the button just displays as clicked (no network activity, no errors in console or logs, doesnt reach Index/Save.php). When I ...
0 votes
0 answers
37 views

Inserting button in mini cart which is loaded by a javascript code

I need to add button in mini cart just below the "Proceed to checkout" button. And the button is loaded using this javascript code: let sourceUrl = "{some_url/index.js}"; let ...
0 votes
0 answers
23 views

Inserting button with javascript/web component

I am a complete newbie to Magento development and I am CSE student working as an intern. My question is as follows: Is it possible to add a button to a Magento 2 page with JavaScript and web ...
0 votes
1 answer
501 views

Need to add the button next to the add to cart button

Changed the code in add to cart phtml file but it is not showing changes in the file. <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ **...
1 vote
4 answers
3k views

Magento2: Create toggle button yes/no in admin product page

I want to create a toggle button yes/no in the product or category admin side page. also eager to know its description of flow and binding process. I followed many tutorials but don't get the exact ...
0 votes
2 answers
494 views

Add a custom button to Customer registration form on the admin

I want to add a custom button like "Generate a random email", into customer registration form section. "Generate a random email" button will send an email to customer which are ...
0 votes
1 answer
669 views

How do I add onclick functionality to a custom button on admin side?

I am able to add a button to Product Listing page. But how do I add onclick to it? This is how I am adding the button: $subject->addButton('amazon_sync_button',[ 'label' => __('Sync ...
0 votes
2 answers
1k views

magento 2.4 get scoped store id (or website id) for button in system config section

I need a button in stores > configuration that retrieves product data for the store view selected in the "scope" of the configuration. I created the button but I cannot retrieve the store ...
0 votes
4 answers
699 views

How to add Button in Magenot 2 Sales order Grid with out a link?

I want to add a button without a link at the sales grid top in Magento 2.4 SS: Anyone has any idea how to add only a button with a custom ( ID or class ). Any help is appreciated.
0 votes
1 answer
1k views

Magento 2 Add Button in Edit Product page and land back there after POST request

So, as the title says, I want to add an Admin button in the Edit Product Admin page. That button, when pressed, will call the respective controller of a URL, sending along the product id, the ...
0 votes
1 answer
296 views

Magento2 : How to add button in admin custom module page?

I want to add one button here how I can add code?? and how to add action controller any idea ?? i already tried this answer(https://magento.stackexchange.com/a/212656/73525) but showing error ...
1 vote
2 answers
1k views

How to create a SaveAndContinue button on UI Component form?

I'm new at magento 2 and I'm trying to create a "SaveAndContinue" button. I created the classes, but when i click the SaveAndContinue button on the form, it calls the "save" ...
1 vote
2 answers
802 views

Why the button doesn't working on a UI Component Admin Form?

I'm trying to create a Button Field on a UI Component Admin Form but it looks like it's not calling the Controller. It doesn't call the custom controller,But it works when i call the defaults of ...
7 votes
2 answers
10k views

Magento 2 How to do export products csv & xml from admin end?

I would like to implement export catalog products functionality from admin end from custom module. I have followed below steps for displaying export button at admin end catalog > products but unable ...
3 votes
4 answers
6k views

Magento 2 Admin Grid Add/Update Button

In Magento 2.2.5, I am creating admin grid by following this tutorial(Using layout Block method. Not UI Component). In that I have a add button. I can't remove it. I need to remove it and add a new ...
2 votes
1 answer
3k views

Magento 2 add new Button in admin Controller

I am working on module which will work for sync product from Third party Api.I have already created admin controller page but don't have Idea how to add button Sync Products whose action will call a ...
1 vote
2 answers
545 views

UI Component: position custom split button?

Magento 2.3.0 I've added an split button to admin product edit page with this code ... <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
0 votes
0 answers
28 views

Need to modify the product detail page for adding a button beside the add to cart button

<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ /** @var $block \Magento\Catalog\Block\Product\View */ ?> <?php $_product = $block->...
0 votes
1 answer
616 views

How to add custom button in sales order view in admin after cancel button

I have added custom button in sales order view on admin .But I need the custom button next to cancel button.
0 votes
1 answer
217 views

How to close the current tab in magento 2 custom page?

I have created one custom page .In this page one link is there ,while clicking the link I need to close the custom page .how can we achieve this?
0 votes
1 answer
322 views

How to trigger 3rd party api when button onclick?

I want to trigger a 3rd party api when admin clicking on the 'Send Contract'button in Sales Order View. This is the code for my button plugin: <?php namespace MarsMage\Eversign\Plugin\Sales\...
3 votes
2 answers
3k views

Magento 2.3: Fatal error: Uncaught Error: Call to undefined method Magento\Framework\View\Element\UiComponent\Context::getUrlBuilder()

I'm new to Magento 2.3, I'm getting an error when I hit Add New Banner button, Grid is loading perfectly, error appear when i try to open form, I don't know how to resolve this, BTW I copied this ...
0 votes
3 answers
2k views

How to add a custom link to product page magento 2

I want to add custom link in More Information tab. See attached screenshot: I want to give a link instead of text
0 votes
1 answer
189 views

Magento 2 External URL button in admin order

I made a custom button in sales->orders. Which should direct to another external url(www.google.com). In my app/code/vendor/module/Block/Adminhtml/Sales i have: CustomButton.php <?php namespace ...
1 vote
0 answers
112 views

How to turn login buttons into icons?

I need to remove the login and logout buttons and add an icon for this, an account icon, how can I make this change to my theme? Basically I need to transform this ... In that..
0 votes
0 answers
341 views

Magento 2 How to generate button dropdown

I am new with Magento 2 and web development. I don't understand how to create dropdown button. I saw some style in below website and I am not sure how to use it. http://www.bergo.nl/pub/static/...
0 votes
1 answer
237 views

How to create a button on custom page backend

I'm looking to add a button that executes my own custom code. I've successfully created the page, along with a button but I can't for the life of me get it todo anything. I've stripped it back down to ...
3 votes
3 answers
2k views

How to put a PHP function in a Button "on click" attribute?

Hi i'm new at magento2 and i want to put a PHP function in an "on click" attribute of a button on ui component form. Specifically on this "Save Header" button. So, actually i want ...
1 vote
0 answers
209 views

How to create "Delete And Continue" button on UI Component Form

I'm new at Magento 2, and I'm trying to create a custom button on an UI Component form. But I don't know what to put in the "actionName" field of the button. When I put the "save, back, ...
0 votes
1 answer
375 views

Product view back button

I'm using magento 2.3, may i ask how can i made a back button on product view page. Beacuse i tried this code but not working in the product view page. Anyone can help? thank you!! <a class="...
0 votes
1 answer
334 views

How to add a button adjacent to add to cart button in magento v2.2.0 using uiComponent?

How to add a button adjacent to add to cart button using uiComponent in magento 2.2.0.. https://i.stack.imgur.com/evz8C.jpg like this image,
0 votes
2 answers
348 views

Custom button in product form does not generate a proper form key

So I need to add a Save & Close button on the product grid. It even works, but not quite so. On clicking that button product is saved, and redirect to product grid happens. But with an error "...
0 votes
1 answer
2k views

Magento2: Function of enable/disable (yes/no) button for any module

I Have a module for the new shipment method with dropdown option (yes/no), to enable and disable the module function. I want to know how the module function works off while select No, and module work ...
1 vote
1 answer
3k views

Magento 2.3: How to Echo From Controller On Button Click?

I'm very new to Magento, I have a custom module and some tabs and fields in it, i have an 'import' tab, in that their is 'Import' button, just want to know the workflow of that button, like on button ...
1 vote
1 answer
2k views

How to add custom button under the phone number field in one page checkout in Magento 2?

I need to add a button under the phone number filed in the shipping address section in a one-page checkout and the button should be visible only when the user enters the phone number. Based on the ...
1 vote
1 answer
2k views

Magento2: Toggle button yes/no to enable/disable module function in shipment method/

For the new shipment method, I created a toggle button yes/no to enable/disable module function. But the issue is while selecting yes or no module unable to work in that button function. please check ...
0 votes
1 answer
357 views

I want to display apple pay button on checkout page magento2

I want to display apple pay button on checkout page magento2 how acheived that
3 votes
1 answer
1k views

Remove "add new customer" button in ui component grid with condition base?

I want to remove the "add new customer" button in condition base. "add new customer" button only display for main admin, not any child admin. any have an idea about the same problem. Thank you in ...
1 vote
0 answers
52 views

Error when I press the button

Create module Create admin grid Create button "ADD" Create Form | Controller | Block When I press on button "ADD" Magento Admin 404 Error Page not found Where can there be a mistake? where to ...
0 votes
1 answer
963 views

How can i add custom button (not add to cart) in product page in Magento2?

I want to add a new button to the product page , in which file can I add or should I create a module for this?
5 votes
1 answer
102 views

Add button on product page

I want to add a button only on those products which are having product size.Button displaying over Color attribute. My XML file is catalog_product_view.xml <?xml version="1.0"?> <page xmlns:...
1 vote
0 answers
62 views

How to solve ERR_TOO_MANY_REDIRECTS

I have made button New Comment as well as controller NewComment.php. When I try to redirect to controller I have ERR_TOO_MANY_REDIRECTS. This is my button block code: namespace Vendor\Module\Block\...
0 votes
1 answer
407 views

How to add a button in admin grid in magento 2

I wish to add button field in layout grid(without using UI component), After adding button, also need to add click function to that field. Please provide me a solution to add button as a field in the ...