---
title: "BasketViewConfig"
slug: "api/basket/types/basketviewconfig"
sidebar:
  order: 338
---

<a id="ref-c419f1a56c71"></a>
<a id="ref-c93474937ff8"></a>
<a id="ref-9dbfea107bcb"></a>

## Synopsis

```text
struct BasketViewConfig (
    string name,
    string[] visibleColumns,
    ColumnWidth[] columnWidths,
    BasketViewSortConfig sortConfig,
    DescrType[] articleDescrMode
    string viewId,
    boolean removable,
    boolean editable,
    ViewDisplayMode displayMode,
    boolean expandGroups,
    boolean expandPlanningFolders,
    boolean expandBasketFolders,
    boolean expandPartialPlannings,
    boolean expandAggregates,
    boolean? textItemsVisible,
    boolean nonOfferArticlesVisible,
    boolean? nonOrderArticlesVisible,
    MergeMode mergeMode,
    boolean autoColumnWidth,
    boolean hiddenDiscounts,
    SetArticleMode setArticleMode
)
```

See also: [`ColumnWidth`](/pCon/configuratorOnline/specs/api/basket/types/basketviewconfig#ref-6610639a9516), [`BasketViewSortConfig`](/pCon/configuratorOnline/specs/api/basket/types/basketviewsortconfig#ref-32681b15eb33), [`DescrType`](/pCon/configuratorOnline/specs/api/basket/types/descrtype#ref-6ea92a0017a1), [`ViewDisplayMode`](/pCon/configuratorOnline/specs/api/basket/types/viewdisplaymode#ref-6841b34a33e3), [`MergeMode`](/pCon/configuratorOnline/specs/api/basket/types/mergemode#ref-190f0820313d), [`SetArticleMode`](/pCon/configuratorOnline/specs/api/basket/types/setarticlemode#ref-fac3e2b995e7)

<a id="ref-6610639a9516"></a>
<a id="ref-d2faa84522f4"></a>

```text
struct ColumnWidth {
    ColumnId columnId;
    int width;
}
```

See also: [ColumnId](/pCon/configuratorOnline/specs/api/basket/types/columnid#ref-1dd19b6c646a)

The parameter `viewIds` must be a possibly empty list of valid view IDs. If empty, the set of all current basket views is used instead. Return value is a list of instances of type `BasketViewConfig`, one for each specified view ID.

All fields of type `BasketViewConfig` except `viewId` are optional because the type is also used by operation [`changeBasketViewConfig`](/pCon/configuratorOnline/specs/api/basket/operations/changebasketviewconfig) to change a subset of basket view configuration options.

The following fields are defined:

**viewId**

The view ID. This field is most useful if parameter `viewIds` is empty, but in general clients should not assume that view configurations are returned in the same order as specified by parameter `viewIds`.

**removable**

A Boolean value that indicates whether or not the view can be removed. The current implementation allows all views except the standard view to be removed.

**editable**

A Boolean value that indicates whether or not the configuration of this view can be changed. The current implementation allows the configuration of all views except the standard view to be changed.

**displayMode**

The display mode used by this view.

**expandGroups**

<a id="ref-bc9670292af9"></a>A Boolean value that controls expansion of planning groups. This option exists for compatibility with P-BK and has, at least for now, no meaning for EAIWS.

**expandPlanningFolders**

A Boolean value that controls expansion of planning folders. This option exists for compatibility with P-BK and has, at least for now, no meaning for EAIWS.

**expandBasketFolders**

A Boolean value that controls expansion of basket folders in display mode `Sorted`. If a view expands basket folders then all basket folder are replaced by their content (the basket folders themselves become invisible).

Basket folders are expanded if and only if the display mode is `Sorted` and the value of this option is `true`.

**expandPartialPlannings**

A Boolean value that controls expansion or partial plannings (basket main article items with item type `PartialPlanning`). Expanded partial plannings are replaced by their content. The partial plannings themselves become invisible.<a id="ref-a911b8f171ac"></a>

Basket main article items with item type `PartialPlanning` are expanded if and only if the display mode is `Sorted`, the merge mode is *not* `Compact`, and the value of this option is `true`.<a id="ref-97b340b85855"></a>

Basket sub-article items with item type `PartialPlanning` are expanded if and only if the display mode is `Sorted` and the merge mode is *not* `Compact`.

**expandAggregates**

A Boolean value that controls expansion of aggregates (basket main article items with item type `Aggregate`). Children of expanded aggregates become children of the aggregates parent[^1]. The aggregate itself remains visible.

Basket main article items with item type `Aggregate` are expanded if and only if the display mode is `Sorted`, the merge mode is *not* `Compact`, and the value of this option is `true`.

Basket sub-article items with item type `Aggregate` are expanded if and only if the display mode is `Sorted` and the merge mode is *not* `Compact`.

**nonOrderArticlesVisible**

The field is used to query and set the corresponding flag of basket views. Its default value when used as template argument of operation [`addBasketView`](/pCon/configuratorOnline/specs/api/basket/operations/addbasketview) is true.

**mergeMode**

The merge mode to be used in case of display mode `Sorted`. The merge mode reported for views with display mode `Planning` is always `None`, even if another merge mode has been explicitly configured with operation [`changeBasketViewConfig`](/pCon/configuratorOnline/specs/api/basket/operations/changebasketviewconfig).

**textItemsVisible**

This attribute is used by views with display mode Sorted to control whether or not text items are visible. It can be set for views with display mode Planning, even though its value is ignored by these views.

Switching display modes does not affect the value of this flag.

The default value of this flag is false.

**autoColumnWidth**

A Boolean option that exists for compatibility with P-BK and controls whether or not P-BK automatically adjust the width of columns to match their content or uses fixed column widths.

**hiddenDiscounts**

A Boolean option that exists for compatibility with P-BK and controls whether or not discounts (and extra charges) should be hidden in this view[^2].

**setArticleMode**

The set-article mode controls whether or not parts of set-articles should be visible within the view. See description of type [`SetArticleMode`](/pCon/configuratorOnline/specs/api/basket/types/setarticlemode) for details.

**name**

The name of the view.

**visibleColumns**

A list of IDs of columns that should be visible in this view.

**columnWidths**

A possibly empty list of explicitly configured column widths. See option `autoColumnWidth` for more information.

Note that the values returned for the various expand modes may be `true` even if the corresponding item types are not expanded due to the selected display and merge modes.

[^1]: i.e. they become siblings of the aggregate

[^2]: If so, single and total sales prices, if displayed, will have to be faked.
