-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Current behavior
When going from catalog to product page, reviews are not shown on product page unless the item is a simple product.
After refresh on product page, reviews are shown.
Expected behavior
Reviews should show up either way
Steps to reproduce the issue
My 2 cents
AFAIK this happens because in core\modules\catalog\store\product\actions.ts list(), if the product is a configurable product it gets merged with a simple product variant.
.
Thus losing the id of the configurable product, which is what reviews are linked to.
Product.vue loads using the provided id (variant) and tries to pass originalProduct.id to reviews, although originalProduct has been lost due to the previous merge and it's now just the same as the variant product.

Can you handle fixing this bug by yourself?
- YES
- YES BUT BADLY
- NO
A quick fix would be to save a reference to the configurable product id before merging with the variant

Then pass this if it exists to the review component.

This doesn't feel very clean though. If it was for me I would never merge products in list() in the first place, it feels very hacky. I have tried to go through the code in actions but man... really, really hard to understand what happens there...
Which Release Cycle state this refers to? Info for developer.
Pick one option.
- This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from
developbranch and create Pull Request2. Feature / Improvementback todevelop. - This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from
releasebranch and create Pull Request3. Stabilisation fixback torelease. - This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from
hotfixormasterbranch and create Pull Request4. Hotfixback tohotfix.
Environment details
- Browser: Chrome Version 77.0.3865.90 (Official Build) (64-bit)
- OS: Windows 10 Pro 1809
- Node: v10.16.3
- Code Version: VSF 1.10.3 / VSF-API 1.10.0
