Adapter/ShopwareAdapter/ResponseParser/OrderItem/OrderItemResponseParser.php
private function getItemType($mode)
    {
        switch ($mode) {
            case self::ITEM_TYPE_ID_VOUCHER:
                return OrderItem::TYPE_VOUCHER;
            case self::ITEM_TYPE_ID_DISCOUNT:
                return OrderItem::TYPE_DISCOUNT;
            case self::ITEM_TYPE_ID_SURCHARGE:
                if (json_decode($this->configService->get('surcharge_as_product'), false)) {
                    return OrderItem::TYPE_PRODUCT;
                }

                return OrderItem::TYPE_PAYMENT_SURCHARGE;
            default:
                return OrderItem::TYPE_PRODUCT;
        }
    }
private function getItemType($mode)
    {
        switch ($mode) {
            case self::ITEM_TYPE_ID_VOUCHER:
                return OrderItem::TYPE_VOUCHER;
            case self::ITEM_TYPE_ID_DISCOUNT:
                return OrderItem::TYPE_DISCOUNT;
            case self::ITEM_TYPE_ID_SURCHARGE:
                if (json_decode($this->configService->get('surcharge_as_product'), false)) {
                    return OrderItem::TYPE_PRODUCT;
                }

                return OrderItem::TYPE_PAYMENT_SURCHARGE;
            default:
                return OrderItem::TYPE_PRODUCT;
        }
    }
private function getItemType ( $ mode ) { switch ( $ mode ) { case self :: ITEM_TYPE_ID_VOUCHER : return OrderItem :: TYPE_VOUCHER ; case self :: ITEM_TYPE_ID_DISCOUNT : return OrderItem :: TYPE_DISCOUNT ; case self :: ITEM_TYPE_ID_SURCHARGE : if ( json_decode ( $ this -> configService -> get ( 'surcharge_as_product' ) , false ) ) { return OrderItem :: TYPE_PRODUCT ; } return OrderItem :: TYPE_PAYMENT_SURCHARGE ; default : return OrderItem :: TYPE_PRODUCT ; } }
@param int $mode

@return int
@param int $mode