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

Configurable variants saving to cache OLD #5

Closed
wants to merge 13 commits into from
Closed

Configurable variants saving to cache OLD #5

wants to merge 13 commits into from

Conversation

bricht
Copy link

@bricht bricht commented Nov 5, 2020

-Module and changes to existing infrastructure to support product variants
-Added configurable product variants
-Added tests for product variants

Description (*)

Related Pull Requests

Fixed Issues (if relevant)

Questions or comments

Code Review 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)
  • no backward incompatible changes

jekabs added 2 commits November 5, 2020 16:14
-Module and changes to existing infrastructure to support product variants
-Added configurable product variants
-Added tests for product variants
Minor syntax fixes
jekabs added 6 commits November 5, 2020 17:26
-Changed entity type to string
-Test fixes
-Minor fixes
-Moved test from variants to configurable variants and other minor adjustments
@bricht
Copy link
Author

bricht commented Nov 9, 2020

@magento run all tests
without extensions magento/saas-export, magento/data-solutions-services-id, magento/magento-services-connector

* @param string[] $ids
* @return \Magento\CatalogExportApi\Api\Data\ProductVariant[]
*/
public function get(array $ids): array;
Copy link
Contributor

Choose a reason for hiding this comment

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

where this API is used?

Copy link
Author

Choose a reason for hiding this comment

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

\Magento\CatalogMessageBroker\Model\FetchProductVariants::execute

The getByProductIds is currently not really used, however I think we will likely need it in future so I added it.

Comment on lines 24 to 27
public function resolve(string ...$params): string
{
array_unshift($params, ConfigurableOptionValueUid::OPTION_TYPE);
return implode('/', $params);
Copy link
Contributor

Choose a reason for hiding this comment

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

propose to change a little bit this approach to make is more safe, because in this case we do not know nothing about order of incoming parameters

// \Magento\ConfigurableProductDataExporter\Model\Provider\Product\ProductVariants::getVariants
$id = $idResolver->resolve(\...(['parentId' => $row['parentId'], 'childId' => $row['childId']));
....

in this case we can control data:

$params = [
   'parentId' => $row['parentId'],
   'childId' => $row['childId']
];

Copy link
Author

Choose a reason for hiding this comment

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

Done

use Magento\DataExporter\Exception\UnableRetrieveData;
use Magento\Framework\App\ResourceConnection;
use Psr\Log\LoggerInterface;

/**
* Configurable product variant data provider
* TODO: Deprecated. Remove this class and its query class.
Copy link
Contributor

Choose a reason for hiding this comment

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

please add id of the issue here

Copy link
Author

Choose a reason for hiding this comment

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

Done

-Comment fix
-Made product variant id provider params more defined
RuslanKostiv1 added a commit to RuslanKostiv1/commerce-data-export that referenced this pull request Nov 10, 2020
…ta-provider

MC-29580: Complex product data provider
RuslanKostiv1 pushed a commit to RuslanKostiv1/commerce-data-export that referenced this pull request Nov 10, 2020
SF API test for categories and product dynamic attributes
@RuslanKostiv1 RuslanKostiv1 mentioned this pull request Nov 10, 2020
7 tasks
jekabs added 4 commits November 11, 2020 21:46
-Removed indexation reliance on product index
-Changed mview to product_relations
-Fixed indexing issues
@bricht bricht changed the title Configurable variants saving to cache Configurable variants saving to cache OLD Nov 12, 2020
@RuslanKostiv1 RuslanKostiv1 mentioned this pull request Nov 12, 2020
7 tasks
@bricht bricht closed this Nov 26, 2020
skovalenk pushed a commit to skovalenk/commerce-data-export that referenced this pull request Dec 1, 2020
…ommerce-data-export-3

[Imported] Category Breadcrumb sort order
magento-devops-reposync-svc pushed a commit that referenced this pull request Nov 4, 2021
MDEE-46: Prepare queries to get stock item status data from Magento
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants