Not able to call the grid and save grid data from Tab of Custom Admin Form


Your privacy


By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.




can we filter order list by product attribute in order grid?

[![][1]][1]

here i want to add a product custom attribute. while saving product this data has an default value.
[1]: https://i.stack.imgur.com/rPWU1.png

Media library does not display grid properly when accessed as non-admin user

Using Drupal core 9.1.7
Theme: Eclipse multipurpose theme

  1. Enable Media and Media library modules
  2. Add a field to a content type as Media (Entity reference)
  3. Setup form display to show this field as Media library
  4. Add content using this field
  5. Click Add media

Media will be displayed as grid. However, if you are adding content as a non-admin, existing media items are displayed one item in a row, while when the content is added as added, the items are displayed nicely formatted in a grid.

Inspected in a browser console errors are reported when logged on as non-admin user. No errors are reported when logged on as admin user.

Console error:
Uncaught Error: Syntax error, unrecognized expression: #
at Function.se.error (jquery.min.js?v=3.5.1:2)
at se.tokenize (jquery.min.js?v=3.5.1:2)
at se.select (jquery.min.js?v=3.5.1:2)
at Function.se (as find) (jquery.min.js?v=3.5.1:2)
at S.fn.init.find (jquery.min.js?v=3.5.1:2)
at new S.fn.init (jquery.min.js?v=3.5.1:2)
at S (jquery.min.js?v=3.5.1:2)
at c (bootstrap.min.js?v=1.x:6)
at HTMLAnchorElement. (bootstrap.min.js?v=1.x:6)
at Function.each (jquery.min.js?v=3.5.1:2)

Material Design | Cards – Rich Media – Above Primary Title VS. Below Primary Title for a Card Grid?

I’m designing a website under Material Design guidelines for an online media organization.

I’m designing right now a card grid where each card will include a rich media component.
The page the grid will be in will be dedicated for content: articles, videos and podcasts, and each card will have one of those content types. Each rich media will be a thumbnail image for the content.

Do you see for this use case any advantages or disadvantages for having the rich media above the primary title? What about the other way around?

Below images of the two structures, taken from Material Design’s documentation on card anatomy (ignore the various marks and notes on the cards, they refer to other things in the documentation):

The rich media above the primary title:
material-design-card--rich-media-above-primary-title

The primary title above the rich media above:
material-design-card-primary-title-above-rich-media

numerical integration – System of Differential equations on non uniform grid

I need to solve the following set of ODE’s numerically,

$frac{dy}{dx}=Ay+Bz, \
frac{dz}{dx}=Cy+Dz$

where the independent variable $x$ is an non-uniform spaced array of points and so is A, B, C & D.

What is the best way of achieving this as common NDsolve specifies the independent variable in $ {x,x_{min},x_{max}} $ format.

Grid alignment syntax – Mathematica Stack Exchange

This is a simple question, but I just cannot understand the explanation given in the Grid documentation page for how to set different alignments for different parts of a grid. I have a grid with two rows with four columns each, and I would like the top row to be bottom aligned and the bottom row to be top aligned. Or, in general, I want to specify one alignment per row (again, for a two row grid). How do I do this?

magento2 – Change shipping address column format in Sales Order Grid (Magento 2.4.2)

As per your requirement you need to create four new columns for the city, street, zip, and phone.

1. So first of all create sales_order_grid.xml in your custom module

app/code/Vendor/Module/view/adminhtml/ui_component/sales_order_grid.xml

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_columns">
        <settings>
            <childDefaults>
                <param name="fieldAction" xsi:type="array">
                    <item name="provider" xsi:type="string">false</item>
                </param>
            </childDefaults>
        </settings>
        <column name="street">
            <settings>
                <filter>text</filter>
                <label translate="true">Street</label>
                <bodyTmpl>ui/grid/cells/html</bodyTmpl>
                <visible>true</visible>
            </settings>
        </column>
        <column name="postcode">
            <settings>
                <filter>text</filter>
                <label translate="true">Zip</label>
                <bodyTmpl>ui/grid/cells/html</bodyTmpl>
                <visible>true</visible>
            </settings>
        </column>
        <column name="city">
            <settings>
                <filter>text</filter>
                <label translate="true">City</label>
                <bodyTmpl>ui/grid/cells/html</bodyTmpl>
                <visible>true</visible>
            </settings>
        </column>
        <column name="telephone">
            <settings>
                <filter>text</filter>
                <label translate="true">Phone</label>
                <bodyTmpl>ui/grid/cells/html</bodyTmpl>
                <visible>true</visible>
            </settings>
        </column>
    </columns>
</listing>

2. Create plugin for order collection data provider

app/code/Vendor/Module/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="MagentoFrameworkViewElementUiComponentDataProviderCollectionFactory">
        <plugin name="mageprince_custom_orders_grid" type="VendorModulePluginOrdersGrid" sortOrder="10"/>
    </type>
</config>

app/code/Vendor/Module/Plugin/OrdersGrid.php

<?php

namespace VendorModulePlugin;

class OrdersGrid
{
    public function afterGetReport($subject, $collection, $requestName)
    {
        if ($requestName !== 'sales_order_grid_data_source') {
            return $collection;
        }

        if ($collection->getMainTable() === $collection->getResource()->getTable('sales_order_grid')) {
            $orderAddressTable  = $collection->getResource()->getTable('sales_order_address');

            $collection->getSelect()->joinLeft(
                ('oat' => $orderAddressTable),
                'oat.parent_id = main_table.entity_id AND oat.address_type = 'shipping'',
                ('telephone', 'city', 'postcode', 'street')
            );
        }

        return $collection;
    }
}

That’s it now you can see these columns in order grid as below

enter image description here

EDIT:

I have removed datasource class and updated the answer because datasource class not working with filters.

magento2 – How to add filter to a already working custom sales order grid column module?

Try below code :-

XML file code change below code your column name

<columns name="sales_order_columns">
        <column name="short_name" class="VendorModuleNameUiComponentListingColumnMycolumn">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">My Column</item>
                </item>
            </argument>
        </column>
    </columns>

Filter the text in your custom column below codes :-

/etc/adminhtml/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="MagentoFrameworkViewElementUiComponentDataProviderReporting">
        <plugin name="sales_grid_collection" type="VendorModuleNameModelPluginSalesOrderGrid"/>
    </type>
</config>

And then last create plugin model file Grid.php under

/Model/Plugin/Sales/Order/Grid.php

<?php
namespace VendorModuleNameModelPluginSalesOrder;
 
 
class Grid
{
 
    public static $table = 'sales_order_grid';
    public static $leftJoinTable = 'custom_order';
 
    public function afterSearch($intercepter, $collection)
    {
        if ($collection->getMainTable() === $collection->getConnection()->getTableName(self::$table)) {
 
            $leftJoinTableName = $collection->getConnection()->getTableName(self::$leftJoinTable);
 
            $collection
                ->getSelect()
                ->joinLeft(
                    ('co'=>$leftJoinTableName),
                    "co.order_id = main_table.entity_id",
                    (
                        'short_name' => 'co.short_name'
                    )
                );
 
            $where = $collection->getSelect()->getPart(MagentoFrameworkDBSelect::WHERE);
 
            $collection->getSelect()->setPart(MagentoFrameworkDBSelect::WHERE, $where);
 
            //echo $collection->getSelect()->__toString();die;
 
 
        }
        return $collection;
 
 
    }
 
 
}

And above code you can add multiple filter columns like :-

$collection
 ->getSelect()
 ->joinLeft(
     ('co'=>$leftJoinTableName),
       "co.order_id = main_table.entity_id",
     (
       'short_name1' => 'co.short_name1',
       'short_name2' => 'co.short_name2'
     )
  );

THANKS.

woocommerce offtopic – how can I show product grid by vendor? (in homepage)


Your privacy


By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.




magento2 – How to call the special price and wish list in the product grid of the module from Adobe Sensei?

How to call the special price and wish list in the product grid of the Magento_ProductRecommendationsLayout module from Adobe Sensei?

I am putting together a carousel of recommended products and I need them to have the special price and the wish list too, the structure is made with Knockout, can someone help me please?