From d99b2e07fedcdbe9ed12d6b98d2b2d53e853bd74 Mon Sep 17 00:00:00 2001 From: Dmitry Fedyuk Date: Sun, 12 Jan 2020 13:32:40 +0600 Subject: [PATCH] 0.0.2 --- composer.json | 2 +- etc/module.xml | 6 +- view/frontend/layout/checkout_index_index.xml | 59 +++++++++++++++++++ view/frontend/requirejs-config.js | 11 ++++ .../js/view/summary/abstract-total.js | 13 ++++ .../js/view/summary/shipping.js | 6 ++ view/frontend/web/css/source/_module.less | 28 +++++++++ 7 files changed, 121 insertions(+), 4 deletions(-) create mode 100644 view/frontend/layout/checkout_index_index.xml create mode 100644 view/frontend/requirejs-config.js create mode 100644 view/frontend/web/Magento_Checkout/js/view/summary/abstract-total.js create mode 100644 view/frontend/web/Magento_Checkout/js/view/summary/shipping.js create mode 100644 view/frontend/web/css/source/_module.less diff --git a/composer.json b/composer.json index 072dab2..61e0416 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "tingle.com/core" - ,"version": "0.0.1" + ,"version": "0.0.2" ,"description": "A custom module for tingle.com (Magento 2)" ,"type": "magento2-module" ,"homepage": "https://github.com/tingle-com/core" diff --git a/etc/module.xml b/etc/module.xml index 6065c23..1274a7c 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -4,8 +4,8 @@ xsi:noNamespaceSchemaLocation='urn:magento:framework:Module/etc/module.xsd' > - - - + + \ No newline at end of file diff --git a/view/frontend/layout/checkout_index_index.xml b/view/frontend/layout/checkout_index_index.xml new file mode 100644 index 0000000..cca3fe1 --- /dev/null +++ b/view/frontend/layout/checkout_index_index.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + 0 + + + + + + + Subtotal + + + + + + Shipping Options + + + + + + + + 1 + ship-to + uiComponent + + Sheer_Checkout/discreteDelivery + + + + + + + + + + + + + + + diff --git a/view/frontend/requirejs-config.js b/view/frontend/requirejs-config.js new file mode 100644 index 0000000..689dbdc --- /dev/null +++ b/view/frontend/requirejs-config.js @@ -0,0 +1,11 @@ +// 2020-01-12 https://www.upwork.com/ab/f/contracts/23508657 +var config = {config: {mixins: { + // 2020-01-12 https://www.upwork.com/ab/f/contracts/23508657 + // It shows the full totals block on the shipping step of the frontend checkout: + // https://magento.stackexchange.com/a/235329 + 'Magento_Checkout/js/view/summary/abstract-total': {'Tingle_Core/Magento_Checkout/js/view/summary/abstract-total': true} + // 2020-01-12 https://www.upwork.com/ab/f/contracts/23508657 + // It shows taxes in the full totals block on the shipping step of the frontend checkout: + // https://magento.stackexchange.com/a/209351 + ,'Magento_Checkout/js/view/summary/shipping': {'Tingle_Core/Magento_Checkout/js/view/summary/shipping': true} +}}}; \ No newline at end of file diff --git a/view/frontend/web/Magento_Checkout/js/view/summary/abstract-total.js b/view/frontend/web/Magento_Checkout/js/view/summary/abstract-total.js new file mode 100644 index 0000000..cbe3933 --- /dev/null +++ b/view/frontend/web/Magento_Checkout/js/view/summary/abstract-total.js @@ -0,0 +1,13 @@ +// 2020-01-12 +define([], function() {'use strict'; return function(sb) {return sb.extend({ + /** + * 2020-01-12 + * @override + * @see Magento_Checkout/js/view/summary/abstract-total::isFullMode() + * It shows the full totals block on the shipping step of the frontend checkout: + * https://magento.stackexchange.com/a/235329 + * https://www.upwork.com/ab/f/contracts/23508657 + * @returns {boolean} + */ + isFullMode: function() {return !!this.getTotals();} +});};}); \ No newline at end of file diff --git a/view/frontend/web/Magento_Checkout/js/view/summary/shipping.js b/view/frontend/web/Magento_Checkout/js/view/summary/shipping.js new file mode 100644 index 0000000..24be032 --- /dev/null +++ b/view/frontend/web/Magento_Checkout/js/view/summary/shipping.js @@ -0,0 +1,6 @@ +// 2020-01-12 https://www.upwork.com/ab/f/contracts/23508657 +// It shows taxes in the full totals block on the shipping step of the frontend checkout: +// https://magento.stackexchange.com/a/209351 +define(['Magento_Checkout/js/model/cart/estimate-service'], function() {'use strict'; return function(sb) {return ( + sb +);};}); \ No newline at end of file diff --git a/view/frontend/web/css/source/_module.less b/view/frontend/web/css/source/_module.less new file mode 100644 index 0000000..9ff7800 --- /dev/null +++ b/view/frontend/web/css/source/_module.less @@ -0,0 +1,28 @@ +body.checkout-index-index .opc-block-summary { + .items-in-cart { + margin-bottom: 0; + .product-item { + padding-bottom: 0; + .price-including-tax { + margin: 0; + > .cart-price { + font-size: initial; line-height: initial; + > .price {font-size: 16px; font-weight: bold;} + } + } + } + } + .totals.shipping > .mark { + .label { + color: #000000; + font-size: 16px; + font-weight: bold; + letter-spacing: normal; + margin-bottom: 4px; + margin-top: 0; + padding-left: 0; + text-transform: uppercase; + } + .value {font-size: 12px;} + } +} \ No newline at end of file