• 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

Json_Encode not returning html even i try to encode JSON_HEX_QUOT | JSON_HEX_TAG

500 Internal Server Error on Ajax request. Not sure the origin of the problem

WooCommerce: Add/display Product or Variation custom field everywhere

Jquery DataTables: Data not displaying in table via Ajax

How to use $this->session->set_userdata in codeigniter

Coinpayments create_transaction "ERROR: Invalid command!"

Load a .env file with PHP

WAMP Virtual Host not working

Add 2 Webcam in one page with WebcamJS

Converting IPv6 to IPv4 address in PHP

Can't exclude directories from .htaccess mobile redirect?

Component install error: JInstaller: :Install: File does not exist

(Cache::lock()) -> get() -- Under what conditions does it return false?

Send same name multiple checkbox values via ajax

Correctly determine if date string is a valid date in that format

About Contact Privacy policy Terms and conditions