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

[Story] Support for Configurable Product variants in Storefront App #357

Closed
magento-engcom-team opened this issue Sep 29, 2020 · 3 comments · Fixed by #413
Closed

[Story] Support for Configurable Product variants in Storefront App #357

magento-engcom-team opened this issue Sep 29, 2020 · 3 comments · Fixed by #413

Comments

@magento-engcom-team
Copy link

magento-engcom-team commented Sep 29, 2020

Acceptance Criteria

  • New schema should be sufficient to complete "Add Product To Cart" request
  • configurable variants must be exposed to SF API

What To Demo

  • New product variants successfully passed to SF and can be fetched via gRPC call

Scenarios

  • merchant creates configurable product
  • product variations propagated to storefront
  • variations can be fetched from SF application using new API

Notes

Subtasks:

  1. [326.1] Variants update in proto scheme #327 Variants update in proto scheme
  2. [357.2] Configurable variants saving to cache  #330 Configurable variants saving to cache
  3. [357.3] Import data to SF Application  #331 Sync exported data with SF Application
  4. [357.4] GetProductVariants service #332 GetProductVariants service
  5. [357.6] DeleteProductVariants service #335 DeleteProductVariants service
@magento-engcom-team
Copy link
Author

The issue was exported from the internal JIRA. The link to the original JIRA issue: https://jira.corp.magento.com/browse/SFAPP-50

@m2-assistant
Copy link

m2-assistant bot commented Sep 29, 2020

Hi @magento-engcom-team. Thank you for your report.
To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


@RuslanKostiv1 RuslanKostiv1 changed the title Support for Product variants in Storefront App [Story] Support for Product variants in Storefront App Oct 5, 2020
@nrkapoor nrkapoor added this to the EAP milestone Oct 20, 2020
@bricht
Copy link
Contributor

bricht commented Nov 13, 2020

Current process:
Currently the product variant indexer recieves parent product id as input.
The indexer retrieves the variants of that product, currently saved in the feed table. (list1)
The indexer retrieved the new variants of that product from the providers. These providers generate a full list of variants currently available for this product. (list2)

The indexer compares these two lists. Variants which are in list1, but not in list2 are outdated, and are to be deleted from the catalog storefront. (outdated variants)

The indexer marks outdated variants in feed table.

The indexer sends out:

  1. List of outdated variant ids to be deleted from catalog storefront storage.
  2. List of variant ids to be imported in catalog storefront storage.

Issues with current approach:

  1. We need to manually compare the two arrays in order to determine the deleted variant ids.
  2. We reindex all the product variants every time a new variant is created / deleted.
  3. The indexer is currently launched mostly by plugins which is not particularly efficient. Mview doesnt work on catalog_product_relation, because https://stackoverflow.com/questions/26328570/on-delete-cascade-not-firing-trigger.

Some ideas for improvement:

  1. Ideally the indexer should be triggered by more granular info on what was changed/deleted/added, not just parent id.

  2. Might try to make the indexer more flexible and also work with child product ids. Or other information (for customized options). Also obviously need to modify the plugins then and integration with mview.

  3. Add a better mechanism for marking deleted variants. Perhaps a query which marks deleted variants at the beginning of the process. Then markedDeleted variants are sent out to catalog storefront. After that, the markDeleted variants are deleted from the feedTable.

@RuslanKostiv1 RuslanKostiv1 linked a pull request Nov 13, 2020 that will close this issue
7 tasks
@RuslanKostiv1 RuslanKostiv1 changed the title [Story] Support for Product variants in Storefront App [Story] Support for Configurable Product variants in Storefront App Nov 17, 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 a pull request may close this issue.

6 participants