Skip to content

Instantly share code, notes, and snippets.

@magevision
Last active October 25, 2017 11:42
Show Gist options
  • Save magevision/915072528dfeddfb6ff50f3c8c078327 to your computer and use it in GitHub Desktop.
Save magevision/915072528dfeddfb6ff50f3c8c078327 to your computer and use it in GitHub Desktop.
Magevision Blog Post #22
<?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">
<body>
<referenceBlock name="checkout.cart.shipping">
<action method="setTemplate">
<argument name="template" xsi:type="string">MageVision_Blog22::cart/shipping.phtml</argument>
</action>
<arguments>
<argument name="jsLayout" xsi:type="array">
<item name="components" xsi:type="array">
<item name="block-summary" xsi:type="array">
<item name="config" xsi:type="array">
<item name="componentDisabled" xsi:type="boolean">true</item>
</item>
</item>
</item>
</argument>
</arguments>
</referenceBlock>
</body>
</page>
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="MageVision_Blog22" setup_version="2.0.0" />
</config>
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'MageVision_Blog22',
__DIR__
);
<?php /** @var $block \Magento\Checkout\Block\Cart\Shipping */ ?>
<div id="block-shipping" class="block shipping" data-mage-init='{"collapsible":{"openedState": "active", "saveState": true}}'>
<div id="block-summary" data-bind="scope:'block-summary'" class="content" data-role="content" aria-labelledby="block-shipping-heading">
<!-- ko template: getTemplate() --><!-- /ko -->
<script type="text/x-magento-init">
{
"#block-summary": {
"Magento_Ui/js/core/app": <?= /* @escapeNotVerified */ $block->getJsLayout() ?>
}
}
</script>
<script>
window.checkoutConfig = <?= /* @escapeNotVerified */ $block->getSerializedCheckoutConfig() ?>;
window.customerData = window.checkoutConfig.customerData;
window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
require([
'mage/url',
'Magento_Ui/js/block-loader'
], function(url, blockLoader) {
blockLoader("<?= /* @escapeNotVerified */ $block->getViewFileUrl('images/loader-1.gif') ?>");
return url.setBaseUrl('<?= /* @escapeNotVerified */ $block->getBaseUrl() ?>');
})
</script>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment