skip to Main Content

How to fetch db table values using mysql query in magento 2. Magento 2 use sql query?

I'm new in Magento. CustomModuleDatabaseControllerPageIndex.php <?php namespace CustomModuleDatabaseControllerPage; class Index extends MagentoFrameworkAppActionAction { protected $_pageFactory; public function __construct( MagentoFrameworkAppActionContext $context, MagentoFrameworkViewResultPageFactory $pageFactory) { $this->_pageFactory = $pageFactory; return parent::__construct($context); } public function execute() { return $this->_pageFactory->create(); } } CustomModuleDatabaseBlockIndex.php <?php namespace…

VIEW QUESTION

Magento 2: Call frontend template inside phtml

This code below is used to call the template from /app/code/ module. $gridHtml = $block->getLayout()->createBlock( 'MagentoFrameworkViewElementTemplate', 'custom_grid_new' )->setTemplate('Magento_CustomGrid::product/view/templates/grid.phtml') ->toHtml(); How to set the template from following path /app/design/frontend/Magento/luma/Custom_Grid/templates/grid1.phtml tried this above in above code, but is not working.

VIEW QUESTION
Back To Top
Search