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

Open
wants to merge 1 commit into
base: main
Choose a base branch
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)

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.
1 participant