Skip to content

Use parent URL key in configurable variant URL fallback#485

Merged
juaniten merged 3 commits into
masterfrom
juaniten/support/5082/fix-variant-url-fallback-slug
Jun 15, 2026
Merged

Use parent URL key in configurable variant URL fallback#485
juaniten merged 3 commits into
masterfrom
juaniten/support/5082/fix-variant-url-fallback-slug

Conversation

@juaniten

@juaniten juaniten commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Fixes doofinder/support#5082

Summary

  • When a configurable variant (visibility=1) has no canonical URL rewrite for its parent, the fallback route was built with the parent's ID but the variant's url_key as the slug, producing a mismatched URL
  • Fix injects Magento\Catalog\Model\ResourceModel\Product and uses getAttributeRawValue() to read the parent's url_key directly, so the fallback slug is always consistent with the parent product

@juaniten juaniten self-assigned this Jun 15, 2026
@juaniten juaniten marked this pull request as ready for review June 15, 2026 15:52
@juaniten juaniten changed the title fix: use parent url_key in configurable variant URL fallback Use parent URL key in configurable variant URL fallback Jun 15, 2026

@davidmolinacano davidmolinacano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! 👏

@juaniten juaniten merged commit cf414f2 into master Jun 15, 2026
1 check passed
@juaniten juaniten deleted the juaniten/support/5082/fix-variant-url-fallback-slug branch June 15, 2026 16:01
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.

3 participants