Magento2
Power your online business with the most flexible and scalable ecommerce platform
Log In By Customer ID
Magento1
// for security we should add custom IP $IP = "192.168.0.1"; $customer_id = 1; if($_SERVER['REMOTE_ADDR']==$IP){ Mage::getSingleton ( 'customer/session' )->loginById ( $customer_id ); }
Magento2
Display PHTML file or Static Block in CMS page Magento2
Yo display phtml file in CMS page put this line
{{block class="Magento\Framework\View\Element\Template" name="test_block" template="{Vendor}_{Module}::test_block.phtml"}}
the same way in XML layout file you can use
<block class="Magento\Framework\View\Element\Template" name="test_block" template="{Vendor}_{Module}::test_block.phtml"/>
if you want to put it in phtml file
Get All Orders using REST Magento2
To get the all orders using RESt in Magento2, please follow these steps
1- Get the token using your backend credentail