Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product variants OLD PR #400

Merged
merged 13 commits into from
Nov 13, 2020
Merged

Product variants OLD PR #400

merged 13 commits into from
Nov 13, 2020

Conversation

bricht
Copy link
Contributor

@bricht bricht commented Oct 21, 2020

-Added string type or message entity id to accommodate for product variants

Description (*)

PR moved to #413

Related Pull Requests

Fixed Issues (if relevant)

Questions or comments

Code Review Checklist (*)

See dataied checklist

  • Story AC is completed
  • proposed changes correspond to Magento Technical Vision
  • new or changed code is covered with web-api/integration tests (if applicable)
    • expected results in test verified with data from fixture
  • no backward incompatibile changes
  • Export API (et_schema.xml) and SF API schemas (proto schema) are reflected in the codebase
    • prerequisite: story branch created with all needed generated classes according to proposes schema-changes
    • DTO classes do not contain any manual changes (Magento\CatalogExportApi*, Magento\CatalogStorefrontApi*)
  • Class usage: magento/catalog-storefront repo don't use directly classes from magento/saas-export repo and vise-verse
    • Check composer.json dependencies
  • Legacy code is deleted
    • Any Data Providers present in Connector part (Magento\CatalogStorefrontConnector, Magento*Extractor modules)
    • And Data Providers from Export API (magento/saas-export repo) that is not relevant anymore
    • Any DTO for Export API/SF API which does not reflect current schema: et_schema, proto schema
    • Any “mapper” on Message Broker (between Export API and SF API)
      • if mapper still needed, verify fields used in mapping, remove not relevant fields

-Added string type or message entity id to accomodate product variants
@bricht
Copy link
Contributor Author

bricht commented Oct 21, 2020

@magento run all tests

1 similar comment
@bricht
Copy link
Contributor Author

bricht commented Oct 21, 2020

@magento run all tests

@mslabko
Copy link
Member

mslabko commented Oct 21, 2020

@magento run Static Tests

@mslabko
Copy link
Member

mslabko commented Oct 21, 2020

@magento run Unit Tests

@slavvka
Copy link
Member

slavvka commented Oct 22, 2020

@magento run all tests

@mslabko
Copy link
Member

mslabko commented Oct 23, 2020

@magento run Integration Tests

-Added product variant write and delete functionality to Catalog Storefront
@bricht
Copy link
Contributor Author

bricht commented Oct 27, 2020

@magento run all tests

@bricht
Copy link
Contributor Author

bricht commented Oct 27, 2020

@magento run all tests with editions EE

1 similar comment
@bricht
Copy link
Contributor Author

bricht commented Oct 27, 2020

@magento run all tests with editions EE

@mslabko
Copy link
Member

mslabko commented Oct 28, 2020

@magento run Unit Tests

-Modified GetProductVariants and DeleteProductVariants to the VariantService
@bricht
Copy link
Contributor Author

bricht commented Oct 29, 2020

@magento run all tests with editions EE

-static fixes
@bricht
Copy link
Contributor Author

bricht commented Oct 29, 2020

@magento run all tests with editions EE

1 similar comment
@bricht
Copy link
Contributor Author

bricht commented Oct 29, 2020

@magento run all tests with editions EE

@vgoncharenko
Copy link
Contributor

@magento run Static Tests

jekabs added 2 commits October 30, 2020 13:08
-Added test
-Improved elasticsearch deleteByQuery
-Added some exceptions for empty variant response
@bricht
Copy link
Contributor Author

bricht commented Nov 3, 2020

@magento run all tests with editions EE

jekabs added 3 commits November 3, 2020 14:23
-Test fix
-Removed old ConfigurableVariantsExtractor
@@ -14,7 +14,7 @@
class Entity
{
/**
* @var int
* @var int|string
*/
Copy link
Contributor

@RuslanKostiv1 RuslanKostiv1 Nov 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in which case entityId is a string?
Can we use string only?

Copy link
Contributor Author

@bricht bricht Nov 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using string only. Id is a string for product variants.

@@ -49,7 +49,7 @@ public function __construct(
/**
* @inheritdoc
*/
public function execute(array $entities, string $scope): void
public function execute(array $entities, string $scope = null): void
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use nullable annotation ?string $scope

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

public function execute(array $entities, string $scope): void
public function execute(array $entities, string $scope = null): void
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use nullable annotation ?string $scope

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

*
* @return void
*/
public function execute(array $entities, string $scope): void;
public function execute(array $entities, string $scope = null): void;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use nullable annotation ?string $scope

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

@@ -49,7 +49,7 @@ public function __construct(
/**
* @inheritdoc
*/
public function execute(array $entities, string $scope): void
public function execute(array $entities, string $scope = null): void
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use nullable annotation ?string $scope

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

'product_variant' => [
//TODO: Adapt to work without store code
self::EMPTY_STORE_CODE => [
'delete_by_query' => $deleteFields
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use created constant here \Magento\CatalogStorefront\Model\CatalogRepository::DELETE_BY_QUERY

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

}

/**
* Validate something
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add better description to this method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

}
}

/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method description is missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

$this->variantService->GetProductVariants($this->variantsGetRequestInterface);
}

/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method description is missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

}
}

/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method description is missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

-Changed entity_id type to string in order to pass product variant message correctly
use Psr\Log\LoggerInterface;

/**
* @inheritdoc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@inheritdoc should be used only on class members

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

jekabs and others added 3 commits November 5, 2020 13:06
-Fixed and added tests
-Other minor fixes and improvements like syntax, docBlock, constants, etc.
@bricht bricht changed the title Product variants Product variants OLD PR Nov 5, 2020
@mmansoor-magento mmansoor-magento merged commit 292ab85 into magento:develop Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants