magento2 – Magento 2: Hide empty rows for custom report

I’ve created a custom report in the Magento 2 backend.

Everything is working great, but by default the results grid shows “We can’t find records for this period” for any days where there’s no data.

I don’t want to physically add a filter form to the report interface, I just want the “show_empty_rows” filter to be set to 0. Is there a way of doing this in the XML layout file, or failing that in one of the supporting classes?

magento2 – Hide MORE INFORMATION tab if it’s empty in magento 2.3

Want to hide More Information tab in Magento 2.3 if it’s empty.

Not sure where to start, below is screenshot,

more info tab

I use M2.3 and theme is Porto (if that’s necessary to know) I checked under /var/www/html/vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml but not sure if this is where I need to make changes. Any help would be appreciated!

windows 10 – How to hide Chrome download bar

My project are not allow the download bar auto popup, so I try to search Google. Many results are shown using the Chrome Extensions, but I don’t want to use Chrome Extensions to solve the problem. Also, users are using Chrome version 77-84 now.

According the
How to disable Google Chrome download bar?, some people suggested chrome://flags, but this method cannot use now.

So, any ideas can disable Chrome download bar (e.g. Group Policy, registry)? Thank you.

magento2 – Hide Accound Dashboard Link depending upon customer group

I would suggest below reference code. There are two ways to do this

  1. Create a new layout that will work filter based on the customer group. Forex customer_group_general.xml. In this file, you can hide/remove the left navigation link which you have added using the XML file. Please follow the steps to create a new layout:
  • Create a new module
  • Add di.xml file in the etc/frontend folder
<?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="MagentoFrameworkViewResultPage">
        <plugin name="(pluginName)" type="(Vendor)(ModuleName)Plugin(ClassName)" sortOrder="10"/>
    </type>
</config>
  • Create plugin php file in your module in app/code/(codePool)/(Vendor)/(ModuleName)/Plugin/(ClassName).php
<?php

namespace (Vendor)(ModuleName)Plugin;

use MagentoCustomerModelSession;
use MagentoFrameworkViewResultPage;
use MagentoStoreModelGroupFactory;

class (ClassName)
{
    protected $customerSession;

    protected $groupFactory;

    public function __construct(
        Session $customerSession,
        GroupFactory $groupFactory
    ) {
        $this->customerSession = $customerSession;
        $this->groupFactory = $groupFactory;
    }

    public function afterAddPageLayoutHandles(Page $subject)
    {
        $group = $this->groupFactory->create()
            ->load($this->customerSession->getCustomerGroupId());
        if ($group->getId() >= 0) {
            $handle = sprintf("customer_group_%s", strtolower(preg_replace("/(^A-Za-z0-9)/", '_', $group->getName())));
            $subject->addHandle($handle);
        }

        return $subject;
    }
}

Now you can create a customer_group_default.xml and update the link based on your requirement. Please review the reference link for more details.

https://www.smartiehastheanswer.co.uk/magento2/adding-custom-dynamic-layout-handles-globally-in-magento2.html

  1. Create a custom link that will come from the phtml file. In phtml file, you can add your conditions and it will update in the left navigation.
<block class="CustomSalesBlockLink" name="downloads-new" template="Custom_Sales::link.phtml">
    <arguments>
        <argument name="sortOrder" xsi:type="number">210</argument>
    </arguments>
</block>

link.phtml

<?php if($block->hidelink()):?>
<li class="custom link" > 
<a href="<?= /* @noEscape */
$block->getUrl('test/index/index')?>" class="custom-link">
   <?php echo __("My Link")?>
</a> 
</li>
<?php }?>

Link.php

<?php
namespace CustomSalesBlock;

use MagentoCustomerBlockAccountSortLinkInterface;

/**
 * Class Link
 *
 * @api
 * @SuppressWarnings(PHPMD.DepthOfInheritance)
 * @since 100.0.2
 */
class Link extends MagentoFrameworkViewElementHtmlLink implements SortLinkInterface
{
    /**
     * {@inheritdoc}
     * @since 101.0.0
     */
    public function getSortOrder()
    {
        return $this->getData(self::SORT_ORDER);
    }

    public function hideLink() {
        //Add condition
        return false;
    }

}

In block, you can load current logged in customer and sent true or false flag in the link.phtml

I hope this will help you.

Thanks. If you need any help, please let me know.

sharepoint online – show hide items in dropdown column based on another dropdown

I have two drop down columns A- state B-City. When Minnesota is selected I only want B- City to show the cities in Minnesota. I know I could do it by creating a MN drop down and using J query if A=MN show MN City Column, but there are a ton of states on here and even more cities. I have seen some jquery out there but I think I need a dummies version I cant figure out how they are pulling from A to get the B option.

dnd 5e – How viable is it to hide as a bonus action(BA) when using spell attacks, compared to using a BA spell + a cantrip?

If you have access to the hide action as a Bonus Action (BA) (either as a goblin or through rogues cunning action), how viable or advantageous is it use it often to get advantage on spell attack rolls, compared to (what I imagine is the strongest alternative) using a BA spell and cantrip on the same turn?