Skip to content

Commit

Permalink
Merge pull request #4 from AlphaJanus/module-offer
Browse files Browse the repository at this point in the history
Fix_saved_cart_section
  • Loading branch information
AlphaJanus authored Apr 26, 2019
2 parents f7837d3 + bfe88a2 commit 473242d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 15 deletions.
3 changes: 2 additions & 1 deletion Controller/Quote/SendCartMyAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public function execute()
'quote' => $quote,
'link' => $link,
'feedback' => $feedback,
'name' => $data['name']
'name' => $data['name'],
'comment' => $data['comment']
]
)
->setFrom('general')
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"magento/framework": ">=100.0.0 <103"
},
"type": "magento2-module",
"version": "1.0.4",
"version": "1.0.5",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
3 changes: 0 additions & 3 deletions view/frontend/layout/checkout_cart_index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="Netzexpert_Offer::css/form.css"/>
</head>
<body>
<referenceContainer name="checkout.cart.container">
<block class="Netzexpert\Offer\Block\Checkout\Cart\Form" name="offer.form" template="Netzexpert_Offer::checkout/cart/form.phtml" after="cart.discount"/>
Expand Down
1 change: 0 additions & 1 deletion view/frontend/layout/offer_offer_view.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?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">
<head>
<css src="Netzexpert_Offer::css/form.css"/>
<title>My Saved Carts</title>
</head>
<update handle="checkout_cart_item_renderers"/>
Expand Down
16 changes: 9 additions & 7 deletions view/frontend/templates/checkout/cart/form_send_my_account.phtml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?php
/** @var $block \Netzexpert\Offer\Block\Checkout\Cart\FormSendMyAccount */
?>
<form id="send-quote-form" class="form_email" method="post">
<form id="send-quote-form" class="form_cart" method="post">
<input type="hidden" name="offer_id" value="<?= $block->getOfferId(); ?>" />
<input name="email" placeholder="enter email address" title="<?php /* @escapeNotVerified */ echo __('Email') ?>"
value="<?php echo $block->escapeHtml($this->helper('Magento\Contact\Helper\Data')->getPostValue('email') ?: $this->helper('Magento\Contact\Helper\Data')->getUserEmail()) ?>"
class="input-text" type="email" data-validate="{required:true, 'validate-email':true, equalTo:'#email'}"/>
<input name="name" placeholder="enter name and surname" title="<?php /* @escapeNotVerified */ echo __('Name') ?>"
<input name="email" placeholder="Enter email address" title="<?php /* @escapeNotVerified */ echo __('Email') ?>"
value="<?php echo $block->escapeHtml($block->getStoreEmail()) ?>"
class="input-email" type="email" data-validate="{required:true, 'validate-email':true, equalTo:'#email'}"/>
<input name="name" placeholder="Enter name and surname" title="<?php /* @escapeNotVerified */ echo __('Name') ?>"
value="<?php echo $block->escapeHtml($this->helper('Magento\Contact\Helper\Data')->getPostValue('name') ?: $this->helper('Magento\Contact\Helper\Data')->getUserName()) ?>"
class="input-text" type="text" data-validate="{required:true}"/>
class="input-name" type="text" data-validate="{required:true}"/>
<textarea name="comment" placeholder="Leave your comment here" title="<?php /* @escapeNotVerified */ echo __('Comment') ?>"
class="comment" type="text" data-validate="{required:true}"></textarea>
<select name="template" class="form_template" type="text">
<?php
foreach ($block->getAvailableTemplates() as $template) {
Expand All @@ -18,7 +20,7 @@
}
?>
</select>
<button id="send-quote" type="submit" title="<?= /* @escapeNotVerified */ __('Send Cart') ?>" class="action_update">
<button id="send-quote" type="submit" title="<?= /* @escapeNotVerified */ __('Send Cart') ?>" class="action_button">
<span><?= /* @escapeNotVerified */ __('Send Cart') ?></span>
</button>
</form>
Expand Down
10 changes: 8 additions & 2 deletions view/frontend/web/css/source/_module.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
}
}
& when (@media-common = true) {
.checkout-cart-index {
.cart-container {
.checkout-cart-index, .offer-offer-view {
.cart-container, .columns {
#send-quote-form {
width: 73%;
&.form_cart {
width: 100%;
}
display: flex;
justify-content: space-between;
margin-bottom: 3%;
Expand All @@ -42,6 +45,9 @@
margin-left: 1%;
white-space: nowrap;
}
.form_template, .form_template_request {
margin-bottom: 10px;
}
}
}
}
Expand Down

0 comments on commit 473242d

Please sign in to comment.