I want to add a Texttext into the cart showed in the picture. But, but unfortunately my code does not work.
This is my file structure:
Code in ButtonGet.php:
<?php
namespace MassiveArt\ShoppingCart\Block;
class ButtonGet extends \Magento\Framework\View\Element\Template
{
public function __construct(
\Magento\Backend\Block\Template\Context $context,
array $data = []
) {
parent::__construct($context, $data);
}
}
Code in get_cart_index.xml:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceContainer name="minicart.addons">
<block class="MassiveArt\ShoppingCart\Block\ButtonGet" after="-" name="custom_button" template="MassiveArt_ShoppingCart::button_getcart.phtml" />
</referenceContainer>
</page>
Code in button_getcart.phtml:
<h1>Hello</h1>
The Rest of my Module is working proberly, but this Text not. Can you help me?