43 votes
Accepted

Magento2.2.5 How to access Magento Log file for Web API?

Just run the below command in magento root directory, it will show that log file location. grep -r "Report ID: webapi-5c644d10f0e26" var/ Note: Change the above report id as per your error ...
  • 9,619
16 votes
Accepted

In Magento 2, add link to admin grid values

I have just make Link and redirect it product detail page. Please check my answer and change as per your need. Create a actionsColumn in ui component xml like below : <actionsColumn name="...
14 votes

Is it safe to disable Temando_Shipping & Dotdigitalgroup_Email?

We can use the below command to make sure the particular module has any circular dependency. php bin/magento info:dependencies:show-modules-circular Above command generate one CSV file in magento-...
  • 9,619
13 votes

Why Customer Session is not working on full page cache?

You need to use the factory method when FPC is enabled. By Factory Method : /** * @var \Magento\Customer\Model\Session */ protected $_customerSessionFactory; public function __construct( .... ...
  • 16.7k
12 votes
Accepted

Magento 2 - Store disable issue in Multi stores website

Update Things to check: Ensure that store views are not configured as any defaults. Website Scope Store Scope - AKA: Store Group Ensure that config.php is not using the store view https://...
  • 954
9 votes
Accepted

What is the use of pagefactory in Magento 2?

Pagefactory is used to initialize the layout. Its working in magento2 same like as in magento1 was doing with below code $this->_view->loadLayout(); $this->_view->renderLayout();
  • 3,179
7 votes

Magento 2 : Merge and minify js and css

i solve my marge issue as First Way: For CSS you need to do something similar to manually enable it. The following has worked for me: php bin/magento config:set dev/css/merge_css_files 1 php bin/...
  • 1,448
7 votes

Magento 2 : Postcode / Zipcode and telephone number missing in checkout form

Sometimes, while running our data migration it seems that the tables eav_form_element and customer_form_attribute lost some information during the migration. The quick fix was to add in the missing ...
7 votes
Accepted

How to add new item (product) into existing order programmatically in Magento 2

After some goggling and with the help of some core modules I came up with following solution : /** * @var \Magento\Sales\Api\OrderRepositoryInterface */ protected $orderRepository; /** * @var \...
7 votes
Accepted

AddIndex in magento2

You can create your column as index key for better performance and speedy retrieval of data from a table. An index is a performance optimization feature that enables data to be accessed faster ...
  • 1,607
7 votes

How to create custom route in magento2

Using "Magento\Framework\App\RouterList" we use the di.xml file in our module. app/code/Vendor/Module/etc/di.xml <type name="Magento\Framework\App\RouterList"> <arguments> ...
6 votes

Magento 2.2.5: How to create Grid in Tabs?

Add this code on your form code where you want to add innerlisting <insertListing> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> ...
6 votes
Accepted

Magento 2.2.5 change 'Add To Cart' button to 'View Product' at category page

First you have to do this changes at your theme level. Goto app/design/frontend/{ThemeVendorname}/{ThemeName}/Magento_Catalog/templates/product/ And open list.phtml and delete the code: <form ...
  • 76k
6 votes
Accepted

Magento 2.2.5 : Add custom field in product attribute add form

Try via plugin method: CompanyName/ModuleName/etc/adminhtml/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...
  • 9,572
6 votes
Accepted

Magento 2 : Merge and minify js and css

Minifying and merging js and css can improve load times and general performance of your store, so it should be enabled in production mode, but if you have to do any kind of development then you should ...
  • 4,605
6 votes
Accepted

Shipping Error. Invalid value in Region ID field

@CJNotts This error occurs when once integer is stored for State/Province field, it can not be changed to alphanumeric . Please go through this https://github.com/magento/magento2/issues/14052 . ...
  • 543
6 votes

Magento 2.2.5 Css is not generating

Check the grunt versions into package.json this solves the issue "devDependencies": { "glob": "~7.1.1", "grunt": "^1.0.2", "grunt-autoprefixer": "~3.0.4", "grunt-banner": "~0.6.0", ...
6 votes
Accepted

How to make invoice PDF file size compress in magento 2

Just to consolidate all this information: 1: Create (or use) a custom module under app/code/YourModule - eg app/code/YourModule/Sales 2: Add a <preference \> entry to app/code/YourModule/Sales/...
6 votes

Magento 2 Admin Grid Add/Update Button

You can use update parent::_construct(); $this->buttonList->update('save', 'onclick', 'setLocation(\'' . $this->getUrl('*/*/<youraction>') . '\')');
  • 759
6 votes

Why Customer Session is not working on full page cache?

You can give a try to below code: 1). Using Object Manager $ObjectManager= \Magento\Framework\App\ObjectManager::getInstance(); $context = $ObjectManager->get('Magento\Framework\App\Http\Context'...
  • 3,684
6 votes

Magento 2 : Issue on setup:di:compile

If this happens regularly when you initiate compile and you're confident you have no errors I've found simply running php bin/magento setup:di:compile a second time will be successful.
  • 126
5 votes
Accepted

Magento 2.2.5 : Add video to product programmatically

Reference : Click here => Follow the step to create video : Create a controller Test.php file on this below path : CompanyName\ModuleName\Controller\Index <?php namespace CompanyName\...
  • 16.7k
5 votes

How to get Sku, name, and image in magento2 through programmatically?

I think you can fetch all product data using following code. Just put this code in your php file example.php. Hope it works. <?php use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/...
  • 781
5 votes
Accepted

Magento2 how to set default columns in admin grid

magento provide facility to add product attribute directly in grid without any customization. Please check carefully the selected checkbox are all table columns while unchecked are product attributes....
5 votes

Overriding model file is not working in Magento 2.2.5

Change typr, <preference for="Magento\Catalog\Model\Product\Attribute\Backend\Price" typr="Pawan\Catalog\Model\Rewrite\Product\Attribute\Backend\Price" /> to type: <preference for="Magento\...
5 votes
Accepted

I am getting error of page_cache is not writable in magento 2.2.5 in linux os

I have faced same type of error few days ago. You can fix it by following ways.. chmod 777 -R var/ generated/(root access if don't have root access try with sudo) NP: *****you need to give ...
5 votes

Magento 2.2.5 - what are the mysql tables where shipping and billing address is stored?

There are tables where stored these address customer_address_entity quote_address sales_order_address
  • 3,179
5 votes
Accepted

Magento 2: Add child div containing all items in columns

Create a file named 2columns-left.xml in your theme under below path: app/design/frontend/Vendor/theme/Magento_Theme/page_layout/2columns-left.xml and use the below content for 2columns-left.xml: ...
5 votes
Accepted

Magento 2.2.5- SOAP-ERROR Parsing WSDL

I tried the SOAP Web Services on my local host and it was working fine. The reason why the Magento 2 was not able to give a response to the request was because it was not able to verify SSL ...

Only top scored, non community-wiki answers of a minimum length are eligible