Maybe i got it wrong, but imho getUrlInStore() should return the store URL with configured base URL.

I want to link from admin product edit page to frontend product page ...


Test product:

  • URL key (default): test-product
  • URL key (EN storeview): test-product-en

This works as long as both storeviews use same base url (e.g. example.com)

If i use another domain (en.example.com) the URL is wrong.


  • http://en.example.com/test-product-en.html


  • http://example.com/test-product-en.html -> 404 page

Is this a bug and how to get correct base url in an "elegant way"?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.