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

get parent url if is available. #58

Closed
wants to merge 1 commit into from

Conversation

Bashev
Copy link

@Bashev Bashev commented Mar 15, 2024

Description (*)

When we have configurable products with simples which are not visible individually we must get parent product url to push proper link to all children. This is correctly defined in ProductRepository

$childProduct->setParentProductUrl($product->getProductUrl());

but on the next line we make all products visible...
$childProduct->setVisibility($product->getVisibility());

then validation in
$url = (!$product->isVisibleInSiteVisibility() && $parentUrl) ? $parentUrl : $product->getProductUrl();
never will be true and "non visible" product will be returned in all cases.

Fixed Issues (if relevant)

  1. Possible fixes: Meta Product Link is mapped to Admin URL by default, not front-end URL. #48

Checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@zlik zlik self-requested a review December 5, 2024 00:31
Copy link
Contributor

@zlik zlik left a comment

Choose a reason for hiding this comment

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

Looks good, thank you, @Bashev!

@zlik
Copy link
Contributor

zlik commented Dec 5, 2024

The PR will be merged in private repo (that's the only way for us to merge) and released in upcoming 1.3.6. Thank you for your contribution, @Bashev!

@zlik zlik closed this Dec 5, 2024
@zlik
Copy link
Contributor

zlik commented Dec 9, 2024

Actually, this has been already addressed in fcb8961, no need to merge.

magento-devops-reposync-svc pushed a commit that referenced this pull request Dec 11, 2024
PR #58 authored by @Jmencab: Handling Response.backUrl Undefined in AddToCart #95
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.

Meta Product Link is mapped to Admin URL by default, not front-end URL.
2 participants