Commit 19449ca3 by halweg

Merge branch 'developer' of http://47.99.244.21:9999/root/joshine into developer

parents 5f2d4a02 4add18e0
...@@ -42,6 +42,7 @@ class Onepage extends \Magento\Framework\View\Element\Template ...@@ -42,6 +42,7 @@ class Onepage extends \Magento\Framework\View\Element\Template
* @var \Magento\Framework\Serialize\SerializerInterface * @var \Magento\Framework\Serialize\SerializerInterface
*/ */
private $serializer; private $serializer;
private $_scopeConfigInterface;
/** /**
* @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Framework\View\Element\Template\Context $context
...@@ -60,7 +61,8 @@ class Onepage extends \Magento\Framework\View\Element\Template ...@@ -60,7 +61,8 @@ class Onepage extends \Magento\Framework\View\Element\Template
array $layoutProcessors = [], array $layoutProcessors = [],
array $data = [], array $data = [],
\Magento\Framework\Serialize\Serializer\Json $serializer = null, \Magento\Framework\Serialize\Serializer\Json $serializer = null,
\Magento\Framework\Serialize\SerializerInterface $serializerInterface = null \Magento\Framework\Serialize\SerializerInterface $serializerInterface = null,
\Magento\Framework\App\Config\ScopeConfigInterface $_scopeConfigInterface
) { ) {
parent::__construct($context, $data); parent::__construct($context, $data);
$this->formKey = $formKey; $this->formKey = $formKey;
...@@ -70,6 +72,7 @@ class Onepage extends \Magento\Framework\View\Element\Template ...@@ -70,6 +72,7 @@ class Onepage extends \Magento\Framework\View\Element\Template
$this->layoutProcessors = $layoutProcessors; $this->layoutProcessors = $layoutProcessors;
$this->serializer = $serializerInterface ?: \Magento\Framework\App\ObjectManager::getInstance() $this->serializer = $serializerInterface ?: \Magento\Framework\App\ObjectManager::getInstance()
->get(\Magento\Framework\Serialize\Serializer\JsonHexTag::class); ->get(\Magento\Framework\Serialize\Serializer\JsonHexTag::class);
$this->_scopeConfigInterface = $_scopeConfigInterface;
} }
/** /**
...@@ -105,7 +108,10 @@ class Onepage extends \Magento\Framework\View\Element\Template ...@@ -105,7 +108,10 @@ class Onepage extends \Magento\Framework\View\Element\Template
{ {
return $this->configProvider->getConfig(); return $this->configProvider->getConfig();
} }
public function getFlatratePrice()
{
return $this->_scopeConfigInterface->getValue('carriers/flatrate/price');
}
/** /**
* Get base url for block. * Get base url for block.
* *
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
/** @var $block \Magento\Checkout\Block\Onepage */ /** @var $block \Magento\Checkout\Block\Onepage */
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */ /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
?> ?>
<?php
$flatraPrice = $block->getFlatratePrice();
?>
<style type="text/css"> <style type="text/css">
.payment-method._active{ .payment-method._active{
border: 1px solid #1979c3 !important; border: 1px solid #1979c3 !important;
...@@ -777,6 +780,7 @@ ...@@ -777,6 +780,7 @@
<?php $serializedCheckoutConfig = /* @noEscape */ $block->getSerializedCheckoutConfig(); <?php $serializedCheckoutConfig = /* @noEscape */ $block->getSerializedCheckoutConfig();
$scriptString = <<<script $scriptString = <<<script
window.checkoutConfig = {$serializedCheckoutConfig}; window.checkoutConfig = {$serializedCheckoutConfig};
window.checkoutConfig.flatrate_price = {$flatraPrice};
// Create aliases for customer.js model from customer module // Create aliases for customer.js model from customer module
window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn; window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
window.customerData = window.checkoutConfig.customerData; window.customerData = window.checkoutConfig.customerData;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment