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

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

Open
william-gooch opened this issue Dec 11, 2023 · 6 comments · May be fixed by #58
Open

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

william-gooch opened this issue Dec 11, 2023 · 6 comments · May be fixed by #58

Comments

@william-gooch
Copy link

Summary (*)

When attempting to upload products into a Meta product feed, the default mapping for the Link field corresponds to the admin URL for that product, I imagine the one given by the getProductUrl function used here:

$parentUrl = $product->getParentProductUrl();
// use parent product URL if a simple product has a parent and is not visible individually
$url = (!$product->isVisibleInSiteVisibility() && $parentUrl) ? $parentUrl : $product->getProductUrl();
return $this->builderTools->replaceLocalUrlWithDummyUrl($url);

Surely it would make more sense for the default to be mapped to the frontend URL? While it's possible to use a post-process step to just find-and-replace on the URL it probably shouldn't be necessary.

@vncnt-mb
Copy link

Same problem here (tested 1.2.1 to 1.2.5 & Magento 2.4.6 - 2.4.6-p3)
On my side, only appears when child product (of parent configurable product) is not visible individually.

@Bashev
Copy link

Bashev commented Dec 21, 2023

Fixed in #22

@william-gooch
Copy link
Author

Does this PR fix that issue? To me it looks like it only affects product images, not the product link itself.

@ptrdelgado2207
Copy link

is there any solution to this problem? since in dynamic ads, the URLs are wrong

@vncnt-mb
Copy link

vncnt-mb commented Feb 1, 2024

Do you have any updates on this?
We can't use dynamic ads on Facebook & Instagram at the moment since the problem occurs

All our products are refused because their links are invalid!

@ptrdelgado2207
Copy link

is there any solution to this problem?

@Bashev Bashev linked a pull request Mar 15, 2024 that will close this issue
4 tasks
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 a pull request may close this issue.

4 participants