• 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

Reorder attribute dropdown terms in Woocommerce single variable products

How to validate tin and cst using PHP?

Could not decode a text frame as UTF-8.

cakephp save drag and drop list order to database

PHP code for generating decent-looking coupon codes (mix of letters and numbers)

Adding custom body class to the custom archive pages

Fatal error: Array callback has to contain indices 0 and 1

Implode columnar values between two arrays into a flat array of concatenated strings

How to get unique slug to same post-title for other time too?

(Laravel) How to delete multiple models including optional relationships?

merge all files in directory to one text file

how to remove white space in select 2

Spam Filter in Contact Form

WordPress - Dynamically add user ID to the end of a URL

Limit WooCommerce products in cart only from one custom taxonomy

About Contact Privacy policy Terms and conditions