• 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 to send image,audio or video through the WhatsApp API - PHP

Send same name multiple checkbox values via ajax

I want to display a sweetalert after the inserting of data in my database

correct PHP headers for pdf file download

Filter WooCommerce products with post__in and additional meta queries

Webscraping Symfony/Panther: Can't get HTML

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

How can i update or reset my password without entering email field in laravel-8?

301 Redirect to remove query string on homepage only

Can I write PHP code across multiple lines per statement?

Display a success custom notice after Placing an Order in WooCommerce

CodeIgniter 4: Like and Dislike Functionality

Laravel after login Two factor not working

Get WooCommerce product variation attribute terms in admin products general box

how to retrieve the first and last instance of a row in pdo dataset

About Contact Privacy policy Terms and conditions