How to Add Company Column in Abandoned Carts Report in Magento 2

October 9, 2020
By Cozmot

Magento 2 offers an abandoned carts report that lists all registered customers who have abandoned carts which is yet to be expired. The abandoned carts report grid lists the below details:

  • Customer Name
  • Email Address
  • Number of products in the cart
  • Cart Subtotal
  • Applied Coupon
  • Date created
  • Date of the last update
  • IP address
These details can help the store owner track the reason for the cart abandonment and strive for customer retention. Cart abandonment can cost the business all the efforts, time, and money put to bring the valuable traffic to the site. In March 2020, 88.05% of online shopping orders were abandoned – Statista To reduce this number, the store owners employ various tactics using the customer data that is collected by configuring customer accounts in Magento 2 store. It may happen, depending on the nature of the business, that some useful customer data is not included in the abandoned carts report in Magento 2 default grid. For example, the customer’s company name that is collected during registration can be helpful to decide their purchase power and including it in the abandoned carts report can make the task easier. To add company column in abandoned carts report in Magento 2 can be easy with the method given in this post. However, do not forget to first enable company name in customer account in Magento 2 from the admin panel. The default Abandoned carts report in Magento 2 looks something like this: Default Magento 2 Abandoned carts report

Stepwise method to add company column in abandoned carts report in Magento 2:

  1. Create registration.php file at app\code\Vendor\Module directory
  2. Create module.xml file at app\code\Vendor\Module\etc directory
  3. Create di.xml file at app\code\Vendor\Module\etc\adminhtml directory
  4. Create Grid.php at app\code\Vendor\Module\Block\Adminhtml\Shopcart\Abandoned directory
  5. Create Company.php at app\code\Vendor\Module\Block\Adminhtml\Grid\Column\Renderer and add below code
That’s it. Now, if you’ll check, the abandoned carts report in Magento 2 will have the company column added: add company column in abandoned carts report in Magento 2 Any doubts about the solution can be mentioned in the Comments section below. I’d be happy to help you out. Also, do share the solution with the Magento community via social media. Thanks.]]>

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!