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
* @var \Magento\Framework\Serialize\SerializerInterface
*/
private $serializer;
private $_scopeConfigInterface;
/**
* @param \Magento\Framework\View\Element\Template\Context $context
......@@ -60,7 +61,8 @@ class Onepage extends \Magento\Framework\View\Element\Template
array $layoutProcessors = [],
array $data = [],
\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);
$this->formKey = $formKey;
......@@ -70,6 +72,7 @@ class Onepage extends \Magento\Framework\View\Element\Template
$this->layoutProcessors = $layoutProcessors;
$this->serializer = $serializerInterface ?: \Magento\Framework\App\ObjectManager::getInstance()
->get(\Magento\Framework\Serialize\Serializer\JsonHexTag::class);
$this->_scopeConfigInterface = $_scopeConfigInterface;
}
/**
......@@ -105,7 +108,10 @@ class Onepage extends \Magento\Framework\View\Element\Template
{
return $this->configProvider->getConfig();
}
public function getFlatratePrice()
{
return $this->_scopeConfigInterface->getValue('carriers/flatrate/price');
}
/**
* Get base url for block.
*
......
......@@ -7,6 +7,9 @@
/** @var $block \Magento\Checkout\Block\Onepage */
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
?>
<?php
$flatraPrice = $block->getFlatratePrice();
?>
<style type="text/css">
.payment-method._active{
border: 1px solid #1979c3 !important;
......@@ -777,6 +780,7 @@
<?php $serializedCheckoutConfig = /* @noEscape */ $block->getSerializedCheckoutConfig();
$scriptString = <<<script
window.checkoutConfig = {$serializedCheckoutConfig};
window.checkoutConfig.flatrate_price = {$flatraPrice};
// Create aliases for customer.js model from customer module
window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
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