mestrona / magento-module-commonblocks

mestrona/magento-module-commonblocks

Magento 2 Module with simple basic blocks

magento2-module Compatibility: 2.4.7-2.4.9 Code Quality: Fail Tests: N/A Security: Pass OSL-3.0, AFL-3.0

Are you the maintainer of mestrona?

Packagento pulls mestrona's Composer packages from the public registry so buyers can find them here.

Claim the namespace to take ownership, publish new releases directly, and start charging for premium versions.

Claim this namespace →

Magento2 Module Mestrona_CommonBlocks

This module is intended for developers.

Magento 2 Module with simple basic blocks

  • Store Information
    Templates

  • store_information.phtml - Address and Store Hours, for example for the footer

  • store_information/contact.phtml - Phone and Email Links

  • CMS Block for Checkout

Planed:

  • System Version (and maybe Git branch)

Basically, lots of more small, simple blocks should be added.
If you miss something, file an issue or - even better - a pull request.

Installation

Install the module as usual using the composer client with the module name mestrona/magento-module-commonblocks.

Use

Add those blocks to your layout.
Example:

    <referenceContainer name="header.panel">
        <block class="Mestrona\CommonBlocks\Block\StoreInformation" name="header_info" after="skip_to_content"
               template="Mestrona_CommonBlocks::store_information/contact.phtml" />
    </referenceContainer>
    <referenceContainer name="footer">
        <block class="Mestrona\CommonBlocks\Block\StoreInformation" name="footer_info" before="footer_links"
               template="Mestrona_CommonBlocks::store_information.phtml" />
    </referenceContainer>

CMS Block for Checkout

Add to your frontend/di.xml

<type name="Mestrona\CommonBlocks\Model\CmsBlockCheckoutConfigProvider">
    <arguments>
        <argument name="blockIdentifier" xsi:type="string">identifier or ID of the block goes here</argument>
    </arguments>
</type>

Add something like this to your checkout_index_index.xml (depends were you want to place the block)

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="steps" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="shipping-step" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="shippingAddress" xsi:type="array">
                                                    <item name="children" xsi:type="array">
                                                        <item name="shipping-address-fieldset" xsi:type="array">
                                                            <item name="children" xsi:type="array">
                                                                <item name="cms-block" xsi:type="array">
                                                                    <item name="component" xsi:type="string">uiComponent</item>
                                                                    <item name="config" xsi:type="array">
                                                                        <item name="template" xsi:type="string">Mestrona_CommonBlocks/cms-block</item>
                                                                    </item>
                                                                    <item name="sortOrder" xsi:type="string">125</item>
                                                                </item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

About Us

Mestrona GbR offers Magento open source modules. If you are confronted with any bugs, you may want to open an issue here.

This module was co-developed with iMi digital.

In need of support or an implementation of a modul in an existing system, free to contact us. In this case, we will provide full service support for a fee.

Of course we provide development of closed-source moduls as well.

No changelog yet

The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.

Versions
Version Stability QA Status Compatibility Released
1.3.2 stable Fail Magento 2.4.7-2.4.9 Details 2025-11-19 15:44:10
1.3.1 stable Not tested Not yet tested Details 2020-02-06 16:16:54
1.3.0 stable Not tested Not yet tested Details 2019-05-23 10:32:12
1.2.0 stable Not tested Not yet tested Details 2018-01-29 13:00:34
1.1.0 stable Not tested Not yet tested Details 2016-06-21 17:38:13
1.0.0 stable Not tested Not yet tested Details 2016-06-20 12:42:45

Requires 1

Package Constraint
magento/module-store *

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Pass Pass

Code Quality

Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. A phpcs finding can't make a module incompatible.

Static analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

Static analysis results
Tool Status Findings Summary
PHPCS Fail 34 5 errors, 29 warnings (ruleset: Magento2) — 23 auto-fixable with phpcbf
PHPMD Pass 0
Cpd Pass 0
Composer validate Info 1 valid; 1 advisory note (composer validate --strict)

PHPStan

Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 1 1
2.4.8 1 1
2.4.9 1 1

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Security

Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0
License
OSL-3.0, AFL-3.0
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.