• 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

How Can I Do LIMIT 1, 2 In WP_Query

Unable to uninstall brew php from homebrew

MySQL - Connection failed: No route to host

SQL to convert multiple rows into a single row of variable length

Laravel Carbon throws error The format separator does not match

Display Brand Name Above Product Title in Woocommerce Cart, Checkout Page, Orders and Email Notification

Sort a multidimensional array by integer inside of a string value which is two levels down

Install mysql client in docker image

php curl_exec() Connection refused when retrieving a remote image

CodeIgniter force_download is not working

Undefined Array Key error when uploading image on php

Xdebug can't connect back to Docker host

Last order would be re-order in wooCommerce. How is it possible?

If action is on a different page do I use fwrite function

Transform array, set each array element with parent key php

About Contact Privacy policy Terms and conditions