Magento2 CMS Block – Get Product Details Using Product ID or SKU

cms-blockmagento2productsku

How to get product details in CMS Block using product Id or SKU in Magento 2.

Best Answer

You can create a custom Widget and let widget field have an option called product Id, get the product Id into your template and display the details in the with widget .phtml.

You can add that widget into your cms static block.

We have a possibility to load product by creating custom module and pass the variables like this {{block class="Vendor\Module\Block\Customproductload" product_id="1" template="Vendor_Module::customproductload.phtml"}}

Related Topic