I'm trying to get order purchase point (store where it was purchased), I have tried this:


It did not work, any ideas?

here is my code

 public function execute()
        $date = date('m-d-Y');
        $filepath = 'export/orders-'.$date.'.csv';
        $stream = $this->directory->openFile($filepath, 'w+');
        $header = ['Id', 'Status','Store'];
        $collection = $this->getOrderCollection();
        foreach ($collection as $order) {
            $data = [];
            $data[] = $order->getId();
            $data[] = $order->getStatus();
            $data[] = $order->getPurchasePoint();


    public function getOrderCollection() 
    $collection = $this->orderCollection->create()
    return $collection;

1 Answer 1


I have found the way.

This is the way to get the storeview name of the order and the name.

$store_name = $_order->getStore()->getGroup()->getName()  //store name
$store_view_name = $_order->getStore()->getName();

In this website you can find more methods


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.