How can I add a custom button adjacent to Update Shopping car button in Magento2.1?
I created a file checkout_cart_index.xml with following content.
<?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="content"> <block template="Namespace_Module::custom/mybutton.phtml" class="Magento\Framework\View\Element\Template" name="my.button" as="my.button"/> </referenceContainer> </body> </page>
But it shows button below the Apply Discount Code section.
Solved! Go to Solution.
If you want it exactly next to that button then I think you'll have to resort to modifying a template rather than achieving this with a layout change. The update shopping cart button is implemented here: https://github.com/magento/magento2/blob/9c14af7a97bcf338662de365d2613c7ca9dbf8c6/app/code/Magento/C...
If you want it exactly next to that button then I think you'll have to resort to modifying a template rather than achieving this with a layout change. The update shopping cart button is implemented here: https://github.com/magento/magento2/blob/9c14af7a97bcf338662de365d2613c7ca9dbf8c6/app/code/Magento/C...
I wanted to know it is possible without modifying or overriding cart/form.phtml as in my case form.phtml is already overridden by another module.
Thanks for the answer.
Not without some funky CSS. You might have to overwrite the template and merge the changes you want to make with the changes made in the template change that's already there by the extension.