Skip to content

Commit

Permalink
Merged in feature/NE-37 (pull request #12)
Browse files Browse the repository at this point in the history
Feature/NE-37

Approved-by: Jose Sinisterra <[email protected]>
  • Loading branch information
AdrianNWT authored and klarre1 committed Jan 22, 2020
2 parents 4ee3bd0 + f5d029e commit 59d6a73
Show file tree
Hide file tree
Showing 10 changed files with 796 additions and 1 deletion.
25 changes: 25 additions & 0 deletions Model/CheckoutConfigProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Dibs\EasyCheckout\Model;

use Magento\Framework\UrlInterface;

class CheckoutConfigProvider implements \Magento\Checkout\Model\ConfigProviderInterface
{
/** @var UrlInterface */
protected $_urlBuilder;

protected $_controllerPath = 'easycheckout/order';

public function __construct(UrlInterface $_urlBuilder)
{
$this->_urlBuilder = $_urlBuilder;
}

public function getConfig()
{
$output['saveShippingMethodUrl'] = $this->_urlBuilder->getUrl("{$this->_controllerPath}/SaveShippingMethod");

return $output;
}
}
8 changes: 8 additions & 0 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@
<label>Display Additional block</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="display_default_shipping_methods" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Display default magento shipping methods</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="display_dibs_shipping_methods" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Display dibs shipping methods</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="additional_block" translate="label" type="editor" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Additional block Content</label>
<frontend_model>Dibs\EasyCheckout\Block\Adminhtml\System\Config\Editor</frontend_model>
Expand Down
10 changes: 10 additions & 0 deletions etc/frontend/di.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Checkout\Model\CompositeConfigProvider">
<arguments>
<argument name="configProviders" xsi:type="array">
<item name="checkout_provider" xsi:type="object">Dibs\EasyCheckout\Model\CheckoutConfigProvider</item>
</argument>
</arguments>
</type>
</config>
221 changes: 220 additions & 1 deletion view/frontend/layout/dibs_easy_checkout_index_index.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions view/frontend/templates/sidebar.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ $counter = $this->helper('\Magento\Checkout\Helper\Cart');
</div>
</div>
<?php echo $block->getChildHtml('shipping'); ?>
<?php echo $block->getChildHtml('checkout.root'); ?>
<div class="dibs-easy-checkout-extra">
<div class="dibs-easy-checkout-extra__right">
<?php echo $block->getChildHtml('coupon'); ?>
Expand Down
44 changes: 44 additions & 0 deletions view/frontend/web/css/source/module/_checkout.less
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,50 @@ table {
}
}

body.dibs_easy_checkout-index-index {
#checkout {
width: 100%;
.opc-wrapper {
padding: 0;
left: 205px;
width: ~"calc(100% - 205px)";
position: relative;
@media (max-width: 768px) {
left: auto;
width: 100%;
}
.form.methods-shipping {
@media (max-width: 639px) {
margin: 0;
padding: 0;
border: 0;
background: transparent;
}
}
.step-title {
font-size: 25px;
font-weight: 700;
color: @dibs-color-black;
}
.table-checkout-shipping-method {
@media (max-width: 1024px) {
min-width: 450px;
}
@media (max-width: 639px) {
min-width: 1px;
}
}
#checkout-shipping-method-load {
input[type='radio'] {
top: 0;
margin: 0;
box-shadow: none;
}
}
}
}
}

button:not(.primary).dibs-primary {
.dibs-btn;
height: 40px;
Expand Down
Loading

0 comments on commit 59d6a73

Please sign in to comment.