• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Store / Website Column in Magento 2 Admin Grid - Custom Module

phpmysqlmagento2


PHP Snippet 1:

 /**
 * Check is single store mode
 */
 if (!$this->_storeManager->isSingleStoreMode()) {
    $this->addColumn(
        'store_id',
         [
             'header' => __('Store View'),
             'index' => 'store_id',
             'type' => 'store',
             'store_all' => true,
             'store_view' => true,
             'sortable' => false,
             'filter_condition_callback' => [$this, '_filterStoreCondition']
            ]
        );
    }

Related Snippets

Inserting Country Selection into MySQL PHP [duplicate]

Laravel Displaying image from database

Use Python plotly chart in PHP

Laravel Database Strict Mode

Get WooCommerce products from specific category

renameColumn migration fails for existing column with columns does not exist error

How to increase the PHP upload limits [duplicate]

carbon generated datetime not stored correctly into the database

Custom post type single page not working

Valet, Xdebug after reboot Big Sur not working

PHP - Check if string contains words longer than 4 characters, then include "+ *", and for those shorter than 4 characters include only "*"

PHP function Not Working As Expected From functions.php Include File

Upload a file Using PHP and JavaScript

Laravel Database Strict Mode

Android Volley getParams() method not getting called for JsonObjectRequest

About Contact Privacy policy Terms and conditions