Commit f0800e31 by dhn

币种换算

parent aa73e0bc
...@@ -130,11 +130,19 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart ...@@ -130,11 +130,19 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
} }
public function getFreeShippingSubtotal() public function getFreeShippingSubtotal()
{ {
return $this->_scopeConfigInterface->getValue('carriers/freeshipping/free_shipping_subtotal'); $full_free = $this->_scopeConfigInterface->getValue('carriers/freeshipping/free_shipping_subtotal');
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$_helper = $objectManager->get('Magento\Framework\Pricing\Helper\Data');
$price = $_helper->currency($full_free, true, false);
return $price;
} }
public function getFlatratePrice() public function getFlatratePrice()
{ {
return $this->_scopeConfigInterface->getValue('carriers/flatrate/price'); $full_free = $this->_scopeConfigInterface->getValue('carriers/flatrate/price');
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$_helper = $objectManager->get('Magento\Framework\Pricing\Helper\Data');
$price = $_helper->currency($full_free, true, false);
return $price;
} }
public function getCountryHtmlSelect($defValue = null, $name = 'country_id', $id = 'country', $title = 'Country') { public function getCountryHtmlSelect($defValue = null, $name = 'country_id', $id = 'country', $title = 'Country') {
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
......
...@@ -30,7 +30,7 @@ $flatraPrice = $block->getFlatratePrice(); ...@@ -30,7 +30,7 @@ $flatraPrice = $block->getFlatratePrice();
$scriptString = <<<script $scriptString = <<<script
window.checkoutConfig = {$serializedCheckoutConfig}; window.checkoutConfig = {$serializedCheckoutConfig};
window.checkoutConfig.flatrate_price = {$flatraPrice}; window.checkoutConfig.flatrate_price = "{$flatraPrice}";
window.customerData = window.checkoutConfig.customerData; window.customerData = window.checkoutConfig.customerData;
window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn; window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
require([ require([
......
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