Sanjay Jethva
  • Member for 6 years, 3 months
  • Last seen this week
How to override adminhtml phtml in Magento2?
7 votes

Create adminhtml_order_shipment_view.xml file in app\code\CompanyName\ExtensionName\view\adminhtml\layout\ <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance dc"...

View answer
File upload in magento 2
Accepted answer
5 votes

this will help $files = $this->getRequest()->getFiles(); Here is Magento2 :: Accessing $_FILES using Magento Framework

View answer
Magento 2: unable to set payment Transaction Id after successful payment processing (solved by myself)
2 votes

You need to put below code in the success action of your code when responce came after successfull payment. $order = $this->getOrder(); $payment = $order->getPayment(); $trans_id = '...

View answer
How to redirect (& show flash message) on CMS contact page when wrong captcha submitted
Accepted answer
1 votes

The captcha check for the contact us page is in this file - vendor\magento\module-captcha\Observer\CheckContactUsFormObserver.php Also, you are making the changes directly in the core files which is ...

View answer
Magento 2.3 - LEMP Localhost - For Multi Website where should be create Symbolic links folder - Root folder or Pub folder?
1 votes

You can follow Meetanshi's link as it is tried, tested, and approved in local as well as three live websites too. Thank you.

View answer
How to get store logo url in Javascript file in Magento 2?
1 votes

There is no direct method to have store logo in JS. However, you can pass the logo URL in configprovider and get it in knockout JS file for the solution.

View answer
Magento 2 adding white border to images
1 votes

Please set "aspect_ratio" and "frame" to "false" <image id="product_page_image_medium" type="image"> <width>700</width> <height>700</height> <aspect_ratio&...

View answer
Create configurable products programatically Magento
1 votes

First create simple product and than we can assign it to configurable product. Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $simpleProduct = Mage::getModel('catalog/product');...

View answer
Custom Link with Product edit form
0 votes

Create Vendor\Extension\view\adminhtml\layout\catalog_product_edit.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:...

View answer
Where to download magento security patches
0 votes

https://meetanshi.com/blog/magento-security-patches-installation/ I hope this post can be helpful. Thank you.

View answer
Magento upgrade 2.2.6 to 2.3.5-p1
0 votes

Please refer the solution at https://meetanshi.com/blog/bypass-dependency-error-while-installing-extension-library-using-composer-in-magento-2/ Thank you.

View answer
Error while importing products through csv in magento 2
0 votes

Please change the URL of the existing product temporarily and import. Once imported successfully, change the URL as it was previously. Thank you.

View answer
Customer Mobile API for Magento 2.3
0 votes

First, you need to take admin token using the admin username and password. Using that token, you can get product and category. You can check this using either swagger or postman. I hope it helps. ...

View answer
Integrity constraint violation: 1062 Duplicate entry for key 'EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_GROUP_NAME'
0 votes

<?php namespace Vendor\Extension\Setup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\...

View answer
Unable to send the cookie with cookieName
0 votes

You are on the right track. All you have to do now is clean cache and check in the incognito mode. Also, disable varnish if not done. You can refer here: https://mage2.pro/t/topic/84 Thank you.

View answer
Magento 2 website no longer loads after running compile command
Accepted answer
0 votes

please run below command php bin/magento setup:upgrade php bin/magento setup:static-content:deploy -f php bin/magento cache:flush php bin/magento cache:clean

View answer
Detect if payment has been placed in sales_order_save_after observer in Magento 2?
0 votes

Please try using the event checkout_onepage_controller_success_action It will help you with the solution.

View answer
how to customise sales email in magento 1.9.x
0 votes

There are two ways to customize email templates. Go to Admin > Sytem > Transactional Email > Load template Customize it as per your requirement and save it and assign it in configuration who ...

View answer
Error 404 call controller from view
0 votes

Please pass form_key in the ajax call function getPdf(num){ jQuery.ajax({ url: "<?php echo $this->getUrl('generatepdf/index/PdfAgreements'); // Mage::getUrl('generatepdf/index/...

View answer
Unable to save edits to simple products in Magento 2.1.1
0 votes

Please run below commands from ssh. Go to your root folder of magento 2.1 and run. php bin/magento setup:static-content:deploy php bin/magento indexer:reindex php bin/magento cache:flush ...

View answer
Magento 2 : Show Icons for Each Category in Mega Menu
Accepted answer
0 votes

You can check in Category page by using below code. $_category = $block->getCurrentCategory(); // get Current Category $_imgUrl = $_category->getImageUrl() If $_ImgUrl is not equal to blank ...

View answer
Magento 2 : Successful Order with Failed Payment
0 votes

By default Magento 2 provides processing as default status for rediretion payment gateway. You need to put $order = $this->getOrderById($orderId); //load your order $order->addStatusToHistory(...

View answer
Updating product stock status programmatically in Magento 2.3.x
-1 votes

Please try the below solution: $product->setStockData( array( 'use_config_manage_stock' => 0, 'manage_stock' => 1, 'is_in_stock' => 1, 'qty' => 9 ) ); $product->save(...

View answer