2017 © Pedro Peláez
 

magento2-module magento-module-commonblocks

Magento 2 Module with simple basic blocks

image

mestrona/magento-module-commonblocks

Magento 2 Module with simple basic blocks

  • Monday, January 29, 2018
  • by mestrona
  • Repository
  • 3 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Magento2 Module Mestrona_CommonBlocks

This module is intended for developers., (*1)

Magento 2 Module with simple basic blocks, (*2)

  • Store Information Templates, (*3)

    • store_information.phtml - Address and Store Hours, for example for the footer
    • store_information/contact.phtml - Phone and Email Links
  • CMS Block for Checkout, (*4)

Planed:, (*5)

  • 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., (*6)

Installation

Install the module as usual using the composer client with the module name mestrona/magento-module-commonblocks., (*7)

Use

Add those blocks to your layout. Example:, (*8)

    <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, (*9)

<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), (*10)

<?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., (*11)

This module was co-developed with iMi digital., (*12)

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., (*13)

Of course we provide development of closed-source moduls as well., (*14)

The Versions

29/01 2018

1.2.0

1.2.0.0

Magento 2 Module with simple basic blocks

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0|~7.1.0
  • magento/module-store *

 

29/01 2018

dev-master

9999999-dev

Magento 2 Module with simple basic blocks

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

  • magento/module-store *
  • php ~5.5.0|~5.6.0|~7.0.0|~7.1.0

 

21/06 2016

1.1.0

1.1.0.0

Magento 2 Module with simple basic blocks

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • magento/module-store *

 

20/06 2016

1.0.0

1.0.0.0

Magento 2 Module with simple basic blocks

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0
  • magento/module-store *