/** * Saves the services of the order to the storage. * * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket containing service items */ protected function storeServices(\Aimeos\MShop\Order\Item\Base\Iface $basket) { $manager = $this->getSubManager('service'); $attrManager = $manager->getSubManager('attribute'); foreach ($basket->getServices() as $type => $item) { $item->setBaseId($basket->getId()); $item->setType($type); $manager->saveItem($item); foreach ($item->getAttributes() as $attribute) { $attribute->setServiceId($item->getId()); $attrManager->saveItem($attribute); } } }