Skip to content

Commit

Permalink
Merge branch '2.3-develop' into MAGETWO-87592-static-test-less
Browse files Browse the repository at this point in the history
  • Loading branch information
anthoula committed May 17, 2018
2 parents af960ed + ec06e89 commit bf68656
Show file tree
Hide file tree
Showing 41 changed files with 376 additions and 783 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,25 +659,30 @@ protected function makeTempCategoryTreeIndex()
*/
protected function fillTempCategoryTreeIndex($temporaryName)
{
// This finds all children (cc2) that descend from a parent (cc) by path.
// For example, cc.path may be '1/2', and cc2.path may be '1/2/3/4/5'.
$temporarySelect = $this->connection->select()->from(
['cc' => $this->getTable('catalog_category_entity')],
['parent_id' => 'entity_id']
)->joinInner(
['cc2' => $this->getTable('catalog_category_entity')],
'cc2.path LIKE ' . $this->connection->getConcatSql(
[$this->connection->quoteIdentifier('cc.path'), $this->connection->quote('/%')]
),
['child_id' => 'entity_id']
$selects = $this->prepareSelectsByRange(
$this->connection->select()
->from(
['c' => $this->getTable('catalog_category_entity')],
['entity_id', 'path']
),
'entity_id'
);

$this->connection->query(
$temporarySelect->insertFromSelect(
$temporaryName,
['parent_id', 'child_id']
)
);
foreach ($selects as $select) {
$values = [];

foreach ($this->connection->fetchAll($select) as $category) {
foreach (explode('/', $category['path']) as $parentId) {
if ($parentId !== $category['entity_id']) {
$values[] = [$parentId, $category['entity_id']];
}
}
}

if (count($values) > 0) {
$this->connection->insertArray($temporaryName, ['parent_id', 'child_id'], $values);
}
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $viewModel = $block->getData('viewModel');
"breadcrumbs": {
"categoryUrlSuffix": "<?= $block->escapeHtml($viewModel->getCategoryUrlSuffix()); ?>",
"useCategoryPathInUrl": <?= (int)$viewModel->isCategoryUsedInProductUrl(); ?>,
"product": "<?= $block->escapeHtml($viewModel->getProductName()); ?>"
"product": "<?= $block->escapeHtml($block->escapeJsQuote($viewModel->getProductName(), '"')); ?>"
}
}'>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

?>
<?php
/* if(isset($GET['limit'])) {
$limit = $GET['limit']
}*/
header("Location:{$block->getProduct()->getProductUrl()}#info-product_reviews");
exit;
?>
15 changes: 15 additions & 0 deletions app/code/Magento/Sales/Model/Order/ItemRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public function get($id)
}

$this->addProductOption($orderItem);
$this->addParentItem($orderItem);
$this->registry[$id] = $orderItem;
}
return $this->registry[$id];
Expand Down Expand Up @@ -216,6 +217,20 @@ protected function addProductOption(OrderItemInterface $orderItem)
return $this;
}

/**
* Set parent item.
*
* @param OrderItemInterface $orderItem
* @throws InputException
* @throws NoSuchEntityException
*/
private function addParentItem(OrderItemInterface $orderItem)
{
if ($parentId = $orderItem->getParentItemId()) {
$orderItem->setParentItem($this->get($parentId));
}
}

/**
* Set product options data
*
Expand Down
25 changes: 24 additions & 1 deletion app/code/Magento/Ui/etc/ui_configuration.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,29 @@
</xs:choice>
</xs:group>

<xs:group name="formElementsConfig">
<xs:choice>
<xs:element name="hidden" type="formElementHidden" maxOccurs="unbounded"/>
<xs:element name="file" type="formElementFile" maxOccurs="unbounded"/>
<xs:element name="input" type="formElementInput" maxOccurs="unbounded"/>
<xs:element name="date" type="formElementDate" maxOccurs="unbounded"/>
<xs:element name="boolean" type="formElementBoolean" maxOccurs="unbounded"/>
<xs:element name="checkbox" type="formElementCheckbox" maxOccurs="unbounded"/>
<xs:element name="checkboxset" type="formElementCheckboxset" maxOccurs="unbounded"/>
<xs:element name="email" type="formElementEmail" maxOccurs="unbounded"/>
<xs:element name="select" type="formElementSelect" maxOccurs="unbounded"/>
<xs:element name="multiselect" type="formElementMultiselect" maxOccurs="unbounded"/>
<xs:element name="text" type="formElementText" maxOccurs="unbounded"/>
<xs:element name="textarea" type="formElementTextarea" maxOccurs="unbounded"/>
<xs:element name="price" type="formElementPrice" maxOccurs="unbounded"/>
<xs:element name="radioset" type="formElementRadioset" maxOccurs="unbounded"/>
<xs:element name="wysiwyg" type="formElementWysiwyg" maxOccurs="unbounded"/>
<xs:element name="fileUploader" type="formElementFileUploader" maxOccurs="unbounded"/>
<xs:element name="imageUploader" type="formElementImageUploader" maxOccurs="unbounded"/>
<xs:element name="button" type="formElementButton" maxOccurs="unbounded"/>
</xs:choice>
</xs:group>

<xs:complexType name="componentListingConfigured">
<xs:complexContent>
<xs:extension base="componentListing">
Expand Down Expand Up @@ -287,7 +310,7 @@
</xs:annotation>
<xs:complexType>
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:group ref="formElements"/>
<xs:group ref="formElementsConfig"/>
</xs:choice>
</xs:complexType>
</xs:element>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
<xs:complexType name="componentBoolean">
<xs:sequence>
<xs:group ref="configurable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:group ref="abstractSettings"/>
<xs:group ref="componentBooleanSettings"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:complexType name="formElementBoolean">
<xs:sequence>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice maxOccurs="unbounded" minOccurs="0">
Expand All @@ -25,7 +39,6 @@

<xs:group name="componentBooleanSettings">
<xs:choice>
<xs:group ref="abstractSettings"/>
</xs:choice>
</xs:group>
</xs:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:complexType name="formElementButton">
<xs:sequence>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="componentButtonSettings"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:group name="componentButtonSettings">
<xs:choice>
<xs:group ref="uiElementSettings"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
<xs:complexType name="componentCheckbox">
<xs:sequence>
<xs:group ref="configurable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="abstractSettings"/>
<xs:group ref="componentCheckboxSetting"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:complexType name="formElementCheckbox">
<xs:sequence>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
Expand All @@ -25,7 +39,6 @@

<xs:group name="componentCheckboxSetting">
<xs:choice>
<xs:group ref="abstractSettings"/>
<xs:element name="description" type="translatableString">
<xs:annotation>
<xs:documentation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
<xs:complexType name="componentCheckboxset">
<xs:sequence>
<xs:group ref="configurable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:group ref="abstractSettings"/>
<xs:group ref="componentCheckboxsetSettings"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:complexType name="formElementCheckboxset">
<xs:sequence>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice maxOccurs="unbounded" minOccurs="0">
Expand All @@ -25,7 +39,6 @@

<xs:group name="componentCheckboxsetSettings">
<xs:choice>
<xs:group ref="abstractSettings"/>
<xs:element ref="multiple"/>
<xs:element name="options" type="optionsType"/>
</xs:choice>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
<xs:complexType name="componentDate">
<xs:sequence>
<xs:group ref="configurable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="abstractSettings"/>
<xs:group ref="componentDateSettings"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:complexType name="formElementDate">
<xs:sequence>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
Expand All @@ -25,7 +39,6 @@

<xs:group name="componentDateSettings">
<xs:choice>
<xs:group ref="abstractSettings"/>
<xs:element name="options" type="dateOptionsType">
<xs:annotation>
<xs:documentation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
<xs:complexType name="componentEmail">
<xs:sequence>
<xs:group ref="configurable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="abstractSettings"/>
<xs:group ref="componentEmailSettings"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:complexType name="formElementEmail">
<xs:sequence>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
Expand All @@ -25,7 +39,6 @@

<xs:group name="componentEmailSettings">
<xs:choice>
<xs:group ref="abstractSettings"/>
</xs:choice>
</xs:group>
</xs:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
<xs:complexType name="componentFile">
<xs:sequence>
<xs:group ref="configurable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="abstractSettings"/>
<xs:group ref="componentFileSettings"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:complexType name="formElementFile">
<xs:sequence>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
Expand All @@ -25,7 +39,6 @@

<xs:group name="componentFileSettings">
<xs:choice>
<xs:group ref="abstractSettings"/>
</xs:choice>
</xs:group>
</xs:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:complexType name="formElementFileUploader">
<xs:sequence>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="componentFileUploaderSettings"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:group name="componentFileUploaderSettings">
<xs:choice>
<xs:group ref="abstractSettings"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
<xs:complexType name="componentHidden">
<xs:sequence>
<xs:group ref="configurable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="abstractSettings"/>
<xs:group ref="hiddenSetting"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:complexType name="formElementHidden">
<xs:sequence>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
Expand All @@ -25,7 +39,6 @@

<xs:group name="hiddenSetting">
<xs:choice>
<xs:group ref="abstractSettings"/>
</xs:choice>
</xs:group>
</xs:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:complexType name="formElementImageUploader">
<xs:sequence>
<xs:element name="settings" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="componentImageUploaderSettings"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="ui_element_attributes"/>
</xs:complexType>

<xs:group name="componentImageUploaderSettings">
<xs:choice>
<xs:group ref="componentFileUploaderSettings"/>
Expand Down
Loading

0 comments on commit bf68656

Please sign in to comment.