New answers tagged

0

Depending on what kind of data you want to add, you might want to use an observer instead of rewriting the model: Method to use custom variables in transactional Email in Magento 2: 1 - Create registration.php file in app\code\[Vendor]\[Namespace]\ <?php  \Magento\Framework\Component\ComponentRegistrar::register(      \Magento\Framework\Component\...


0

I assume the 3 fields are address fields and you want to add labels on fields 2 and 3. If so, you can achieve this via a layout processor. First declare your layout processor. Add this in one of your custom modules in etc/frontend/di.xml <type name="Magento\Checkout\Block\Onepage"> <arguments> <argument name="layoutProcessors" ...


1

To override phtml in custom module, please follow below mentioned answer, it will solve your issue: https://magento.stackexchange.com/a/170652/84659


2

You're close, this is just a path issue on how to override *.phtml files of modules from within a theme. Your current file: app/design/frontend/Myne/default/Magento_CustomerCustomAttributes/view/frontend/templates/customer/form/edit.phtml The path should be as follows: app/design/frontend/Myne/default/Magento_CustomerCustomAttributes/templates/customer/...


0

You cannot rewrite this Patch data this way. Patch data are run one time. So override is NOT the solution for this. I guess that you want to make web/session/use_frontend_sid field value to 1 So, create A data patch on your custom module: and change this field value to 1. <?php namespace {VendorName}\{ModuleName}\Setup\Patch\Data; use Magento\...


1

I think in this case adminhtml_sales_order_create_process_item_before is best events. At this event you can get $eventData = [ 'order_create_model' => $this->_getOrderCreateModel(), 'request_model' => $this->getRequest(), 'session' => $this->_getSession(), ]; Request params using $observer->...


1

You just need to replace your construct function with this <?php namespace Vendor\Module\Block\Category; use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Catalog\Model\Category; class View extends \Magento\Catalog\Block\Category\View { protected $_urlInterface; public function __construct( \Magento\Framework\View\...


1

Sadly there seems to be no possibility to get rid of one of the elements by creating a new sections.xml to delete a previous defined action... The XSD file for sections.xml is located in module-customer/etc/sections.xsd And if you take a deeper look into that file, well, then you will see that there is not any other attribute or tag, that can be used, ...


2

I found it, Basically there is a Block Magento\Sales\Block\Adminhtml\Order\Invoice\Totals.php which extends Magento\Sales\Block\Adminhtml\Totals, so I override this block Magento\Sales\Block\Adminhtml\Order\Invoice\Totals.php app/code/[Vendor]/[Module]/etc/adminhtml/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...


0

You might want to try calling the parent constructor to ensure all class dependencies are loaded as expected.


1

Further explanation of Mohit Kumar Arora's answer, where he said; Now the only problem remaining is redirecting to correct URL if reCaptcha validation fails. Currently, I have redirected to cms/index/index action. Note: Keep in mind the answer from Lokesh Rathore also Create your custom class to redirect to the product page, it is pretty easy but ...


1

You are doing wrong template path <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> <argument name="data" xsi:type="array"> <item name="template" xsi:type="string">templates/collapsible2</item> </argument> The path templates/...


Top 50 recent answers are included