# Upsell

Upsell a product in the cart drawer (and the cart page) using a custom metafield definition. You can set different combinations for different products.

![](/files/J5WAnmVaXSRpmWn8q49D)

### Setting up the new metafield definition

This feature uses metafields so our first step is to create a new metafield definiton. The most important part is to use this namespace and key: `theme.upsell`&#x20;

![](/files/aONTJtAo7iDOhxuYtAOS)

To start, navigate to your Shopify Admin -> Settings and choose Metafields from the left panel. Next, click on **Products** *(click images to zoom)*:

![Under 'Metafields', click on 'Products'](/files/QQ7594gmDNvDrqUzgiGV) ![Click on the 'Add definition' button](/files/g94YeW8MVwikt9CuUx5O)

Click the **Add definition** button to begin. Choose a name, we'll use '`upsell`'. Next, we will use a custom namespace. This is **required**.

A crucial step here is to change the **default namespace** (usually called '*my\_fields*') to **`theme`**

![](/files/R5wUiFYKKVyd92ZHKSUC)

Add a description *(this is optional)* then choose **Select content type**. Here, choose the **Product** type and **Save** your new definitions.

![](/files/dbkyiG87QnR3mBtRZkty)

### Product setup

Now that our custom metafield has been defined, the final step is to edit any of your products in the Shopify Admin -> Products and update the new `upsell` metafield.

All you need to do is scroll to the bottom of the product setup page and fill them in:

![](/files/pc5nWo8H4HnLaJVOtcJd)

Don't forget to **Save** your product and preview it on the cart drawer (or cart page).

![](/files/3Lk5DxX4yOU8pOgYEP8o)


---

# 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://palo-alto.presidiocreative.com/palo-alto-4.1/cart/upsell.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.
