What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello, How can I find product URL? I have product entity and I'd like to return the URL. Is there an

U01MJ8M8Y0G
U01MJ8M8Y0G Posts: 11 πŸ§‘πŸ»β€πŸš€ - Cadet

Hello,
How can I find product URL?
I have product entity and I'd like to return the URL.
Is there any helper to do that or should I find it in the DB (where?)?

Comments

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    Check spy_url.

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    Product urls are having a value in column fk_resource_product_abstract.

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    You can also check UrlFacade->findUrl().

  • U01MJ8M8Y0G
    U01MJ8M8Y0G Posts: 11 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thank you very much
    I found method \Spryker\Zed\Product\Business\ProductFacade::getProductUrl
    I also need yves app main url.
    Do you know which is the proper way to do that?

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    If you need the absolute base url, you can get it from the config. Something like

    Config::get(ApplicationConstants::BASE_URL_YVES);
    
  • U01MJ8M8Y0G
    U01MJ8M8Y0G Posts: 11 πŸ§‘πŸ»β€πŸš€ - Cadet

    that's what I need, thank you for your help πŸ™‚