Skip to content

How to hide and show the payment method based on shipping address country to sort the payment method

This code has worked to hide and show the payment method based on the shipping address country. public function execute(MagentoFrameworkEventObserver $observer) { //shipping company field $shippingCompanyField = $this->cart->getQuote()->getShippingAddress()->getCountryId(); $paymentMethod = $observer->getEvent()->getMethodInstance()->getCode(); if ($shippingCompanyField == ‘IN’) { if ($paymentMethod == “multisafepay_giropay”)… Read More »How to hide and show the payment method based on shipping address country to sort the payment method

How to upgrade Magento from 2.4.1 to 2.4.6

I’m actually on Magento CE version 2.4.1 I need to update it to 2.4.6 (latest version) I’m in live (I don’t have a staging enviroment) Is there someone who can guide me step to step in upgrading? Really really thanks

Magento2 Add To Cart before plugin not working: 2.4.6

my plugin does not work. I am unable to load products onto the cart There are no errors in the error log. My Di.xml <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <type name=”MagentoCheckoutModelCart”> <plugin name=”addingProductToCart” type=”ExampleTestPluginModelCheckoutCartPlugin” sortOrder=”10″ disabled=”false”/> </type> </config> my Plugin… Read More »Magento2 Add To Cart before plugin not working: 2.4.6

How to add Fitter in custom grid using only block file in magneto 2

<?php namespace MavenbirdCustomerRegisterBlockAdminhtmlGrid; class Grid extends MagentoBackendBlockWidgetGridExtended { protected $_postFactory; /** * @var MagentoFrameworkModuleManager */ protected $moduleManager; public function __construct( MagentoBackendBlockTemplateContext $context, MagentoBackendHelperData $backendHelper, MavenbirdCustomerRegisterModelPostFactory $postFactory, MagentoFrameworkModuleManager $moduleManager, array $data = [] ) { $this->_postFactory = $postFactory; $this->moduleManager = $moduleManager;… Read More »How to add Fitter in custom grid using only block file in magneto 2