• 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

Change the alert text on add to cart action without selected variation in Woocommerce

Limit WooCommerce products in cart only from one custom taxonomy

CodeIgniter 3 is generating a session file on each request, why?

Add restriction to WooCommerce coupons by allowed user ID

Mysqli multi query error

Target class controller does not exist - Laravel 8

How to loop sql table data inside a html table

Converting alphabet letter to alphabet position in PHP [duplicate]

PHP: Insert marker every 3 iterations

How to increase the PHP upload limits [duplicate]

Sync Records With Default Values in Pivot Tables, Call to undefined method syncWithPivotDefaults()

What is wrong with this inner join sql query

Problems getting instance of UploadedFile in Yii2

NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory)

Laravel 5 controller sending JSON integer as string

About Contact Privacy policy Terms and conditions