
Product
Socket Zero Introduces Automated Remediation PRs
Put vulnerability remediation on autopilot with automated security patches and intelligent dependency upgrades across your GitHub repositories.
siteation/magento2-module-storeinfo
Advanced tools
Get your store information with ease
This Magento 2 module adds the option to get the store information with ease.
So you can get the store phone number from the Stores > Config. Instead using static block or hard code it in your template directly.
Install the package via;
composer require siteation/magento2-module-storeinfo
bin/magento setup:upgrade
Note This Module requires Magento 2.3 or higher! For more requirements see the
composer.json.
By defaut this module loads nothing.
Use one of the samples to get started.
We have made an address block that uses the store information. And also comes with schema tags to enrich the Contact data.
To load the default store address block use 1 of the following xml samples in your template.
<referenceBlock name="footer-content">
<block
name="footer.store.info"
as="footer-store-info"
template="Siteation_StoreInfo::hyva/store-address.phtml"
/>
</referenceBlock>
<referenceContainer name="footer">
<block name="footer.store.info"
as="footer-store-info"
template="Siteation_StoreInfo::luma/store-address.phtml">
<arguments>
<argument name="viewModelStoreInfo"
xsi:type="object">Siteation\StoreInfo\ViewModel\StoreInfo</argument>
</arguments>
</block>
</referenceContainer>
First get the viewModal in your template.
<?php
declare(strict_types=1);
use Hyva\Theme\Model\ViewModelRegistry;
use Magento\Framework\View\Element\Template;
use Magento\Framework\Escaper;
use Siteation\StoreInfo\ViewModel\StoreInfo;
/** @var ViewModelRegistry $viewModels */
/** @var Template $block */
/** @var Escaper $escaper */
/** @var StoreInfo $storeInfo */
$storeInfo = $viewModels->require(StoreInfo::class);
For Luma templates, see the previous sample for the xml needed to load the viewModal.
<?php
declare(strict_types=1);
use Magento\Framework\View\Element\Template;
use Magento\Framework\Escaper;
/** @var Template $block */
/** @var Escaper $escaper */
/** @var Siteation\StoreInfo\ViewModel\StoreInfo $storeInfo */
$storeInfo = $block->getData('viewModelStoreInfo');
After this you can load any Magento StoreInfo field as text in your phtml;
<?php
// Get specific predefined store info field
$storeInfo->getPostcode();
$storeInfo->getSalesEmail();
// Get the same as above, using the global functions
$storeInfo->getStoreInfo('postcode'); // 'general/store_information/%s'
$storeInfo->getStoreEmail('email', 'ident_sales'); // 'trans_email/%2$s/%1$s'
FAQs
Get your store information with ease
We found that siteation/magento2-module-storeinfo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Product
Put vulnerability remediation on autopilot with automated security patches and intelligent dependency upgrades across your GitHub repositories.

Product
Socket Zero automates vulnerability remediation with upgrades and targeted patches, including fixes for 100% of known, patchable RubyGems CVEs.

Product
Explore Socket’s redesigned Alerts UI, multi-branch repository monitoring, and new tools for resolving findings, searching scans, and filtering security alerts.