I have some product ids . Currently I can display products in category using {{block . But now I am developing a custom block in
app/design/frontend/Alothemes/bencher6/Magento_Theme/templates/myphp/myphpcode.phtml
then in myphpcode.phtml i write the following query
$productId = 672;
$_product = Mage::getModel('catalog/product')->load(672);
But I got Uncaught Error: Class 'Mage' not found magento .
So how can I list selected product block on a page .
When i try the following code
$product=$this->getLoadProduct(672);
echo $product->getName();
Uncaught Error: Call to a member function getName() on null
I am calling this in cms page using following code
{{block class="Magento\Framework\View\Element\Template" template="Magento_Theme::myphp/myphpcode.phtml"}}