magento2 – Magento 2.4 sales_order_invoice_grid populate custom column with values

I have added the column transaction_id to my sales_order_invoice_grid.

VendorModuleetcadminhtmldi.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <virtualType name="MagentoSalesModelResourceModelOrderInvoiceGrid">
        <arguments>
            <argument name="columns" xsi:type="array">
                <item name="transaction_id" xsi:type="string">
                    sales_invoice.transaction_id
                </item>
            </argument>
        </arguments>
    </virtualType>
</config>

VendorModuleviewadminhtmlui_componentsales_order_invoice_grid.xml

<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_invoice_columns">
        <column name="transaction_id">
            <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">Transaction ID</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

The header of the column appears as expected in the sales_order_invoice_grid and also in the CSV export file, which can be generated on this page.
The problem is the values are missing.
enter image description here

Can anyone say what I am missing or what could be wrong?
Thanks

magento2 – Change the name of the currency in currency selector in LUMA theme

I am triying to do the solution in the link below

How to rename currency name?

I am using Magento 2.4 but i cant find the files, my directory is empty

app/design/frontend/{vendore}/{theme}/Magento_Directory/templates/currency.phtml

I changed the USD symbol to REF but the currency selector did not.

enter image description here

Magento2 : Custom Category Attribute Not Showing on Frontend

app/code/Vendor/Module/Setup/InstallData.php

 use MagentoFrameworkSetupInstallDataInterface;
 use MagentoFrameworkSetupModuleContextInterface;
 use MagentoFrameworkSetupModuleDataSetupInterface;
 use MagentoEavSetupEavSetup;
 use MagentoEavSetupEavSetupFactory;

class InstallData implements InstallDataInterface
{

private $eavSetupFactory;

/**
 * Constructor
 *
 * @param MagentoEavSetupEavSetupFactory $eavSetupFactory
 */
public function __construct(EavSetupFactory $eavSetupFactory)
{
    $this->eavSetupFactory = $eavSetupFactory;
}

/**
 * {@inheritdoc}
 */
public function install(
    ModuleDataSetupInterface $setup,
    ModuleContextInterface $context
) {
    $eavSetup = $this->eavSetupFactory->create(('setup' => $setup));

    $eavSetup->addAttribute(
        MagentoCatalogModelCategory::ENTITY,
        'include_in_topmenu',
        (
            'type' => 'int',
            'label' => 'Include In TopMenu',
            'input' => 'select',
            'sort_order' => 333,
            'source' => 'MagentoEavModelEntityAttributeSourceBoolean',
            'global' => MagentoCatalogModelResourceModelEavAttribute::SCOPE_STORE,
            'visible' => true,
            'required' => false,
            'default' => 0,
            'visible_on_front' => true,
            'group' => 'General Information'
        )
    );
}

}

magento2 – Get data from DB (load method) Magento 2

I have controller, template, view.
I need using load method, but i don`t know how i do that

        $post = $this->collectionFactory->create();
    $this->collectionFactory->load($post, 'id');
    return $this;

This code in controller don`t work. I have error
How i can get data from load() method ?(load method only)

Magento2: LOCKED_RECORD_INFO_BLOCK

if adding a product to cart, in my debug.log file there is the following entry:

[2020-10-29 10:48:15] main.DEBUG: cache_invalidate:  {"method":"GET","url":"https://XXXXXXXX.com/checkout/cart/","invalidateInfo":{"identifier":"LOCKED_RECORD_INFO_BLOCK_78d0a33599c0bfc2fd2e28a3533f143cb8a3513a"}} []'

Any recommendations?

magento2 – Issue with upgrading Magento 2 from 2.3.5-p2 to 2.3.6

I’m trying to upgrade Magento 2 with the latest release Magento 2.3.6 and getting an error while running the upgrade command.

Unable to apply data patch MagentoElasticsearchSetupPatchDataInvalidateIndex for module Magento_Elasticsearch. Original exception message: Notice: Undefined index: in /var/www/html/vendor/magento/framework/App/Route/Config.php on line 93

Currently we are using Magento 2.3.5-p2 version.

Do anyone have an idea about the issue? Please help me to resolve the same.

magento2 – My Magento only can load the first front page, and all the page are 404. Nginx server configuration issue

I am running WSL, ubuntu
Nginx webserver, localhost
I only able to load my website first front page, but the rest of the pages are 404 not found.
I only modify the /etc/nginx/sites-available/default file. Since I am using localhost and only 1 site. I guess I don’t need to create another one. Can anyone help me out to see what’s wrong with my configuration file? /etc/nginx/sites-available/default. I am not familiar with Nginx, I did try google many days, still can’t find any solution.

I am appreciate if anyone can help.

##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#
server {
        listen 80 default_server;
        listen [::]:80 default_server;

        # SSL configuration
        #
        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;
        #
        # Note: You should disable gzip for SSL traffic.
        # See: https://bugs.debian.org/773332
        #
        # Read up on ssl_ciphers to ensure a secure configuration.
        # See: https://bugs.debian.org/765782
        #
        # Self signed certs generated by the ssl-cert package
        # Don't use them in a production server!
        #
        # include snippets/snakeoil.conf;

        root /var/www/html/Magento2_PAUL;

        # Add index.php to the list if you are using PHP
        index index.php;

        server_name _;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
                # proxy_pass http://localhost:8080;
                # proxy_http_version 1.1;
                # proxy_set_header Upgrade $http_upgrade;
                # proxy_set_header Connection 'upgrade';
                # proxy_set_header Host $host;
                # proxy_cache_bypass $http_upgrade;
        }

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ .php$ {
         include snippets/fastcgi-php.conf;
        #
        #       # With php7.0-cgi alone:
        #       fastcgi_pass 127.0.0.1:9000;
        #       # With php7.0-fpm:
               fastcgi_pass unix:/run/php/php7.2-fpm.sock;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /.ht {
        #       deny all;
        #}
}


# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
#       listen 80;
#       listen [::]:80;
#
#       server_name example.com;
#
#       root /var/www/example.com;
#       index index.html;
#
#       location / {
#              try_files $uri $uri/ =404;
#       }
#

magento2 – How to display reviews and ratings on my custom template?

I would like to display reviews and ratings on my custom template.

I can see that Magento_Review/templates/product/view/list.phtml is the one that is in charge of displaying these items.

How can I call list.phtml and pass my product id to display reviews and ratings?

magento2 – Move Paypal Express Checkout button to top of the checkout page in magento 2

Stack Exchange Network


Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

magento2 – Product Listing Sort By X Not Working

I have migrated a Magento 1.9.2.4 to Magento 2.4.1 and I’ve noticed the Sort By X (Position, Price) is not sorting the products. The ASC and DESC function also does not work. The listing refreshes but stays the same.

I’ve disabled the custom theme, disabled all third party module, reverted to the Blank theme, cleared all caches and reindexed multiple times with nothing changing.

Has anyone ever come across this issue?