# Theme edits

## Do I need Discount Ninja's theme edits?

In short: yes.

If you do not have access to someone with technical skills, please request our support team to set it up for you.

The theme edits will allow you to see the correct price of all products that are discounted through Discount Ninja throughout your store. It also enables all the widgets that can be configured in the app that will help you to communicate the offers to your customers.

## Extension mechanisms

Discount Ninja offers two extension mechanisms to display widgets and show strikethrough pricing:

* **Theme extensions**: add widgets using App blocks
* **Custom code edits**: edit the code of the theme to indicate placeholders for widgets and/or mark where prices are displayed.

{% hint style="info" %}
Use App blocks when possible. Custom code edits are only required for scenarios that are not currently supported by Shopify on Online Store 2.0. Specifically, Discount Ninja's custom code edit support helps to overcome the lack of support for App blocks in the templates for collections and (drawer) carts. These templates do not allow for the use of App blocks in repeating sections (collection products or cart items).
{% endhint %}

## Theme extensions

The app uses theme extensions to extend the functionality of the online store. Specifically:

* **App embeds** are used to add scripts.
* **App blocks** are used to include widgets on the storefront.

Alternatively, users can choose to add custom code to add widgets.

## App blocks v Code edits&#x20;

The following table explains the advantages of each approach:

<table><thead><tr><th width="415"></th><th>App blocks</th><th>Code edits</th></tr></thead><tbody><tr><td>Available on stores that do not have an Online Store 2.0 theme? </td><td>No</td><td>Yes</td></tr><tr><td>Requires manually cleaning up code in the theme after uninstalling the app?</td><td>No</td><td><mark style="color:red;">Yes</mark></td></tr><tr><td>Maximum flexibility to position each widget?</td><td><mark style="color:red;">No</mark></td><td>Yes</td></tr><tr><td>Optimal performance?</td><td>Yes</td><td>Yes</td></tr><tr><td>Available for each widget?</td><td><mark style="color:red;">No</mark></td><td>Yes</td></tr></tbody></table>

Read more about the available App blocks [here](/discount-ninja-developer-hub/theme-edits/app-blocks.md).

Read more about how to edit theme code [here](/discount-ninja-developer-hub/theme-edits/code-edits.md).


---

# 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://developers.discountninja.io/discount-ninja-developer-hub/theme-edits.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.
