# Theme Compatibility (WIP)

### Is my theme compatible with template tests?

**All Shopify themes are compatible with template tests**, but there are some things to know depending on the type of theme you have (OS1 or OS2), how much your theme allows you to customize in the Shopify Theme Editor, and any custom code you have on your theme that may interfere with testing.

{% hint style="info" %}
If you are experiencing an issue with theme compatibility or test variants, contact support via our chat widget or reach out to us at <help@shoplift.ai>.
{% endhint %}

### Legacy themes

In 2021, Shopify released Online Store 2.0 (OS2). Templates on OS2 themes are made up of sections, which enable drag-and-drop customization in the Shopify Theme Editor. This functionality was made possible by replacing **Liquid templates (legacy)** with **JSON templates (OS2)**.&#x20;

Because Liquid templates can have limited editing capabilities in the Shopify Theme Editor, we've developed a few methods for testing legacy themes.&#x20;

#### Liquid to JSON conversion

When you select a liquid template as your original template in Shoplift, we run a check to determine whether your template can be converted to the newer architecture.&#x20;

If it can be converted, all variant options (Duplicate, Select, and Create with Lift Assist™) will be available.&#x20;

If you then decide to duplicate the Liquid template for testing, its Liquid and HTML code will be copied into a section file in the new JSON template (variant). This upgraded JSON template will enable you to add additional sections from your theme, as well as drag, drop, and reorder them.

If your template cannot be converted, you can still run a test with your liquid original template by choosing the "Select" variant option. Depending on your theme, you might also be able to customize your variant in the Shopify Theme Editor.

### Custom code

Occasionally, themes will have custom code that prevents alternate template variants (JSON copies of the original template with a suffix in the filename) from inheriting the CSS styles from their original counterpart. This can prevent the variant template from being a pixel-perfect copy of the original.&#x20;

Examples of conditional code that prevent duplicate templates created for testing could be any of the following:

* conditional code such as `template == 'index'`
* CSS that references the `<div>` or `#id` of specific elements instead of the `class`
* any code that is limited to styling a specific template

If this occurs during test creation, we suggest you review your theme directory for any code that might prevent an alternate template of the same type from correctly inheriting the CSS styles of the original.

{% hint style="info" %}
We’re here to help if you encounter any issues when testing with Shoplift. If you would like us to speak with your theme developer to discuss theme compatibility, you can reach out to us at <help@shoplift.ai>.
{% endhint %}


---

# 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.shoplift.ai/test/best-practices/theme-compatibility.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.
