Skip to content

Commit f5f84bd

Browse files
committed
Merge branch 'B2B-2204' of https://github.com/magento-arcticfoxes/magento2ce into B2B-2204
2 parents 6877010 + 4d497fb commit f5f84bd

File tree

87 files changed

+3062
-384
lines changed

Some content is hidden

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

87 files changed

+3062
-384
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="CustomerReorderSimpleProductTest" extends="CustomerOrderSimpleProductTest">
11+
<annotations>
12+
<features value="Checkout"/>
13+
<stories value="Customer Reorder simple product"/>
14+
<title value="Customer Reorder simple product"/>
15+
<description value="Customer Reorder simple product"/>
16+
<stories value="Customer Reorder simple product"/>
17+
<testCaseId value="MC-27191"/>
18+
<severity value="MAJOR"/>
19+
<group value="reorder"/>
20+
</annotations>
21+
22+
<!-- Log in as admin-->
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24+
25+
<!-- Go to orders page and validate the order details -->
26+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="addFilterToGridAndOpenOrder">
27+
<argument name="orderId" value="{$getOrderNumber}"/>
28+
</actionGroup>
29+
30+
<!-- create an shipment for the order-->
31+
<actionGroup ref="AdminCreateShipmentFromOrderPage" stepKey="createNewShipment">
32+
<argument name="Title" value="Title"/>
33+
<argument name="Number" value="99"/>
34+
<argument name="Qty" value="1"/>
35+
<argument name="Comment" value="comments for shipment"/>
36+
</actionGroup>
37+
38+
39+
<!-- Open My Account Page from Customer dropdown -->
40+
<actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToMyAccountPage"/>
41+
42+
<!-- Goto Orders tab from Sidebar menu in Storefront page -->
43+
<actionGroup ref="StorefrontCustomerGoToSidebarMenu" stepKey="goToSidebarMenu">
44+
<argument name="menu" value="My Orders"/>
45+
</actionGroup>
46+
47+
<!-- Clicking View Order from My Orders Grid -->
48+
<actionGroup ref="StorefrontClickViewOrderLinkOnMyOrdersPageActionGroup" stepKey="clickViewOrder"/>
49+
50+
51+
<!-- Clicking on Reorder link from Order Details Tab -->
52+
<click selector="{{StorefrontCustomerOrderViewSection.reorder}}" stepKey="clickReorder"/>
53+
54+
<!-- Reorder Simple Product -->
55+
<actionGroup ref="PlaceOrderWithLoggedUserActionGroup" stepKey="placeReorder">
56+
<argument name="shippingMethod" value="Flat Rate"/>
57+
</actionGroup>
58+
59+
</test>
60+
</tests>

app/code/Magento/Captcha/composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
"magento/module-sales": "*",
1414
"magento/module-store": "*",
1515
"magento/module-authorization": "*",
16-
"laminas/laminas-captcha": "^2.11.0",
17-
"laminas/laminas-db": "^2.13.4",
18-
"laminas/laminas-session": "^2.12.1"
16+
"laminas/laminas-captcha": "^2.12",
17+
"laminas/laminas-db": "^2.13.4"
1918
},
2019
"type": "magento2-module",
2120
"license": [

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Framework\Controller\ResultFactory;
1313
use Magento\Ui\Component\MassAction\Filter;
1414
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
15+
use Magento\Catalog\Helper\Product\Edit\Action\Attribute as AttributeHelper;
1516

1617
/**
1718
* Updates status for a batch of products.
@@ -41,27 +42,36 @@ class MassStatus extends \Magento\Catalog\Controller\Adminhtml\Product implement
4142
*/
4243
private $productAction;
4344

45+
/**
46+
* @var AttributeHelper
47+
*/
48+
private $attributeHelper;
49+
4450
/**
4551
* @param \Magento\Backend\App\Action\Context $context
4652
* @param Builder $productBuilder
4753
* @param \Magento\Catalog\Model\Indexer\Product\Price\Processor $productPriceIndexerProcessor
4854
* @param Filter $filter
4955
* @param CollectionFactory $collectionFactory
5056
* @param \Magento\Catalog\Model\Product\Action $productAction
57+
* @param AttributeHelper $attributeHelper
5158
*/
5259
public function __construct(
5360
\Magento\Backend\App\Action\Context $context,
5461
Product\Builder $productBuilder,
5562
\Magento\Catalog\Model\Indexer\Product\Price\Processor $productPriceIndexerProcessor,
5663
Filter $filter,
5764
CollectionFactory $collectionFactory,
58-
\Magento\Catalog\Model\Product\Action $productAction = null
65+
\Magento\Catalog\Model\Product\Action $productAction = null,
66+
AttributeHelper $attributeHelper = null
5967
) {
6068
$this->filter = $filter;
6169
$this->collectionFactory = $collectionFactory;
6270
$this->_productPriceIndexerProcessor = $productPriceIndexerProcessor;
6371
$this->productAction = $productAction ?: ObjectManager::getInstance()
6472
->get(\Magento\Catalog\Model\Product\Action::class);
73+
$this->attributeHelper = $attributeHelper ?: ObjectManager::getInstance()
74+
->get(AttributeHelper::class);
6575
parent::__construct($context, $productBuilder);
6676
}
6777

@@ -93,6 +103,7 @@ public function execute()
93103
{
94104
$collection = $this->filter->getCollection($this->collectionFactory->create());
95105
$productIds = $collection->getAllIds();
106+
$this->attributeHelper->setProductIds($productIds);
96107
$requestStoreId = $storeId = $this->getRequest()->getParam('store', null);
97108
$filterRequest = $this->getRequest()->getParam('filters', null);
98109
$status = (int) $this->getRequest()->getParam('status');

app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,23 @@ abstract class AbstractAction
2929
/**
3030
* Chunk size
3131
*/
32-
const RANGE_CATEGORY_STEP = 500;
32+
public const RANGE_CATEGORY_STEP = 500;
3333

3434
/**
3535
* Chunk size for product
3636
*/
37-
const RANGE_PRODUCT_STEP = 1000000;
37+
public const RANGE_PRODUCT_STEP = 1000000;
3838

3939
/**
4040
* Catalog category index table name
4141
*/
42-
const MAIN_INDEX_TABLE = 'catalog_category_product_index';
42+
public const MAIN_INDEX_TABLE = 'catalog_category_product_index';
4343

4444
/**
4545
* Suffix for table to show it is temporary
4646
* @deprecated see getIndexTable
4747
*/
48-
const TEMPORARY_TABLE_SUFFIX = '_tmp';
48+
public const TEMPORARY_TABLE_SUFFIX = '_tmp';
4949

5050
/**
5151
* Cached non anchor categories select by store id
@@ -582,7 +582,7 @@ protected function createAnchorSelect(Store $store)
582582
'category_id' => 'cc.entity_id',
583583
'product_id' => 'ccp.product_id',
584584
'position' => new \Zend_Db_Expr(
585-
$this->connection->getIfNullSql('ccp2.position', 'ccp.position + 10000')
585+
$this->connection->getIfNullSql('ccp2.position', 'MIN(ccp.position) + 10000')
586586
),
587587
'is_parent' => new \Zend_Db_Expr('0'),
588588
'store_id' => new \Zend_Db_Expr($store->getId()),
@@ -823,7 +823,7 @@ protected function getAllProducts(Store $store)
823823
'category_id' => new \Zend_Db_Expr($store->getRootCategoryId()),
824824
'product_id' => 'cp.entity_id',
825825
'position' => new \Zend_Db_Expr(
826-
$this->connection->getCheckSql('ccp.product_id IS NOT NULL', 'ccp.position', '0')
826+
$this->connection->getCheckSql('ccp.product_id IS NOT NULL', 'MIN(ccp.position)', '10000')
827827
),
828828
'is_parent' => new \Zend_Db_Expr(
829829
$this->connection->getCheckSql('ccp.product_id IS NOT NULL', '1', '0')

0 commit comments

Comments
 (0)