49 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 ...
Bilal Usean's user avatar
  • 9,947
19 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="...
Dharmendra Jadav's user avatar
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-...
Bilal Usean's user avatar
  • 9,947
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( .... ...
Rohan Hapani's user avatar
  • 17.3k
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://...
df2k2's user avatar
  • 984
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();
Ansar Husain's user avatar
  • 3,409
8 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/...
matinict's user avatar
  • 1,529
8 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 ...
Rohit Chauhan's user avatar
8 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/...
Silas Palmer's user avatar
7 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 ...
Vivek Kumar's user avatar
  • 5,030
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 \...
Pratik Navapara's user avatar
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 ...
Rv Singh's user avatar
  • 1,617
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> ...
Sanjay Vadadoriya's user avatar
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"> ...
Rutvee Sojitra's user avatar
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 ...
Amit Bera's user avatar
  • 77.4k
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:...
Abdul's user avatar
  • 9,702
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 . ...
Mac's user avatar
  • 573
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", ...
Kajal Solanki's user avatar
6 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
Ansar Husain's user avatar
  • 3,409
6 votes

Magento 2 Admin Grid Add/Update Button

You can use update parent::_construct(); $this->buttonList->update('save', 'onclick', 'setLocation(\'' . $this->getUrl('*/*/<youraction>') . '\')');
Addify's user avatar
  • 769
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'...
anonymous's user avatar
  • 3,722
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.
Michigan Websites's user avatar
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\...
Rohan Hapani's user avatar
  • 17.3k
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/...
Raj's user avatar
  • 821
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....
poojan sharma's user avatar
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\...
PROGOSTECH's user avatar
5 votes

What is the use of pagefactory in Magento 2?

https://www.mageplaza.com/magento-2-module-development/factory-object-magento-2.html In Magento 2 all controller actions must return something, opposed to M1, where a controller action would just ...
Shubham Singh's user avatar
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 ...
MR.R DNATH's user avatar
5 votes

cataloginventory_stock_status entry issue Magento 2

I got an issue. I found website_id = 1 instead of 0 in cataloginventory_stock table. I change website id to 0.
Nimesh Patel's user avatar

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