# Troubleshooting Guide

{% hint style="info" %}
All documentation on price testing can be found on [this page](https://docs.shoplift.ai/test/price-testing). To give us feedback on our documentation, please use [this form](https://form.typeform.com/to/M8H02KI2).
{% endhint %}

### Quick diagnostic steps

Before diving into specific issues, run these quick checks to rule out common problems. These simple steps often reveal the root cause without extensive troubleshooting.

#### 1. Open browser console

Access your browser's developer tools to check for errors:

* Press F12 or right-click → Inspect → Console
* Look for red error messages indicating JavaScript problems
* Check for Shoplift script loading confirmation
* Note any 404 or network errors preventing updates

#### 2. Test in incognito mode

Opening an incognito window provides a clean testing environment:

* Rules out cache and cookie issues
* Simulates new visitor experience
* Eliminates stored preferences interference

#### 3. Verify test status

In your Shoplift dashboard, confirm:

* Test shows as "Active" (not draft or paused)
* Traffic allocation isn't 0% for either variant
* Test hasn't been accidentally paused by team members

### Price display issues

When prices aren't displaying correctly, the problem usually lies in theme implementation or script loading. Let's diagnose systematically.

#### Prices not changing at all

Common symptoms:

* All visitors see original prices only
* No variation between control and test groups
* Preview mode works but live site doesn't

#### Solution 1: Verify data attributes

The most common issue is incorrect attribute implementation. Check your code against these examples:

Correct Implementation:

```liquid
<span data-sl-attribute-p="{{ product.id }}">
  {{ product.price | money }}
</span>
```

Common Mistakes:

```liquid
<!-- Missing curly braces -->
<span data-sl-attribute-p="product.id">

<!-- Using variant ID instead of product ID -->
<span data-sl-attribute-p="{{ variant.id }}">

<!-- Missing quotes around attribute -->
<span data-sl-attribute-p={{ product.id }}>
```

#### Solution 2: Check script loading

Verify Shoplift is properly initialized:

1. In browser console, type: `window.shoplift`
2. Press Enter
3. Should return an object (not `undefined`)
4. If undefined, check theme.liquid for script tag

#### Solution 3: Validate element structure

Ensure proper implementation by checking:

* Attributes are on the price-containing element directly
* No JavaScript replaces HTML after page load
* CSS isn't hiding elements with attributes

#### Solution 4: Clear all caches

Sometimes aggressive caching causes issues:

* Clear browser cache and cookies
* Purge Shopify theme cache via admin
* Clear CDN cache (Cloudflare, etc.)
* Disable performance optimization apps temporarily

#### Inconsistent price display

When some prices work while others don't, you're dealing with incomplete implementation across your theme.Common Symptoms:

* Some products show test prices, others don't
* Same product shows different prices in different locations
* Prices flash between values during load

#### Audit all price locations

Themes display prices in numerous locations. Check these commonly missed areas:

* **Quick view modals** - Often loaded via AJAX
* **Instant search results** - Dropdown search previews
* **Recently viewed sections** - Dynamic product displays
* **Product recommendations** - Automated suggestions
* **Mobile-specific templates** - Separate mobile code
* **Dynamically loaded content** - Any AJAX-loaded prices

#### Check for duplicate displays

Run this diagnostic to find all tagged prices:

```liquid
// Find all price attributes
const prices = document.querySelectorAll('[data-sl-attribute-p]');
console.log(`Found ${prices.length} tagged prices`);
prices.forEach(p => {
  console.log(p.textContent, p.getAttribute('data-sl-attribute-p'));
});
```

This reveals missed displays or incorrect duplicates.

#### Review theme updates

If prices suddenly stopped working:

1. Check if theme was recently updated
2. Compare current templates with backup
3. Re-add missing attributes to new sections

#### Prices wrong on specific devices

Device-specific issues usually stem from responsive design using different markup for different screens.

#### Check responsive templates

Look for:

* Files with "mobile" in the name
* Device-specific sections
* CSS media queries hiding/showing elements

#### Verify mobile-specific code

When different markup exists for devices, tag both:

```liquid
<!-- Both need attributes -->
<div class="desktop-only" data-sl-attribute-p="{{ product.id }}">
  {{ product.price | money }}
</div>
<div class="mobile-only" data-sl-attribute-p="{{ product.id }}">
  {{ product.price | money }}
</div>
```

### Cart and checkout Issues

Cart pricing is critical—this is where customers make final decisions. Any discrepancies here can cause abandonment or support issues.

#### Cart shows original prices

Common Symptoms:

* Product pages show test prices correctly
* Cart reverts to original prices
* Checkout totals don't match expectations

#### Verify cart transform function

For Shopify Plus stores using Cart Transforms:

* Confirm you're on Shopify Plus (required)
* Check Cart Transform is enabled in admin
* Look for conflicting cart modification apps

#### Check cart template implementation

Remember these cart-specific rules:

* Cart totals should NOT have data attributes
* Only individual product prices need marking
* Standard Shopify cart structure works best

#### Test cart isolation

To identify conflicts:

1. Temporarily disable cart-related apps
2. Check if prices display correctly
3. Look for custom JavaScript modifying cart
4. Verify AJAX updates reflect test prices

#### Checkout price mismatches

When cart and checkout differ, you're experiencing transform conflicts.

#### Validate cart transform execution

Test progressively:

1. Single product (basic functionality)
2. Multiple test products (calculations)
3. Mixed test/non-test products (partial scenarios)

#### Check for app conflicts

Common conflicting app types:

* Subscription apps - Maintain own pricing logic
* Wholesale/B2B apps - Override standard prices
* Custom checkout scripts - Modify prices
* Multi-currency apps - Perform own calculations

### Test configuration problems

Configuration issues prevent tests from being created or saved properly.

#### Can't select products

When products don't appear in the selection drawer:

#### Check product status

Products must meet these criteria:

* Status: "Active" (not draft/archived)
* Published to online store channel
* Not hidden from sales channels

#### Resolve data issues

Common selection problems:

* Recently added products need sync time
* Special characters in titles affect search
* Try searching by SKU instead
* Verify account permissions

#### Test won't save

Save failures typically indicate validation errors.

#### Validate requirements

Ensure:

* At least one price changed per product
* Test has a name
* Traffic allocation totals 100%
* No products in other active tests

#### Check browser issues

Try these solutions:

* Save from different browser
* Disable browser extensions
* Check network connectivity
* Clear browser cache

### Third-party app conflicts

Many apps can interfere with price testing by displaying their own calculated values.

#### Currency converters

These apps pull from Shopify's API, showing the highest price regardless of test variant. Solutions:

* Hide converter during tests
* Update displays via converter API if available
* Use CSS to manage visibility
* Contact app developer for integration

#### Volume pricing apps

Bulk discount apps override test prices with tier calculations. Workarounds:

* Temporarily disable for test products
* Adjust rules to respect test prices
* Limit testing to single quantities
* Document expected behavior for support

#### Review and loyalty apps

These display prices in widgets that don't update with tests. Considerations:

* They show highest price from API
* Won't affect actual purchases
* May confuse customers
* Consider hiding or adding disclaimers

### Performance issues

#### Slow page loads

If your site feels slower after launching a test, the issue likely isn't the test itself. Data attributes have zero performance impact—they're standard HTML that browsers handle efficiently.

#### Check implementation

Look for:

* JavaScript errors blocking other scripts
* Infinite loops in price update logic
* Console errors indicating problems

#### Review other changes

Performance issues often coincide with:

* Recently installed/updated apps
* Theme modifications
* Server infrastructure issues
* CDN or caching problems

### Emergency procedures

Knowing when and how to pause a test prevents customer frustration and lost sales.

#### When to pause a test

Pause immediately if:

* Checkout is broken, preventing purchases
* Customers see wrong prices at payment
* Calculations are incorrect (taxes, totals)
* Major display issues affect most users

#### How to pause

1. Navigate to active test in Shoplift
2. Click "Pause Test" button
3. Confirm the action
4. Prices revert to defaults immediately

#### Post-pause actions

After pausing:

1. Document thoroughly - Screenshots and examples
2. Test in preview - See if issue persists
3. Fix root cause - Don't just retry
4. Re-launch carefully - Monitor first hour closely

### Getting additional help

If issues persist after this guide, gather comprehensive information for efficient support.

#### Information to gather

* Screenshots showing the issue clearly
* Browser console errors (full text)
* Test ID from Shoplift dashboard
* Theme name and version
* Complete list of installed apps

#### When contacting support

Provide:

* Clear problem description and start time
* Steps to reproduce from fresh browser
* Everything tried from this guide
* Customer and business impact

#### Temporary workarounds

While awaiting resolution:

* Reduce test traffic percentage
* Exclude problematic products
* Disable conflicting apps if possible
* Add customer notices about variations

{% hint style="info" %}
If you need help conducting tests with Shoplift, our [support team](https://docs.shoplift.ai/test/price-testing/broken-reference) is always available  to assist. Reach out from within the app using the live chat widget in the bottom right of the screen, or email [help@shoplift.ai ](mailto:help@shoplift.ai)to get in touch.
{% endhint %}
