Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.3-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - magento/graphql-ce#114: Mutations Prototype (POC) #74 (by @paliarush)
 - #16699: Declare module namespace before template path in Magento_Theme,  Magento_Newsletter and Magento_Tax (by @mageprince)
 - #16701: Declare module namespace before template path in all other modules (by @mageprince)
 - #16698: Declare module namespace before template path in Magento_Sales and Magento_Paypal (by @mageprince)
 - #16687: [Forwardport] Corrected function comment (by @sanganinamrata)
 - #16663: [Forwardport] Fixed Issue #11354 Merged CSS file name generation (by @mageprince)
 - #16588: [Forwardport] Fix of invalid price for integer currencies when amount less than group size (by @vkublytskyi)
 - #16562: [Forwardport] Coupon API not working for guest user (by @gelanivishal)
 - #16630: [Forwardport] Small refactoring to better code readability (by @ronak2ram)
 - #16613: Update Israeli ZIP code mask, 7 digits instead of 5 ,according to the� (by @gelanivishal)
 - #16569: Make it possible to disable cross-sell on cart page (by @arnoudhgz)
 - #16487: [Forwardport] Prevent layout cache corruption in edge case (by @gelanivishal)


Fixed GitHub Issues:
 - #11354: Merged CSS file name generation (reported by @pmoreno1980) has been fixed in #16663 by @mageprince in 2.3-develop branch
   Related commits:
     1. 2816764
     2. 2d31c1d
     3. e7677e8
     4. ca3c79c
     5. 311f8ca
     6. 1782c54
     7. 94e0e25
     8. 831e58c
     9. 742ad8c

 - #11717: Wrong price amount on product page (reported by @HirokazuNishi) has been fixed in #16588 by @vkublytskyi in 2.3-develop branch
   Related commits:
     1. e2c4aca

 - #14056: Coupon API not working for guest user (reported by @gnanasekaranl) has been fixed in #16562 by @gelanivishal in 2.3-develop branch
   Related commits:
     1. 1acd06f
     2. 2651be3
  • Loading branch information
Stanislav Idolov committed Jul 12, 2018
2 parents 6b7a9b3 + bfaac1f commit 5621eee
Show file tree
Hide file tree
Showing 94 changed files with 212 additions and 91 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/AdvancedSearch/Block/SearchData.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ abstract class SearchData extends Template implements SearchDataInterface
/**
* @var string
*/
protected $_template = 'search_data.phtml';
protected $_template = 'Magento_AdvancedSearch::search_data.phtml';

/**
* @param Template\Context $context
Expand Down
20 changes: 12 additions & 8 deletions app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,18 @@ protected function _toHtml()
if (!$this->_depends) {
return '';
}
return '<script>
require(["mage/adminhtml/form"], function(){
new FormElementDependenceController(' .
$this->_getDependsJson() .
($this->_configOptions ? ', ' .
$this->_jsonEncoder->encode(
$this->_configOptions
) : '') . '); });</script>';

$params = $this->_getDependsJson();

if ($this->_configOptions) {
$params .= ', ' . $this->_jsonEncoder->encode($this->_configOptions);
}

return "<script>
require(['mage/adminhtml/form'], function(){
new FormElementDependenceController({$params});
});
</script>";
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ class Attribute extends \Magento\Backend\Block\Template
/**
* @var string
*/
protected $_template = 'catalog/product/attribute/set/main/tree/attribute.phtml';
protected $_template = 'Magento_Catalog::catalog/product/attribute/set/main/tree/attribute.phtml';
}
4 changes: 4 additions & 0 deletions app/code/Magento/Checkout/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
<field id="number_items_to_display_pager" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Number of Items to Display Pager</label>
</field>
<field id="crosssell_enabled" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Show Cross-sell Items in the Shopping Cart</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
</group>
<group id="cart_link" translate="label" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0">
<label>My Cart Link</label>
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Checkout/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<delete_quote_after>30</delete_quote_after>
<redirect_to_cart>0</redirect_to_cart>
<number_items_to_display_pager>20</number_items_to_display_pager>
<crosssell_enabled>1</crosssell_enabled>
</cart>
<cart_link>
<use_qty>1</use_qty>
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Checkout/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,4 @@ Payment,Payment
"Item in Cart","Item in Cart"
"Items in Cart","Items in Cart"
"Close","Close"
"Show Cross-sell Items in the Shopping Cart","Show Cross-sell Items in the Shopping Cart"
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
</block>
<container name="checkout.cart.widget" as="checkout_cart_widget" label="Shopping Cart Items After"/>
</container>
<block class="Magento\Checkout\Block\Cart\Crosssell" name="checkout.cart.crosssell" template="Magento_Catalog::product/list/items.phtml" after="-">
<block class="Magento\Checkout\Block\Cart\Crosssell" name="checkout.cart.crosssell" template="Magento_Catalog::product/list/items.phtml" after="-" ifconfig="checkout/cart/crosssell_enabled">
<arguments>
<argument name="type" xsi:type="string">crosssell</argument>
</arguments>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<system>
<section id="checkout">
<group id="cart">
<field id="configurable_product_image" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<field id="configurable_product_image" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Configurable Product Image</label>
<source_model>Magento\Catalog\Model\Config\Source\Product\Thumbnail</source_model>
</field>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Directory/etc/zip_codes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
</zip>
<zip countryCode="IL">
<codes>
<code id="pattern_1" active="true" example="12345">^[0-9]{5}$</code>
<code id="pattern_1" active="true" example="6687865">^[0-9]{7}$</code>
</codes>
</zip>
<zip countryCode="IT">
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Js extends \Magento\Backend\Block\Template
* @var string
*/

protected $_template = 'attribute/edit/js.phtml';
protected $_template = 'Magento_Eav::attribute/edit/js.phtml';

/**
* @var \Magento\Eav\Model\Adminhtml\System\Config\Source\Inputtype
Expand Down
6 changes: 5 additions & 1 deletion app/code/Magento/GraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
type Query {
}

type Mutation {
placeholderMutation: String @doc(description: "Mutation type cannot be declared without fields. The placeholder will be removed when at least one mutation field is declared.")
}

input FilterTypeInput @doc(description: "FilterTypeInput specifies which action will be performed in a query ") {
eq: String @doc(description: "Equals")
finset: [String] @doc(description: "Find in set. The value can contain a set of comma-separated values")
Expand All @@ -30,4 +34,4 @@ type SearchResultPageInfo @doc(description: "SearchResultPageInfo provides navig
enum SortEnum @doc(description: "This enumeration indicates whether to return results in ascending or descending order") {
ASC
DESC
}
}
2 changes: 1 addition & 1 deletion app/code/Magento/GroupedProduct/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<system>
<section id="checkout" translate="label" type="text" sortOrder="305" showInDefault="1" showInWebsite="1" showInStore="1">
<group id="cart" translate="label" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
<field id="grouped_product_image" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<field id="grouped_product_image" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Grouped Product Image</label>
<source_model>Magento\Catalog\Model\Config\Source\Product\Thumbnail</source_model>
</field>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Newsletter/Block/Adminhtml/Problem.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Problem extends \Magento\Backend\Block\Template
/**
* @var string
*/
protected $_template = 'problem/list.phtml';
protected $_template = 'Magento_Newsletter::problem/list.phtml';

/**
* @var \Magento\Newsletter\Model\ResourceModel\Problem\Collection
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Edit extends \Magento\Backend\Block\Template
/**
* @var string
*/
protected $_template = 'queue/edit.phtml';
protected $_template = 'Magento_Newsletter::queue/edit.phtml';

/**
* Core registry
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Subscriber extends \Magento\Backend\Block\Template
/**
* @var string
*/
protected $_template = 'subscriber/list.phtml';
protected $_template = 'Magento_Newsletter::subscriber/list.phtml';

/**
* @var \Magento\Newsletter\Model\ResourceModel\Queue\CollectionFactory
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Newsletter/Block/Adminhtml/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Template extends \Magento\Backend\Block\Template
/**
* @var string
*/
protected $_template = 'template/list.phtml';
protected $_template = 'Magento_Newsletter::template/list.phtml';

/**
* @return $this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ class Banktransfer extends \Magento\OfflinePayments\Block\Form\AbstractInstructi
*
* @var string
*/
protected $_template = 'form/banktransfer.phtml';
protected $_template = 'Magento_OfflinePayments::form/banktransfer.phtml';
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ class Cashondelivery extends \Magento\OfflinePayments\Block\Form\AbstractInstruc
*
* @var string
*/
protected $_template = 'form/cashondelivery.phtml';
protected $_template = 'Magento_OfflinePayments::form/cashondelivery.phtml';
}
2 changes: 1 addition & 1 deletion app/code/Magento/Payment/Block/Info/Instructions.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Instructions extends \Magento\Payment\Block\Info
/**
* @var string
*/
protected $_template = 'info/instructions.phtml';
protected $_template = 'Magento_Payment::info/instructions.phtml';

/**
* Get instructions text from order payment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ class Form extends \Magento\Backend\Block\Template
/**
* @var string
*/
protected $_template = 'billing/agreement/view/form.phtml';
protected $_template = 'Magento_Paypal::billing/agreement/view/form.phtml';
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Info extends \Magento\Backend\Block\Template implements \Magento\Backend\B
/**
* @var string
*/
protected $_template = 'billing/agreement/view/tab/info.phtml';
protected $_template = 'Magento_Paypal::billing/agreement/view/tab/info.phtml';

/**
* Core registry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ class Advanced extends \Magento\Paypal\Block\Adminhtml\System\Config\Payflowlink
*
* @var string
*/
protected $_template = 'system/config/payflowlink/advanced.phtml';
protected $_template = 'Magento_Paypal::system/config/payflowlink/advanced.phtml';
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Info extends \Magento\Config\Block\System\Config\Form\Field
*
* @var string
*/
protected $_template = 'system/config/payflowlink/info.phtml';
protected $_template = 'Magento_Paypal::system/config/payflowlink/info.phtml';

/**
* Render fieldset html
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Paypal/Block/Hosted/Pro/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ class Form extends \Magento\Payment\Block\Form
/**
* @var string
*/
protected $_template = 'hss/info.phtml';
protected $_template = 'Magento_Paypal::hss/info.phtml';
}
2 changes: 1 addition & 1 deletion app/code/Magento/Paypal/Block/Iframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Iframe extends \Magento\Payment\Block\Form
/**
* @var string
*/
protected $_template = 'hss/js.phtml';
protected $_template = 'Magento_Paypal::hss/js.phtml';

/**
* @var \Magento\Sales\Model\OrderFactory
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Paypal/Block/Payflow/Advanced/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Form extends \Magento\Paypal\Block\Payflow\Link\Form
/**
* @var string
*/
protected $_template = 'payflowadvanced/info.phtml';
protected $_template = 'Magento_Paypal::payflowadvanced/info.phtml';

/**
* Get frame action URL
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Paypal/Block/Payflow/Link/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Form extends \Magento\Payment\Block\Form
/**
* @var string
*/
protected $_template = 'payflowlink/info.phtml';
protected $_template = 'Magento_Paypal::payflowlink/info.phtml';

/**
* Get frame action URL
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/ProductAlert/Block/Email/Price.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Price extends \Magento\ProductAlert\Block\Email\AbstractEmail
/**
* @var string
*/
protected $_template = 'email/price.phtml';
protected $_template = 'Magento_ProductAlert::email/price.phtml';

/**
* Retrieve unsubscribe url for product
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/ProductAlert/Block/Email/Stock.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Stock extends \Magento\ProductAlert\Block\Email\AbstractEmail
/**
* @var string
*/
protected $_template = 'email/stock.phtml';
protected $_template = 'Magento_ProductAlert::email/stock.phtml';

/**
* Retrieve unsubscribe url for product
Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/Quote/Model/CouponManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public function set($cartId, $couponCode)
if (!$quote->getItemsCount()) {
throw new NoSuchEntityException(__('The "%1" Cart doesn\'t contain products.', $cartId));
}
if (!$quote->getStoreId()) {
throw new NoSuchEntityException(__('Cart isn\'t assigned to correct store'));
}
$quote->getShippingAddress()->setCollectShippingRates(true);

try {
Expand Down
10 changes: 10 additions & 0 deletions app/code/Magento/Quote/Test/Unit/Model/CouponManagementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ protected function setUp()
'save',
'getShippingAddress',
'getCouponCode',
'getStoreId',
'__wakeup'
]);
$this->quoteAddressMock = $this->createPartialMock(\Magento\Quote\Model\Quote\Address::class, [
Expand Down Expand Up @@ -98,6 +99,9 @@ public function testSetWhenCouldNotApplyCoupon()
$cartId = 33;
$couponCode = '153a-ABC';

$this->storeMock->expects($this->any())->method('getId')->will($this->returnValue(1));
$this->quoteMock->expects($this->once())->method('getStoreId')->willReturn($this->returnValue(1));

$this->quoteRepositoryMock->expects($this->once())
->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock));
$this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(12));
Expand Down Expand Up @@ -125,6 +129,9 @@ public function testSetWhenCouponCodeIsInvalid()
$cartId = 33;
$couponCode = '153a-ABC';

$this->storeMock->expects($this->any())->method('getId')->will($this->returnValue(1));
$this->quoteMock->expects($this->once())->method('getStoreId')->willReturn($this->returnValue(1));

$this->quoteRepositoryMock->expects($this->once())
->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock));
$this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(12));
Expand All @@ -144,6 +151,9 @@ public function testSet()
$cartId = 33;
$couponCode = '153a-ABC';

$this->storeMock->expects($this->any())->method('getId')->will($this->returnValue(1));
$this->quoteMock->expects($this->once())->method('getStoreId')->willReturn($this->returnValue(1));

$this->quoteRepositoryMock->expects($this->once())
->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock));
$this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(12));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Viewed extends \Magento\Backend\Block\Widget\Grid\Container
/**
* @var string
*/
protected $_template = 'report/grid/container.phtml';
protected $_template = 'Magento_Reports::report/grid/container.phtml';

/**
* @return void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Bestsellers extends \Magento\Backend\Block\Widget\Grid\Container
*
* @var string
*/
protected $_template = 'report/grid/container.phtml';
protected $_template = 'Magento_Reports::report/grid/container.phtml';

/**
* {@inheritdoc}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Coupons extends \Magento\Backend\Block\Widget\Grid\Container
*
* @var string
*/
protected $_template = 'report/grid/container.phtml';
protected $_template = 'Magento_Reports::report/grid/container.phtml';

/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Invoiced extends \Magento\Backend\Block\Widget\Grid\Container
*
* @var string
*/
protected $_template = 'report/grid/container.phtml';
protected $_template = 'Magento_Reports::report/grid/container.phtml';

/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Refunded extends \Magento\Backend\Block\Widget\Grid\Container
*
* @var string
*/
protected $_template = 'report/grid/container.phtml';
protected $_template = 'Magento_Reports::report/grid/container.phtml';

/**
* {@inheritdoc}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Reports/Block/Adminhtml/Sales/Sales.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Sales extends \Magento\Backend\Block\Widget\Grid\Container
*
* @var string
*/
protected $_template = 'report/grid/container.phtml';
protected $_template = 'Magento_Reports::report/grid/container.phtml';

/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Shipping extends \Magento\Backend\Block\Widget\Grid\Container
*
* @var string
*/
protected $_template = 'report/grid/container.phtml';
protected $_template = 'Magento_Reports::report/grid/container.phtml';

/**
* {@inheritdoc}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Reports/Block/Adminhtml/Sales/Tax.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Tax extends \Magento\Backend\Block\Widget\Grid\Container
*
* @var string
*/
protected $_template = 'report/grid/container.phtml';
protected $_template = 'Magento_Reports::report/grid/container.phtml';

/**
* {@inheritdoc}
Expand Down
Loading

0 comments on commit 5621eee

Please sign in to comment.