• 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 show a popup modal in codeIgniter?

How to execute sql code based on fetch array

Is there an equivalent of DynamoDB on Azure as a PHP session Handler

How to submit the custom form data in database in WordPress without plugin using ajax?

Make Shipping Method fields Mandatory on Woocommerce checkout page

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

json_encode turns array into an object

phpmyadmin : Depends: php-twig (>= 2.9) but 2.6.2-2 is to be installed. WHAT?

Is it possible to re-use an array taken from PHP via JSON in a $.ajax function?

How to add a heading in between checkout fields of WooCommerce

possible options to create pdf file using html elements to generate invoice in php and codeigniter

Explain how this array transposing and flattening function works

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'posts.post' doesn't exist

Adding reCAPTCHA v2 into my PHP file

How can I format this number correctly using PHP?

About Contact Privacy policy Terms and conditions