upload image or files from custom module from frontend with ajax magento 2

I want to upload image from frontend custom module using ajax method. filepath : app/code/Chirag/Userform/view/frontend/templates/insert.phtml <?php $blockObj= $block->getLayout()->createBlock(‘Chirag\Userform\Block\Insert’); echo $blockObj->getEventsTxt(); ?> <form class=”” name=”eventform” id=”eventform” <?php /*action=”<?php echo $blockObj->getEventsPostURL();?>” */ ?> method=”post” accept-charset=”utf-8″ data-mage-init='{“validation”:{}}’> <table width=”60%”> <tr> <td colspan=”2″ align=”center”>User Form</td> </tr> <tr> <td><span><?php /* @escapeNotVerified */ echo __(‘User First Name :’); ?></span></td> <td><input type=”text”…

Magento 1.9 Observer – How do visible selected payment gateway only for specific customer group?

Following code return customer group, how to add condition if customer group “Tester” then only show selected payment gateway? app\etc\modules\Gta_FindPaymentGateway.xml <?xml version=”1.0″?> <config> <modules> <Gta_FindPaymentGateway> <codePool>local</codePool> <active>true</active> </Gta_FindPaymentGateway> </modules> </config> app\code\local\Gta\FindPaymentGateway\etc\config.xml <?xml version=”1.0″?> <config> <modules> <Gta_FindPaymentGateway> <version>1.0.0</version> </Gta_FindPaymentGateway> </modules> <global> <models> <gta_findpaymentgateway> <class>Gta_FindPaymentGateway_Model</class> </gta_findpaymentgateway> </models> <events> <checkout_cart_product_add_after> <observers> <Gta_FindPaymentGateway_Model_Observer> <type>singleton</type> <class>Gta_FindPaymentGateway_Model_Observer</class> <method>paymenter</method> </Gta_FindPaymentGateway_Model_Observer> </observers> </checkout_cart_product_add_after>…

Starting with Magento 2.3.0+, the use of a flat catalog is no longer a best practice and is not recommended

Can anyone shed some more light on why Magento recommends against this now? Other than the short description they have in their dev docs. Continued use of this feature is known to cause performance degradation and other indexing issues. Flat indexers can cause: Heavy SQL load and site performance issues. Long running and stuck crons.…

Add Iframe in knockout js template

I am working on custom payment method with SnapPay integration. I want to add iframe in vendor/magento/module-payment/view/frontend/web/template/payment/cc-form.html <iframe id=”tokenFrame” width=”100%” height=”40″ name=”tokenFrame” src=”https://stage.snappayglobal.com/Interop/InteropCCAjaxTokenizer/Index/<?=$return[‘requestid’] ?>” frameborder=”0″ scrolling=”no”>.</iframe> where $return[‘requestid’] dyanamic variable. I don’t know how can achive that. How can I use this file vendor/magento/module-payment/view/frontend/templates/form/cc.phtml as a template file.? Is this possible? Anyone suggestions?