$this->translationComponent =
Shopware()->
Container()->
get(Shopware_Components_Translation::
class);
} /**
* @throws Exception
*/
protected function setOrder(Shopware_Models_Document_Order
$order) { $this->_order =
$order;
$repository =
Shopware()->
Models()->
getRepository(Shop::
class);
// "language" actually refers to a language-shop and not to a locale
$shop =
$repository->
getById($this->_order->order->language
);
if ($shop === null
) { throw new ModelNotFoundException(Shop::
class,
$this->_order->order->language
);
} if (!
empty($this->_order->order->currencyID
)) { $repository =
Shopware()->
Models()->
getRepository(Currency::
class);
$currency =
$repository->
find($this->_order->order->currencyID
);
if ($currency === null
) { throw new ModelNotFoundException(Currency::
class,
$this->_order->order->currencyID
);
}