In Drupal, commerce order contains multiple products. These products are attached to the line item to the orders. The line item table holds the information about the quantities and other information. The below is the simplest code to get the quantity of the order with different products.
In Drupal, commerce orders are associated with the Billing and Shipping information. We can access both Billing and Shipping information from the order object. The below sample code shows how to access the profile information.