-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
Api2: Fixes getProductUrl #4511
base: main
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
Mhhh, cant reproduce atm ... my json-response has the correct frontend-url. |
Use multiple stores with then this line:
does load the product without store id set |
The fix is valid, but i still have no admin-url in response - its always a frontend-url.
-> returns default store url (not admin) After this fix i get the correct frontend-url. |
What exactly is your REST url? that's why i get |
@sreichel you can try to debug it too, but for me, when getUrlModel is called, the StoreId of the Product is still null, magento-lts/app/code/core/Mage/Catalog/Model/Product.php Lines 368 to 374 in 488c021
|
Checked and everything is fine. Please debug |
like is said before, it doesn't matter. While the So when this line later happens, it will create a new Product object with the store parameter set to null, and then it will fall back to the current store (which is admin for the api)
|
You got me wrong. Your fix works - but for me the behavoir was different before the fix. I had no admin url, |
@sreichel makes me wonder what does this Also for later, we might need to think about deprecating the getProductUrl from the Product Helper because it only causes problems in multi store if using product_id? The only other place that uses Mage_Catalog_Helper_Product::getProductUrl is |
Description (*)
This fixes REST API2 Product
url
to use thestore
parameter.Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)