14

I have created brand page to display details with associated product list.

I want to show that product list in grid same as admin.

Can it be possible to show grid in frontend same like backend ?

1

I assume, you know about MVVC & CURD in magento 2. You can achieve this by Helper & View, In view(phtml) you can write below code, to display you product.

//view 
$productHelper = $this->helper('<ext>\<module>\Helper\Product');
$productlist = $productHelper->getProductData();
foreach ($productlist as $product) {
$product_name = $product['name'];
//your grid listing code
}

In helper file you can write below code

//Helper Code 
Public function getProductData(){
            $products = $this->_objectManager->create(
               'Magento\Catalog\Model\Product'
           )->load();
           //Your collection code
}
| improve this answer | |
0

Yes , but you change its backend-css files for store view page.First you look where is your store view css and you change the classes of it like as admin panel classes and you also changes backend-php files.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.