Magento custom module | Magento 2 routes and collections

Поділитися
Вставка
  • Опубліковано 15 вер 2024

КОМЕНТАРІ • 11

  • @CS-yh3jz
    @CS-yh3jz Рік тому +1

    Yes , this will be a good customisation on plp page for all products , we can show a message on each configurable product, that the product is available in these different colors.
    Loving your videos..
    Sir , this is a good topic to understand catalog module further .please make video on this also........

    • @anothermagentodev9161
      @anothermagentodev9161  Рік тому

      If you are using swatches on your site I’m sure you could do a bit of digging to get the swatches working. If that’s what you mean

    • @CS-yh3jz
      @CS-yh3jz Рік тому +1

      @@anothermagentodev9161 yaa I am using swatches text and swatch color for showing colors on my plp for different colors, and what I have digged that ---> two modules module_catalog ---> list.phtml file used for listing product for a particular category and swatches module to show swatch option on frontend under the product details product-item-details for a particular product on plp page.
      Now what I wanna understand is --> how on plp page , can I get the count of different colors , product is available.
      If u can make video or help me out to get this show , this will clear much of the concepts of begineers.

    • @anothermagentodev9161
      @anothermagentodev9161  Рік тому

      Ahh yeah this is a good question I’ve tackled this before. It’s quite a process heavy thing to do is getting options of products on plp so might make a good video.
      Ill try and get something together soon!

    • @CS-yh3jz
      @CS-yh3jz Рік тому

      @@anothermagentodev9161 no option need to show , what I wanna practice is to show a text message for each configurable product for example--> product is available is 4 colors. So need to take count of color swatch color available for the configurable product.

  • @figevida
    @figevida Рік тому

    Hi Adam,
    Super video - i've a question: how do I pass product ids by making the Cotroller\Index executable talk to the Layer.php?
    Scenario:
    A module calls your module through the RequestInterface and with the "setParams" procedure passes parameters to the Controller\Index. At this point, I would like them to be passed in turn to the Layer.php but I can't.

  • @andersac88
    @andersac88 Рік тому

    First off, big fan of your videos.
    I do have a question, why are you generating the custom collection within the model? I am only asking because I have now officially seen custom collections generated in the Block, the Controller and the Model, and I don't know which approach is best.
    Again, great videos.

    • @anothermagentodev9161
      @anothermagentodev9161  Рік тому

      Hi Andrew, great question. Without watching this video to remind myself. It must have been necessary in this instance to do so. I think because magento uses the model to generate its product collections for category’s (from memory) I may be wrong. The answer is it depends on the area you are using the collection in. My most used way would be a Block to insert some data into a part of a page.A Controller would be if you needed to render it to a new page or route or even for an Ajax call for the data. And then a model for a situation like in this video

  • @ashish_1
    @ashish_1 Рік тому +1

    Thanks for the video , This now clear more concept of routes and how the custom page can be prepared.
    Can u explain ,how can we show in plp page below price , for configurable products ----> The product available in different color ( need to show this no. Of color).
    Basically what I want to get is the no. Of colors , the configurable product in different colors is available .