# Price movers

Want to showcase products that have recently dropped in price? The **Price Movers** feature lets you do exactly that—by displaying products with the biggest recent discounts, either as a widget or shortcode block.

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

### How It Works

Content Egg tracks historical price data for each product in your site’s database. This allows it to detect **price drops** and display the best deals based on configurable filters.

{% hint style="info" %}
**Note:** Price history builds up over time. You need several update cycles before the Price Movers feature has enough data to display meaningful results.
{% endhint %}

### Configuration

You can control the tracking period via:

**Settings → Content Egg → Price Alerts → Price Drop Period**

This sets the **maximum age (in days)** of price history used to compare old vs. new prices. A longer period increases the chance of detecting a discount.

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

### Price Movers Widget

The **Price Movers Widget** lets you display a sidebar or block section with the top discounted products during a given period.

<figure><img src="/files/g30LWhFc9Ov8PBJIjuvk" alt="" width="347"><figcaption></figcaption></figure>

**To use:**

1. Go to **Appearance → Widgets**
2. Add the **“Price Movers”** widget to your desired sidebar or block area.
3. Set options such as:
   * Number of products to show
   * Drop type: absolute or relative
   * Timeframe for last price update
   * Included/excluded modules

> After adjusting the "Price Drop Period", wait for the next scheduled price update. The changes will apply only after new price history is recorded.

### Price Movers on Pages (Shortcode)

You can also show discounted products directly on pages (e.g., homepage, category page, etc.) using a shortcode.

#### Basic Example:

```plaintext
[content-egg-price-movers template=wdgt_price_movers_list limit=3]
```

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

#### Full Example with Options:

```plaintext
[content-egg-price-movers template=wdgt_price_movers_grid limit=20 drop_type=absolute direction=drops last_update=7 include_module_ids=Amazon,Ebay2 exclude_module_ids=Walmart]
```

#### Available Shortcode Parameters

| Parameter            | Description                                                            |
| -------------------- | ---------------------------------------------------------------------- |
| `limit`              | Number of products to display (default: `5`)                           |
| `drop_type`          | Type of drop: `absolute` (raw value) or `relative` (percentage)        |
| `direction`          | `drops` (price decreases) or `increases` (price hikes)                 |
| `last_update`        | Max age (in days) of last update to consider (e.g., `7`)               |
| `include_module_ids` | Comma-separated list of module IDs to include (e.g., `Amazon,Walmart`) |
| `exclude_module_ids` | Comma-separated list of module IDs to exclude                          |
| `template`           | Layout: `price_movers_grid` or `price_movers_list`                     |

### Tips

* Ensure **price history is enabled** in module settings.
* Price Movers needs at least **two recorded prices per product** to calculate changes.

Here is a clearer, more professional, and user-friendly rewrite of your **Custom Price Movers Templates** documentation section:

***

### Custom Price Movers Templates

{% hint style="warning" %}
**Advanced Users Only:** This section is intended for developers or users comfortable editing PHP templates.
{% endhint %}

You can fully customize the output of the **Price Movers** widget by creating your own template.

#### Steps to Create a Custom Template

1. **Locate Default Templates**\
   Navigate to the following directory in your WordPress installation:

   ```
   /wp-content/plugins/content-egg/templates/
   ```

   Copy one of the following files:

   * `wdgt_price_movers_list.php` (List view)
   * `wdgt_price_movers_grid.php` (Grid view)
2. **Paste into the Custom Template Directory**\
   Create a new directory if it doesn’t already exist:

   ```
   /wp-content/content-egg-templates/
   ```

   Paste your copied file into this directory.
3. **Rename the File**\
   Rename the file while keeping the `wdgt_` prefix. For example:

   ```
   wdgt_price_movers_custom.php
   ```
4. **Edit the Template**\
   Open the file and make any changes needed to the layout, HTML structure, or styling.
5. **Include the Default CSS and a Div Container** (optional)\
   To include the default CSS, add the following code to your template:

```php
\ContentEgg\application\components\BlockTemplateManager::getInstance()->enqueueCeggStyle(true);
```

Next, add the following div container:

```html
<div class="cegg5-container">
<!-- Inside this container, you can use Bootstrap 5 classes -->
</div>
```

#### Using the Custom Template

Once created, your custom template will appear in the **Price Movers widget** template dropdown with a `[custom]` prefix.

<figure><img src="/files/0RdRdqmDFEIlMwuSGrwQ" alt="" width="375"><figcaption></figcaption></figure>

To use it with a **shortcode**, specify the template name (without the `.php` extension):

```php
[content-egg-price-movers template=custom/wdgt_price_movers_custom limit=10]
```

Make sure to use the `custom/` prefix, and ensure the filename matches exactly what you specify in the shortcode.


---

# 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://ce-docs.keywordrush.com/updating-products/price-movers.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.
