Magento 2 redirect customer Registration to checkout page

  • Magento 2 redirect customer Registration to checkout page

    Magento 2 redirect customer Registration to checkout page

    If you want to redirect your customer in checkout page after customer registration success. Then you need to follow below steps to complete this process. 1). Create di.xml file at app/code/Magento/Tutorials/etc/ folder <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”>     <type name=”Magento\Checkout\Model\Session”>         <plugin name=”redirect_to_checkout” type=”Magento\Tutorials\Plugin\CheckoutRedirect” />     </type> </config> 2). Create […]

  • How to get Product by ID and SKU in Magento 2

  • How to get Product by ID and SKU in Magento 2

    We will be using Magento 2’s Service Layer for this task. Use of Service Layer is highly encouraged by Magento 2. Below is a block class of my custom module (Mtutorials_HelloWorld). I have injected object of \Magento\Catalog\Model\ProductRepository class in the constructor of my module’s block class. app/code/Mtutorials/HelloWorld/Block/HelloWorld.php Now, we load the product by id and […]

  • How to get Product Stock/Quantity Magento 2

  • Get all Categories of any/current Product Magento 2

  • Get all Categories of any/current Product Magento 2

    This blog shows how we can get list of all categories from current product or any particular product as well. Both mode (Dependency Injection & Object Manager way) are shown below: Using Dependency Injection (DI) Below is a block class of my custom module (Mtutorials_HelloWorld). I have injected object of \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory, \Magento\Catalog\Model\ProductRepository and \Magento\Framework\Registry classes […]

  • How to Create Quote & Order Programmatically in Magento 2

  • 1 2