Skip to main content
Share Your Experience: Take the 2024 Developer Survey
22 votes
Accepted

Salable Quantity is showing zero in product grid magento 2?

In DataBase, There was two type, Tables Views The issue is possibly caused when Import/Export DataBase Views was not created in Magento 2.3. So create Views and inventory_stock_1 table in DataBase....
Savan Patel's user avatar
  • 2,358
18 votes

Salable Quantity is showing zero in product grid magento 2?

I'm gonna share my experience related to this issue, I hope it could help someone who would have been in the same situation. We were working on a staged instance, All was ready to go to production. So ...
rou6e's user avatar
  • 1,041
11 votes
Accepted

Magento 2 : How to add a product grid in custom module using ui component?

Please check this. Step 1: Add the following code in your ui form <fieldset name="assign_products"> <argument name="data" xsi:type="array"> <item name="config" ...
Jancy Abraham's user avatar
11 votes

Salable Quantity is showing zero in product grid magento 2?

I skipped this line of query, due to Previllages error and my add to cart was not working on live server, in local server this line was not skipped and add to cart was working fine. CREATE ALGORITHM=...
Sanaullah Ahmad's user avatar
9 votes

Magento 2 add custom column in product grid?

Thansk to @Dhrumin. My working code here: app/code/[Vendor]/[Module]/registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\...
hayatbiralem's user avatar
8 votes
Accepted

Magento 2 - Need a multi-select filter in place of dropdown in admin grid

By default Magento2 not include js for dropdown.So override and use product_listing.xml in your module. Path - /view/adminhtml/ui_component/product/product_listing.xml and use below code :- <?xml ...
Nitish's user avatar
  • 104
7 votes

Magento 2: How to get product custom attribute in product grid

1/ Magento Admin > Stores > Attributes / Product > Click on your custom attribute > Advanced Attribute Properties > Set "Add to Column Options" to "Yes" and click on "Save attribute" button 2/ ...
Jonathan Ribas's user avatar
7 votes
Accepted

Changing the layout of the product category page by editing an XML file

You want to display the left bar on category pages, but you are selecting 2 columns with right bar layout in Admin -> Categories -> Update Layout XML. You have to select 2 columns with left bar. ...
Lez's user avatar
  • 2,917
7 votes
Accepted

How to add Stock Status(default attribute) column in admin product grid Magento 2?

Try following way: For M 2.2 SR/Stackexchange/view/adminhtml/ui_component/product_listing.xml <?xml version="1.0" encoding="UTF-8"?> <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
Sohel Rana's user avatar
  • 35.9k
6 votes
Accepted

Magento 2 -Limit the length of the product name on the front end.

You can use like below sample code. <?php $productName = $_helper->productAttribute($_product, $_product->getName(), 'name'); $len = strlen($productName); ?> <a class="product-item-...
Kishan Patadia's user avatar
5 votes
Accepted

Magento 2 add custom column in product grid?

Yes i find the solution for my question, open below file for path and override in your o custom module. vendor/magento/module-sales/Block/Adminhtml/Order/Create/Search/Grid.php And add below code in ...
Dhrumin's user avatar
  • 861
5 votes
Accepted

Magento 2: How can we get custom value from custom table in product grid

Add renderer class in grid block xml as shown below: <block class="Magento\Backend\Block\Widget\Grid\Column" as="store_price"> <arguments> <argument name="header" xsi:type="...
Prasanta Hatui's user avatar
5 votes

Add Custom Product Grid Created Date And Created By Magento 2

We can find the Create At field in table: catalog_product_entity. So, for this field, we only need to show it: For example: app/code/Vendor/Catalog/view/adminhtml/ui_component/product_listing.xml &...
Khoa TruongDinh's user avatar
4 votes

Magento 2 : Product grid serializer issue

you have to add this getProductsPosition method in your model .i had same issue then i customize below code public function getProductsPosition() { if (!$this->getId()) { return []; ...
Ashar Riaz's user avatar
  • 1,035
4 votes

How to add product grid in custom module's tab?

Namespace: Vendor ModuleName: Productattach Example: https://github.com/mageprince/magento2-productAttachment 1) Create controller app/code/Vendor/Productattach/Controller/Adminhtml/Index/...
Prince Patel's user avatar
  • 22.7k
4 votes
Accepted

Magento2 - where the admin console user preferences stored?

It seems your grid preference is saved in bookmark table Go to your database and find ui_bookmark table find the namespace entry with product_listing and remove current or both current and default. ...
Priyank's user avatar
  • 7,692
4 votes
Accepted

Disable "As low as" price in Magento 2?

I have solved it with a piece of less/css: .product-items .minimal-price-link { display: none; }
Razvan Zamfir's user avatar
4 votes

Magento 2 save grid data from admin form

I have faced the same issue while I am saving data, selected items not getting in the save controller. I have used this tutorial @ https://www.rohanhapani.com/magento-2-how-to-add-product-grid-in-ui-...
Sagar Dobariya's user avatar
4 votes

Salable Quantity is showing zero in product grid magento 2?

I had to remove the DEFINER=root@localhost from @Thakur answer so here is what I used: CREATE ALGORITHM=UNDEFINED SQL SECURITY INVOKER VIEW `inventory_stock_1` AS select distinct `...
The Billionaire Guy's user avatar
3 votes
Accepted

Filter is not display after custome product_listing.xml

Yes you are right i am getting the same issue and i have resolved it by below code : Here you are missing listingToolbar so you need to add toolbar at top of the columns section. <listingToolbar ...
Deexit Sanghani's user avatar
3 votes

How to show a custom grid in a custom tab in product edit page admin Magento-2

You can add it using modifier and UI component. Let's say my module name is Codextblog/Customtab. Add Modifier app/code/Codextblog/Customtab/etc/adminhtml/di.xml <?xml version="1.0"?> <...
chirag dodia's user avatar
  • 2,122
3 votes
Accepted

Admin Grid is Showing Wrong filter count Magento 2.4.2

This is default issue in M2.4.2. A patch (MDVA-36615) is available for this issue in Commerce Edition, check here To resolve it in community edition create preference for Magento\Catalog\Ui\...
Rahul Barot's user avatar
  • 1,122
2 votes
Accepted

magento 2 - How to rearrange column of product grid?

Change in below file vendor\magento\module-catalog\view\adminhtml\ui_component\product_listing.xml There is code for status column like below adjust it as per you want <column name="status"> ...
Prashant Valanda's user avatar
2 votes

How to combine two attributes in Adminhtml Grid view

You can add below code in your admin grid file: $this->addColumn('name', array( 'header' => $this->__('Name'), 'sortable' => true, 'index' =&...
Abhinav Singh's user avatar
2 votes
Accepted

Magento 2 : Product grid serializer issue

Update your assign-products.js define([ 'mage/adminhtml/grid' ], function () { 'use strict'; return function (config) { var selectedProducts = config.selectedProducts, ...
Jancy Abraham's user avatar
2 votes
Accepted

Display bestsellers products on products catalog page

app/etc/modules/Dexm_Best.xml <?xml version="1.0"?> <config> <modules> <Dexm_Best> <active>true</active> <codePool>local&...
Supravat Mondal's user avatar
2 votes

Magento 2 -Limit the length of the product name on the front end.

Try below code <a class="product-item-link" href="<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>"> <?php /* @escapeNotVerified */ substr($_helper->...
Abhishek Panchal's user avatar
2 votes

Magento 2 - Need a multi-select filter in place of dropdown in admin grid

Override in your module /view/adminhtml/ui_component/product/product_listing.xml <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:...
Team Dolphin's user avatar
2 votes
Accepted

How to list only enabled product in backend order in magento 2?

Over ride below block and add filter in collection: Magento\Sales\Block\Adminhtml\Order\Create\Search\Grid <?php /* * To change this license header, choose License Headers in Project ...
Pramod Kharade's user avatar
2 votes

Disabled products missing in product grid

For other people with this issue (who do not want to update stuff directly in the database). I manage to fix this issue by simply forcing back the "Default View" as the user.
Kenny Dorman's user avatar

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