PHPackages                             semexpert/module-store-info-blocks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. semexpert/module-store-info-blocks

ActiveMagento2-module

semexpert/module-store-info-blocks
==================================

Enables developers to include Magento blocks in their themes that have access to Store Configuration like address, phone number, etc.

1.0.4(4y ago)03.2kMITPHPPHP ^7.2|^8.0

Since Dec 10Pushed 4y ago13 watchersCompare

[ Source](https://github.com/SemExpert/StoreInfoBlocks)[ Packagist](https://packagist.org/packages/semexpert/module-store-info-blocks)[ RSS](/packages/semexpert-module-store-info-blocks/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (6)Used By (0)

SemExpert\_StoreInfoBlocks
==========================

[](#semexpert_storeinfoblocks)

SemExpert\_StoreInfoBlocks enables developers to include Magento blocks in their themes that have access to Store Configuration like address, phone number, etc.

[![Build Status](https://camo.githubusercontent.com/a6287c6d88af4ae58933793f5ada4b271131724a2d8f6b1da1d1c5066ba1bf8c/68747470733a2f2f7472617669732d63692e6f72672f53656d4578706572742f53746f7265496e666f426c6f636b732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/SemExpert/StoreInfoBlocks)

Getting Started
---------------

[](#getting-started)

To get started you only need to add the module to an existing Magento2 installation.

### Prerequisites

[](#prerequisites)

You need a running copy of Magento2

Also, in order for composer to locate the module repository, you need to have set up SemExpert repository:

```
composer config repositories.semexpert composer https://packages.semexpert.com.ar/
```

### Install

[](#install)

To get StoreInfoBlocks up and running, you need to add it as a dependency to your Magento composer.json file

```
composer require semexpert/module-store-info-blocks
```

Or add it manually to your composer.json

```
{
  "require": {
    "semexpert/module-store-info-blocks": "*"
  }
}
```

After installing, you need to enable via the Magento CLI

```
php bin/magento module:enable SemExpert_StoreInfoBlocks
```

Running tests
-------------

[](#running-tests)

This module provides only unit tests that can be hooked into Magento testsuite in the standard way

```
php bin/magento dev:tests:run unit
```

In order to run this module's tests exclusively you can use the provided `dev/phpunit.xml` configuration file.

```
vendor/bin/phpunit -c vendor/semexpert/moodule-store-info-blocks/dev/phpunit.xml
```

I found no need for integration or functional tests as of yet. And also I am unsure about how to write those.

### Coding Styles

[](#coding-styles)

The module follows Magento 2.2 PHP and Less coding standards. You should test your code using the provided black/white lists and phpunit.xml configuration.

```
cp ./dev/tests/static/phpunit.xml dev/tests/static/phpunit.xml
cp ./dev/tests/static/less/whitelist/common.txt dev/tests/static/testsuite/Magento/Test/Less/_files/whitelist/common.txt
cp ./dev/tests/static/php/whitelist/common.txt dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt
```

Magento 2
---------

[](#magento-2)

### Components

[](#components)

The module provides 2 types of blocks

- `SemExpert\StoreInfoBlocks\Block\Template` Provides a stadard Template block with access to store configuration information
- `SemExpert\StoreInfoBlocks\Block\Value` Allow to output a single configuration value without formatting. Requires some setup via layout xml

These blocks are available for use in your custom themes but are not automatically included anywhere on the site.

### Usage

[](#usage)

#### Template

[](#template)

By simply calling the Template block in a layout, the provided storeinfo.phtml template will be used which is provided only as an example

```

```

or you can provide your own template. Within the template, you can access a DataObject containing the store information by calling `$block->getStoreInformation()`

*default.xml*

```

```

*storeinfo-modal-window.phtml*

```

    Call Us at:
