hyva-themes / magento2-hyva-admin

This module aims to make creating grids and forms in the Magento 2 adminhtml area joyful and fast.
https://hyva-themes.github.io/magento2-hyva-admin/
BSD 3-Clause "New" or "Revised" License
167 stars 39 forks source link

How can I create a product grid in the storefront using the Hyva_Admin module? #74

Open adil-dolphin opened 10 months ago

adil-dolphin commented 10 months ago

Currently, I'm facing a new challenge: I need to construct a product grid in the storefront using the same module. While its effectiveness in the admin area is clear, I'm uncertain about its extension to frontend development. I've reviewed the documentation and explored the module's features, but I'm missing a straightforward guide or example that addresses this particular objective.

Question: Could someone provide guidance or an example on how to utilize the hyva-themes/module-magento2-admin module to create a product grid in the storefront? I'm aiming to maintain the same level of efficiency and joy that this module has brought to adminhtml development. Any code snippets, instructions, or pointers would be greatly appreciated.

fredden commented 10 months ago

This looks like a duplicate of #1.

Vinai commented 10 months ago

Like @fredden said, frontend grids are very experimental and probably require working around some unexpected results.

That said, the steps should be similar, that is, add the grid layout handle to the page, create a block class extending the frontend grid class, and add the grid xml file...

Please report how it works out if you go through with this.

adil-dolphin commented 10 months ago

Thanks to @Vinai and @fredden for the support and suggestions! Successfully integrated this on the frontend. 🙏

image

Vinai commented 10 months ago

Congratulations, that's very cool! Is there any way this library could be improved to make the grids easier? I'm thinking of a way to match the alpine version or tailwind to the frontend theme version for example....