Skip to content

Commit 0d9a6a7

Browse files
author
Ievgen Shakhsuvarov
committed
Merge branch 'checkout' of github.corp.ebay.com:magento-folks/magento2ce into checkout-ft
2 parents 77928fb + 7d8a80d commit 0d9a6a7

File tree

171 files changed

+5465
-1767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+5465
-1767
lines changed

.travis.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ env:
99
- TEST_SUITE=integration_integrity
1010
- TEST_SUITE=static_phpcs
1111
- TEST_SUITE=static_annotation
12+
cache:
13+
apt: true
14+
directories:
15+
- $HOME/.composer/cache
16+
- $HOME/.cache/bin
1217
matrix:
1318
exclude:
1419
- php: 5.6
@@ -18,6 +23,16 @@ matrix:
1823
before_install:
1924
- sudo apt-get update -qq
2025
- sudo apt-get install -y -qq postfix
26+
- sh -c 'if [ "$CASHER_DIR" ]; then
27+
if [ -x $HOME/.cache/bin/composer ]; then
28+
$HOME/.cache/bin/composer self-update; echo '';
29+
else
30+
mkdir -p $HOME/.cache/bin;
31+
curl --connect-timeout 30 -sS https://getcomposer.org/installer \
32+
| php -- --install-dir $HOME/.cache/bin/ --filename composer;
33+
fi
34+
fi'
35+
- export PATH="$HOME/.cache/bin:$PATH"
2136
before_script:
2237
# Mock mail
2338
- sudo service postfix stop
@@ -46,7 +61,7 @@ before_script:
4661
# Change memory_limit for travis
4762
- echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
4863
- phpenv rehash;
49-
- composer install --no-interaction --dev
64+
- composer install --no-interaction --prefer-dist
5065
script:
5166
# Unit tests
5267
- sh -c "if [ '$TEST_SUITE' = 'unit' ]; then ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist; fi"
@@ -59,4 +74,4 @@ script:
5974
# Static tests [Code Style]
6075
- sh -c "if [ '$TEST_SUITE' = 'static_phpcs' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testCodeStyle'; fi"
6176
# Static tests [Code Style]
62-
- sh -c "if [ '$TEST_SUITE' = 'static_annotation' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testAnnotationStandard'; fi"
77+
- sh -c "if [ '$TEST_SUITE' = 'static_annotation' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testAnnotationStandard'; fi"

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,6 @@
137137
<comment>Alternative text for next link in pagination menu. If empty, default arrow image will used.</comment>
138138
</field>
139139
</group>
140-
<group id="email" translate="label" type="text" sortOrder="510" showInDefault="1" showInWebsite="1" showInStore="1">
141-
<label>Transactional Emails</label>
142-
<field id="logo" translate="label" type="image" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
143-
<label>Logo Image</label>
144-
<comment>Allowed file types: jpg, jpeg, gif, png</comment>
145-
<backend_model>Magento\Config\Model\Config\Backend\Email\Logo</backend_model>
146-
<base_url type="media" scope_info="1">email/logo</base_url>
147-
</field>
148-
<field id="logo_alt" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
149-
<label>Logo Image Alt</label>
150-
</field>
151-
</group>
152140
</section>
153141
<section id="dev" translate="label" type="text" sortOrder="920" showInDefault="1" showInWebsite="1" showInStore="1">
154142
<label>Developer</label>
@@ -287,6 +275,9 @@
287275
<field id="phone" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
288276
<label>Store Phone Number</label>
289277
</field>
278+
<field id="hours" translate="label" type="text" sortOrder="22" showInDefault="1" showInWebsite="1" showInStore="1">
279+
<label>Store Hours of Operation</label>
280+
</field>
290281
<field id="country_id" translate="label" type="select" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="0">
291282
<label>Country</label>
292283
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>

app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ protected function _prepareForm()
7070
}
7171
$this->_coreRegistry->register('attribute_type_hidden_fields', $_hiddenFields);
7272

73+
$this->_eventManager->dispatch('product_attribute_form_build_main_tab', ['form' => $form]);
74+
7375
$frontendInputValues = array_merge($frontendInputElm->getValues(), $additionalTypes);
7476
$frontendInputElm->setValues($frontendInputValues);
7577

app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function _prepareForm()
4343

4444
/** @var \Magento\Framework\Data\Form $form */
4545
$form = $this->_formFactory->create();
46-
$fieldset = $form->addFieldset('set_name', ['legend' => __('Edit Set Name')]);
46+
$fieldset = $form->addFieldset('set_name', ['legend' => __('Edit Product Template Name')]);
4747
$fieldset->addField(
4848
'attribute_set_name',
4949
'text',

app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protected function _prepareLayout()
2727
'addButton',
2828
'Magento\Backend\Block\Widget\Button',
2929
[
30-
'label' => __('Add New Set'),
30+
'label' => __('Add Product Template'),
3131
'onclick' => 'setLocation(\'' . $this->getUrl('catalog/*/add') . '\')',
3232
'class' => 'add primary add-set'
3333
]

app/code/Magento/Catalog/Controller/Adminhtml/Product/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function execute()
3737
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
3838
$resultPage = $this->resultPageFactory->create();
3939
$resultPage->setActiveMenu('Magento_Catalog::catalog_products');
40-
$resultPage->getConfig()->getTitle()->set((__('Products')));
40+
$resultPage->getConfig()->getTitle()->prepend(__('Catalog'));
4141
return $resultPage;
4242
}
4343
}

app/code/Magento/Catalog/Model/Template/Filter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function setUseSessionInUrl($flag)
9393
*/
9494
public function viewDirective($construction)
9595
{
96-
$params = $this->_getIncludeParameters($construction[2]);
96+
$params = $this->_getParameters($construction[2]);
9797
$params['_absolute'] = $this->_useAbsoluteLinks;
9898
/**
9999
* @bug: the "_absolute" key is not supported by underlying services
@@ -122,7 +122,7 @@ public function viewDirective($construction)
122122
*/
123123
public function mediaDirective($construction)
124124
{
125-
$params = $this->_getIncludeParameters($construction[2]);
125+
$params = $this->_getParameters($construction[2]);
126126
return $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . $params['url'];
127127
}
128128

@@ -136,7 +136,7 @@ public function mediaDirective($construction)
136136
*/
137137
public function storeDirective($construction)
138138
{
139-
$params = $this->_getIncludeParameters($construction[2]);
139+
$params = $this->_getParameters($construction[2]);
140140
if (!isset($params['_query'])) {
141141
$params['_query'] = [];
142142
}

app/code/Magento/Checkout/etc/frontend/sections.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,7 @@
3737
<action name="checkout/sidebar/updateItemQty">
3838
<section name="cart"/>
3939
</action>
40+
<action name="checkout/onepage/saveOrder">
41+
<section name="last-ordered-items"/>
42+
</action>
4043
</config>

app/code/Magento/Checkout/view/frontend/web/js/action/place-order.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,18 @@ define(
99
'mage/storage',
1010
'mage/url',
1111
'Magento_Checkout/js/model/error-processor',
12-
'Magento_Customer/js/model/customer',
13-
'underscore'
12+
'Magento_Customer/js/model/customer'
1413
],
15-
function (quote, urlBuilder, storage, url, errorProcessor, customer, _) {
14+
function (quote, urlBuilder, storage, url, errorProcessor, customer) {
1615
'use strict';
1716

1817
return function (paymentData, redirectOnSuccess) {
19-
var serviceUrl, payload;
18+
var serviceUrl,
19+
payload;
2020

2121
redirectOnSuccess = redirectOnSuccess === false ? false : true;
22-
/**
23-
* Checkout for guest and registered customer.
24-
*/
22+
23+
/** Checkout for guest and registered customer. */
2524
if (!customer.isLoggedIn()) {
2625
serviceUrl = urlBuilder.createUrl('/guest-carts/:quoteId/payment-information', {
2726
quoteId: quote.getQuoteId()
@@ -40,7 +39,7 @@ define(
4039
billingAddress: quote.billingAddress()
4140
};
4241
}
43-
storage.post(
42+
return storage.post(
4443
serviceUrl, JSON.stringify(payload)
4544
).done(
4645
function () {

app/code/Magento/Checkout/view/frontend/web/js/view/payment.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ define(
2626
},
2727
isVisible: ko.observable(quote.isVirtual()),
2828
quoteIsVirtual: quote.isVirtual(),
29+
isPaymentMethodsAvailable: ko.computed(function () {
30+
return paymentService.getAvailablePaymentMethods().length > 0;
31+
}),
2932

3033
initialize: function () {
3134
this._super();

0 commit comments

Comments
 (0)