• 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

Create a zip file and download it

Laravel: Create morphs() relationship nullable

Message: Set sys_temp_dir in your php.ini after installed composer

Elasticsearch - Want to sort by field in all indices where that particular field available or not if not then avoid it

PHP using str_starts_with for array to exclude same as with wildcard

jQuery Ajax Post with data

Put content of wordpress page inside div

WordPress + Nginx on non-standard port behind AWS ELB results in broken links

Woocommerce product attributes with hierarchy like categories

Get Header Authorization value of a login api (sent with username and password in json body) using php curl

User pool client {id}does not exist

Inserting Country Selection into MySQL PHP [duplicate]

Insert a DIV after the 6th product only once in WooCommerce category archives

PHP: convert all UTF-8 characters to HTML entities

Facebook PHP SDK - will not logout properly

About Contact Privacy policy Terms and conditions