• 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 implement placeholder in a php file for moodle plugin?

PHP DOTENV unable to load env vars

disable two buttons after clicking another button

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

Show only featured products in Woocommerce shop page

Correct way to use LIKE '%{$var}%' with prepared statements?

How to make a array inside array?

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

PHP Discord OAUTH2 code sample not working

Is there a way to correctly use sanitize_text_field and wp_unslash that doesn't cause psalm to error with "expects string, possibly different type"

Is there a way to use Foundry Model for Authentification inside Functional Tests?

Why i get wrong output for html markdown?

Debugging Stripe Webhook Event

Unable to create lockable file - Laravel 8 & PHP 8

laravel automatically deletes server.php on php artisan serve

About Contact Privacy policy Terms and conditions