/** * Sets the attributes in the given service item. * * @param MShop_Order_Item_Base_Service_Interface $orderServiceItem Order service item that will be added to the basket * @param array $attributes Attribute key/value pairs entered by the customer during the checkout process * @param string $type Type of the configuration values (delivery or payment) */ protected function _setAttributes(MShop_Order_Item_Base_Service_Interface $orderServiceItem, array $attributes, $type) { $manager = MShop_Factory::createManager($this->_context, 'order/base/service/attribute'); foreach ($attributes as $key => $value) { $item = $manager->createItem(); $item->setCode($key); $item->setValue($value); $item->setType($type); $orderServiceItem->setAttributeItem($item); } }