If you want to change the header logo only on the checkout page using XML, then follow the below instructions:
First, you should override the checkout_index_index.xml file in your theme and add the below code between the body.
1 2 3 4 5 |
<referenceBlock name="logo"> <arguments> <argument name="logo_src" xsi:type="helper" helper="Magemonkey\CustomMod\Helper\Data::getLogo"></argument> </arguments> </referenceBlock> |
Then, you need to create a helper or add the below function in your exiting helper file. (here I have created a new helper file in my module)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<?php namespace Magemonkey\CustomMod\Helper; class Data extends \Magento\Framework\App\Helper\AbstractHelper { protected $_request; public function __construct ( \Magento\Framework\App\Request\Http $request, \Magento\Framework\View\Asset\Repository $assetRepo ) { $this->_request = $request; $this->_assetRepo = $assetRepo; } public function getLogo() { return $this->_assetRepo->getUrl('images/checkout-logo.png'); } } |
*Note: I have tried this code in Magento 2.4.2
If you want get query string params in controller file,...
Create di.xml and add the below code Magemonkey/Redirect/etc/frontend/di.xml [crayon-62876a89ef846352940013/] Create...
You can try below code to change local date to...
Step 1: First you need to add registration.php file in...
Step1 : Override message.js in current theme file on the...