How to check checkout cart page stock status in magento 2

 In Magento blog

In this blog, we are going to talk about how to check checkout cart page stock status in magento 2.

why? magento 2 default functionality not show stock status checkout cart page so described how to show status checkout cart page in below code.

  1. Create Folder: app/code/Vendor/Module
    – Here Vendor is module namespace and Module is module’s name.
  2. Create module.xml file in app/code/Vendor/Module/etc folder with the following code.
  3. Create registration.php file in app/code/Vendor/Module folder to register the module with the following code.
  4. Create di.xml file in app/code/Vendor/Module/etc folder block override with the following code.

  5. Create Renderer.php file in app/code/Vendor/Module/Plugin/Checkout/Block/Cart/Item  folder the following code.

  6.  Create default.phtml file in app/design/frontend/Themename/Magento_checkout/templates/cart/item/ design template file in following code.
    We hope our technical blog which looking is very helpful for you. If you have any queries, feel free to leave a comment below.
Showing 2 comments
  • Komal
    Reply

    Hi

  • Komal
    Reply

    I am facing error default.phtml file not Invalid method Magento\ConfigurableProduct\Block\Cart\Item\Renderer\Configurable::isProductAvailable

Leave a Comment


0