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. Can I do this on Yves category/edit?id-category=2 ?

U024HCR39J7
U024HCR39J7 Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

Hello.
Can I do this on Yves category/edit?id-category=2 ?

Comments

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    No, editing a category is an action which should be done in Zed and the specific action you ask for is therefore only implemented in the Zed backend (see \Spryker\Zed\Category\Communication\Controller\EditController)

  • U024HCR39J7
    U024HCR39J7 Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    Ok, Thanks

  • U024HCR39J7
    U024HCR39J7 Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    How I can get url category in Zed ?

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    What do you mean by

    How I can get url category in Zed

    ?

  • U024HCR39J7
    U024HCR39J7 Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    I need get url by IdCategory

  • U024HCR39J7
    U024HCR39J7 Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    categoryFacade->read(33) example return null in url key

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    SELECT * FROM spy_url WHERE fk_resource_categorynode = 33;

    Will show you in the database if there is an url set for your category.
    Because url’s are linked against category nodes it might be the case that your category id is not equal to your category node id.

    If this query does not return anything, I assume that during the import/creation of this category no URL was generated/imported, so this would be my next step to check

  • U024HCR39J7
    U024HCR39J7 Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    Wich facade is this?

  • U024HCR39J7
    U024HCR39J7 Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    Or I need use queryContainer?

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    You need to go directly into the database (see https://www.jetbrains.com/help/phpstorm/connecting-to-a-database.html on how to connect using PHPStorm) to execute the query above.

  • U024HCR39J7
    U024HCR39J7 Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    I find this data in Db πŸ˜ƒ How I need right get them from there πŸ˜ƒ

  • U024HCR39J7
    U024HCR39J7 Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    src/Spryker/Zed/Url/Business/UrlFacadeInterface.php - in here all methods what I need is deprecated

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    In \Spryker\Zed\Category\Business\Model\CategoryReader::findCategoryById it executes post reader plugins, which will add data from other modules (like URL) to the category transfer object.
    But as far as I can tell there is no such plugin which will expand the category node with the according url.

    So you can write such a plugin which implements CategoryTransferExpanderPluginInterface or you use the deprecated methods of UrlFacade. I would suggest the first solution as it seems to be future prove.