Extension Attributes in Magento 2 explained

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ก.พ. 2025

ความคิดเห็น • 18

  • @YVic95
    @YVic95 2 ปีที่แล้ว +2

    Max, thank you for your neat explanation on this topic, especially about how custom set methods generate. I spent a lot of time to find information about it in documentation and different books. But it didn’t help. When I watched your video and did everything step by step everything worked fine. It was such a relief! Thank you!

  • @sowndharyak1063
    @sowndharyak1063 3 ปีที่แล้ว +1

    Hi, Can you please explain what is the use of repository, factory and interfaces?. and why we are extending SearchResultsInterface and what is the use of SearchCriteriaBuilder , CollectionProcessorInterface?.

  • @mohdrizalrizwan
    @mohdrizalrizwan 2 ปีที่แล้ว

    Do you have any example on how to use interface as type of extension attributes?

  • @ernestosuarez9796
    @ernestosuarez9796 3 ปีที่แล้ว +1

    Extension attributes work fine in my local machine but when the code is in Staging environment seems they are not working anymore, It says my SET method (setIdentification() method not defined ) does not exist, what could be happening?

    • @MaxPronko
      @MaxPronko  3 ปีที่แล้ว

      Do you have generated folder generated? If you are using different modes e.g. developer and production then it could be the reason. Do you use git for deploying code to the staging?

  • @PremMali7736
    @PremMali7736 3 ปีที่แล้ว +3

    How to save these attributes? You showed how to get it.

    • @MaxPronko
      @MaxPronko  3 ปีที่แล้ว +5

      You can write an afterSave plugin for a repository class and save the data after the main entity has been saved.

    • @PremMali7736
      @PremMali7736 3 ปีที่แล้ว +1

      @@MaxPronko it's easy! Thanks

  • @andriyloz7558
    @andriyloz7558 3 ปีที่แล้ว +2

    дякую, за відео. Було цікаво.. але виникло одне питання, чи не краще було б в методі afterGetList спочатку в циклі витягнути всі shipmentId-шки а потім одним запитом витягнути дані з бази? бо якось воно, робити в кожній ітерації по запиту до бд, виглядає не дуже.. Хоча може це вже блошина оптимізація не зовсім релевантна для теми даного відео.. :)

    • @MaxPronko
      @MaxPronko  3 ปีที่แล้ว +3

      Залежить від цілі. Скільки реально в колекції буде вигружено shipment entities? Від 1 до 20 думаю. Якщо це так, як мінімум у моєму випадку, то простий в розумінні та підтримці кол важливіший, ніж оптимізований. Але мож на ж і оптимізувати. Приклад показаний для того, щоб зрозуміти extension attributes, оптимізація - це окрема тема.

  • @jasonkollias9416
    @jasonkollias9416 3 ปีที่แล้ว

    Hi Max,
    Can you do a video on how to modify the magentos page builder module that comes with magento enterprise? I am trying to change the image element to use picture and srcset tags. Much thanks for all the info you put out.

    • @MaxPronko
      @MaxPronko  3 ปีที่แล้ว +2

      It would be a 5 hours video :)

    • @jasonkollias9416
      @jasonkollias9416 3 ปีที่แล้ว

      I understand. Thanks.

    • @trueAcidBurn
      @trueAcidBurn 2 ปีที่แล้ว

      @@MaxPronko :)))))))

  • @ВФедоров-ъ5ц
    @ВФедоров-ъ5ц 3 ปีที่แล้ว +1

    Можно ли надеяться, увидеть такое же видео, но про создание своих атрибутов для товаров (product attribute input type). Например как на основе стандартного текстового атрибута, создать свой атрибут типа таблица.

    • @MaxPronko
      @MaxPronko  3 ปีที่แล้ว +2

      Я думаю можно

  • @sergeykonov4562
    @sergeykonov4562 2 ปีที่แล้ว

    Support comment for channel

    • @MaxPronko
      @MaxPronko  2 ปีที่แล้ว

      Thanks ☺️