Skip to content

Commit

Permalink
0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Jan 12, 2020
1 parent 7bbbb10 commit d99b2e0
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 3 additions & 3 deletions etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
xsi:noNamespaceSchemaLocation='urn:magento:framework:Module/etc/module.xsd'
>
<module name='Tingle_Core' setup_version='0.0.1'>
<sequence>
<module name='Magento_Checkout'/>
</sequence>
<!-- 2020-01-12 https://www.upwork.com/ab/f/contracts/23508657
@see view/frontend/requirejs-config.js -->
<sequence><module name='Magento_Checkout'/></sequence>
</module>
</config>
59 changes: 59 additions & 0 deletions view/frontend/layout/checkout_index_index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version='1.0'?>
<page
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='urn:magento:framework:View/Layout/etc/page_configuration.xsd'
>
<referenceBlock name='checkout.root'>
<arguments>
<argument name='jsLayout' xsi:type='array'>
<item name='components' xsi:type='array'>
<item name='checkout' xsi:type='array'>
<item name='children' xsi:type='array'>
<item name='sidebar' xsi:type='array'>
<item name='children' xsi:type='array'>
<item name='summary' xsi:type='array'>
<item name='children' xsi:type='array'>
<item name='cart_items' xsi:type='array'>
<!-- 2020-01-12
It moves cart items above the rest totals information: https://magento.stackexchange.com/a/225544 -->
<item name='sortOrder' xsi:type='string'>0</item>
</item>
<item name='totals' xsi:type='array'>
<item name='children' xsi:type='array'>
<item name='subtotal' xsi:type='array'>
<item name='config' xsi:type='array'>
<!-- 2020-01-12 "Cart Subtotal" => "Subtotal" -->
<item name='title' xsi:type='string' translate='true'>Subtotal</item>
</item>
</item>
<item name='shipping' xsi:type='array'>
<item name='config' xsi:type='array'>
<!-- 2020-01-12 "Shipping" => "Shipping Options" -->
<item name='title' xsi:type='string' translate='true'>Shipping Options</item>
</item>
</item>
</item>
</item>
<item name='itemsAfter' xsi:type='array'>
<item name='children' xsi:type='array'>
<item name='discreteDelivery' xsi:type='array'>
<item name='sortOrder' xsi:type='string'>1</item>
<item name='displayArea' xsi:type='string'>ship-to</item>
<item name='component' xsi:type='string'>uiComponent</item>
<item name='config' xsi:type='array'>
<item name='template' xsi:type='string'>Sheer_Checkout/discreteDelivery</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</argument>
</arguments>
</referenceBlock>
</page>
11 changes: 11 additions & 0 deletions view/frontend/requirejs-config.js
Original file line number Diff line number Diff line change
@@ -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}
}}};
Original file line number Diff line number Diff line change
@@ -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();}
});};});
Original file line number Diff line number Diff line change
@@ -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
);};});
28 changes: 28 additions & 0 deletions view/frontend/web/css/source/_module.less
Original file line number Diff line number Diff line change
@@ -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;}
}
}

0 comments on commit d99b2e0

Please sign in to comment.