controller/frontend/src/Controller/Frontend/Basket/Base.php
protected function getOrderProductAttributes( $type, array $ids, array $values = [], array $quantities = [] )
	{
		$list = [];

		if( !empty( $ids ) )
		{
			$manager = \Aimeos\MShop::create( $this->getContext(), 'order/base/product/attribute' );

			foreach( $this->getAttributes( $ids ) as $id => $attrItem )
			{
				$list[] = $manager->createItem()->copyFrom( $attrItem )->setType( $type )
					->setValue( isset( $values[$id] ) ? $values[$id] : $attrItem->getCode() )
					->setQuantity( isset( $quantities[$id] ) ? $quantities[$id] : 1 );
			}
		}

		return $list;
	}
protected function getOrderProductAttributes( $type, array $ids, array $values = [], array $quantities = [] )
	{
		$list = [];

		if( !empty( $ids ) )
		{
			$manager = \Aimeos\MShop::create( $this->getContext(), 'order/base/product/attribute' );

			foreach( $this->getAttributes( $ids ) as $id => $attrItem )
			{
				$list[] = $manager->createItem()->copyFrom( $attrItem )->setType( $type )
					->setValue( isset( $values[$id] ) ? $values[$id] : $attrItem->getCode() )
					->setQuantity( isset( $quantities[$id] ) ? $quantities[$id] : 1 );
			}
		}

		return $list;
	}
protected function getOrderProductAttributes ( $ type , array $ ids , array $ values = [ ] , array $ quantities = [ ] ) { $ list = [ ] ; if ( ! empty ( $ ids ) ) { $ manager = \ Aimeos \ MShop :: create ( $ this -> getContext ( ) , 'order/base/product/attribute' ) ; foreach ( $ this -> getAttributes ( $ ids ) as $ id => $ attrItem ) { $ list [ ] = $ manager -> createItem ( ) -> copyFrom ( $ attrItem ) -> setType ( $ type ) -> setValue ( isset ( $ values [ $ id ] ) ? $ values [ $ id ] : $ attrItem -> getCode ( ) ) -> setQuantity ( isset ( $ quantities [ $ id ] ) ? $ quantities [ $ id ] : 1 ) ; } } return $ list ; }
Returns the order product attribute items for the given IDs and values

@param string $type Attribute type code
@param array $ids List of attributes IDs of the given type
@param array $values Associative list of attribute IDs as keys and their codes as values
@param array $quantities Associative list of attribute IDs as keys and their quantities as values
@return array List of items implementing \Aimeos\MShop\Order\Item\Product\Attribute\Iface
Returns the order product attribute items for the given IDs and values