-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ecd3e40
commit 2fdc7e6
Showing
4 changed files
with
68 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* Info | ||
* | ||
* @copyright Copyright © 2018 DevStone. All rights reserved. | ||
* @author [email protected] | ||
*/ | ||
|
||
namespace DevStone\UsageCalculator\Block\Catalog\Product; | ||
|
||
use Magento\Catalog\Block\Product\Context; | ||
|
||
Class Info extends \Magento\Framework\View\Element\Template | ||
{ | ||
protected \Magento\Store\Model\Information $storeInfo; | ||
|
||
protected \Magento\Store\Model\Store $store; | ||
|
||
public function __construct( | ||
Context $context, | ||
\Magento\Store\Model\Information $storeInfo, | ||
\Magento\Store\Model\Store $store, | ||
array $data = []) | ||
{ | ||
$this->storeInfo = $storeInfo; | ||
$this->store = $store; | ||
parent::__construct($context, $data); | ||
} | ||
|
||
public function getPhone() { | ||
return $this->storeInfo->getStoreInformationObject($this->store)->getPhone(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<p class="usages-more-info-call"> | ||
<?= __('Need volume licensing discount? Confused?') ?> | ||
<br /> | ||
<?= __( | ||
'Call %1 and ask for custom quote.', | ||
'<a href="tel:'.$block->getPhone().'">'.$block->getPhone().'</a>' | ||
) ?> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters