# How to show a quantity selector on the wishlist page?

### Enable Quantity Selector

In **Swish → Settings → Code Editor → Custom CSS**, add:

```css
wishlist-page .wk-page .wk-form .wk-quantity {
  display: inline-flex;
}
```

<figure><img src="/files/2g3cYVXjMnnmE0pq07uj" alt=""><figcaption></figcaption></figure>

## Show quantity selector with horizontal counter

<figure><img src="/files/i5i0CiTz6psInxrcQ1qe" alt=""><figcaption></figcaption></figure>

### Update the Quantity Markup

In **Swish → Settings → Code Editor → Custom Product Card**, update the .wk-quantity block from:

```javascript
<div class="wk-quantity">
  <label class="wk-quantity-label">
    ${this.getTranslation("wishlist_product.quantity")}
  </label>
  <input
    class="wk-quantity-input"
    type="number"
    name="quantity"
    value="1"
    min="1"
  />
</div>
```

to:

```javascript
<div class="wk-quantity">
  <button type="button" class="wk-qty-btn wk-qty-minus">−</button>
  <input
    class="wk-quantity-input"
    type="number"
    name="quantity"
    value="1"
    min="1"
  />
  <button type="button" class="wk-qty-btn wk-qty-plus">+</button>
</div>
```

### Add Quantity Counter Logic

In **Swish → Settings → Code Editor → Custom Product Card**, add the following to your component’s JavaScript:

```javascript
updated() {
  const input = this.renderRoot.querySelector(".wk-quantity-input");
  const minus = this.renderRoot.querySelector(".wk-qty-minus");
  const plus = this.renderRoot.querySelector(".wk-qty-plus");

  if (input && minus && plus) {
    minus.addEventListener("click", () => {
      let value = parseInt(input.value) || 1;
      if (value > 1) input.value = value - 1;
    });

    plus.addEventListener("click", () => {
      let value = parseInt(input.value) || 1;
      input.value = value + 1;
    });
  }
}
```

### Style the Counter Buttons

In **Swish → Settings → Code Editor → Custom CSS** (example CSS)

```css
wishlist-page .wk-page .wk-form .wk-quantity {
  display: inline-flex;
  margin: 0;
  width: 50%;
  height: 45px;
  flex-wrap: nowrap;
  flex-direction: row;
  border: 1px solid #00000063;
}

.wk-qty-btn {
  height: 100%;
  width: 100%;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.swish.app/how-to-show-a-quantity-selector-on-the-wishlist-page.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
