Test the Price of Multiple Products With a Theme Test

triangle-exclamation
triangle-exclamation

Test prices on multiple products with a theme test

If you want to test the prices of multiple products, you can leverage a theme test to route traffic between two different themes that point to different catalogues of products, each with their own set of prices.

chevron-rightStep 1: Identify the products you want to test, and create duplicate products in Shopifyhashtag
  1. Within Shopify, click Products and navigate to each product you want to price test.

  2. Click on the Duplicate button at the top right corner.

  3. In the duplication dialog:

    • Ensure you have all of the boxes checked to duplicate media, SKUs, inventory quantities, and translations.

    • Ensure you do not retain the autogenerated “(Copy)” text in the product title.

    • Ensure you are setting the duplicated product as a draft until you are ready to publish your test.

chevron-rightStep 2: Adjust the price and inventory settings of the duplicated productshashtag
  1. Navigate to your newly duplicated products and open the product details.

  2. Scroll to the Pricing section and set the new price.

  3. Under Inventory, decide how you want to track inventory. If you want both products to share inventory, consider using an app like Connected Inventoryarrow-up-right or Duplicate SKU Sync Masterarrow-up-right.

  4. Click Save to apply your changes.

chevron-rightStep 3: Set product tags on your original and duplicate set of productshashtag

Next, you will need to set tags on your original and duplicate products so that you can exclude them from your A theme or B theme.

  1. Navigate to each product and open the product details.

  2. Tag all of your original products with a unique tag, like price-test-a.

  3. Tag all of your duplicated products with a different unique tag, like price-test-b.

chevron-rightStep 4: Create a duplicate of each collection on your store, and swap out the original products for the duplicated versionshashtag

Now you'll need to create copies of each collection on your store for your B theme to use, which will contain your duplicated products only.

  1. Within Shopify, click Products and then click Collections.

  2. Click Create collection in the top right corner to create a new collection for each existing collection on your store.

  3. For each collection you create, name your collection and ensure the Collection type is set to Manual.

  4. In the Products section, Browse and select your duplicate set of products to add them to the collection.

  5. If any products contained in the original collection are not being included in the price test, you can continue to include those in the duplicate collection.

  6. Save your collection.

  7. You can give your duplicate collection the same name as your original collection, but make note of the URL assigned to the duplicate, as it will not be the same as your original collection. To do this, scroll down to Search engine listing and click the pencil icon to edit the URL handle.

chevron-rightStep 5: Exclude your original and test products from other collections on your storehashtag

Now that you have your original and variant collections (and their corresponding original and variant products and prices), you'll need to verify that these products are only included in the correct collections on your store.

  1. Click into each product that will be included in your test (both original and duplicate products).

  2. In the Product organization section, check the collections that each product is associated with and remove them as necessary.

  3. For automated collections, ensure your original and duplicate products do not meet the collection conditions by leveraging product tags. Using the tags you created above, modify your automated collections’ conditions to exclude products with the price-test-a or price-test-b tags.

chevron-rightStep 6: Exclude your duplicate products and collections from third-party sales channels hashtag
  1. From the Products view in Shopify, select each duplicate product using the checkboxes in the list of products.

  2. When you've selected all of your duplicate products, select Actions (the button with the three horizontal dots) at the top right of the products list.

  3. Select Include in sales channels in the dropdown menu. Deselect all sales channels except for Online Store.

  4. Then do the same for your duplicate collections. From the Collections view in Shopify, select your duplicate collections using the checkbox in the list of collections.

  5. Select Actions (the button with the three horizontal dots) at the top right of the collections list, and select Include in sales channels in the dropdown menu. Deselect all sales channels except for Online Store.

chevron-rightStep 7: Create a copy of your main themehashtag
  1. In Shopify, click Online Store from the left sidebar navigation (under Sales Channels).

  2. Click the Actions button (next to Customize) for your main theme, and click Duplicate from the dropdown menu.

  3. Give your duplicated theme a name that corresponds to the test, like Price Test Theme B.

chevron-rightStep 8: Modify your A and B theme code to exclude tagged products from Search templateshashtag

Important: It is strongly recommended that you consult a developer prior to making changes to your theme code. If you do not have access to a developer, then ensure you back up your theme by creating a duplicate.

  1. Next you'll need to add some code to ensure your original and duplicate products are completely hidden from all search templates on each theme.

  2. Go to Online Store and click Themes.

  3. Under Templates, locate and click on search.liquid or search.json (depending on your theme).

    • If you have a liquid template, you can add the below code directly in that template.

    • If you have a JSON template, you'll need to find the main collection section in your Sections directory. This will be referenced in your search.json template and will be called something like main-search.liquid.

    • Look for the code that loops through search results. This typically looks like:

  4. Now modify the search loop by adding a condition to exclude products with the price-test-a or price-test-b tags:

  1. Click the Save button at the top right of the editor to apply your changes.

  2. Do the same for both themes.

chevron-rightStep 9: Prevent your duplicate products from being indexed by search engineshashtag
  1. Using the price-test-b tag you created in the previous step, you'll now need to ensure that search engines will avoid indexing any product with this tag by adding some theme code.

  2. Navigate to Online Store and click Themes. Find your active theme and click Edit code.

  3. In the Code Editor, find your theme.liquid file and add the following code within the <head> section:

  4. Hit Save to apply your changes.

chevron-rightStep 10: Prevent direct access to your original and duplicate collections via navigation menus on the appropriate themeshashtag
  1. Go to Online Store and click Navigation.

  2. Check all your menus to ensure there are no links to the duplicate collection.

  3. If there are, remove any links that point to the duplicate collection.

  4. Then, create a second version of your navigation menu that only links to your duplicate collections, and does not link to your original collections (you will use this on your B theme).

  5. Customize your B theme, and change out the main navigation for your newly created navigation menu.

chevron-rightStep 11 (optional): Hide the duplicate products from third-party search appshashtag

If you leverage third-party search apps, ensure that they are set to exclude products with the tag hidden from search results.

chevron-rightStep 12 (optional): Add the duplicate products to custom shipping profileshashtag

If you use custom shipping profiles for your original products, you'll need to add your duplicate products to the shipping profiles you've set up for your originals.

  1. From within Shopify, click Settings and then Shipping and delivery.

  2. Find your relevant shipping profiles in the list, and click Manage rates. Then click Manage products.

  3. You can easily search for products with the hidden tag. Select these products, and then click Done.

  4. Click Save to save your selections.

chevron-rightStep 13 (optional): Add the duplicate products to discount codeshashtag

If you have discounts configured for your original products, you'll need to make sure your duplicate products are included in the discount.

  1. From within Shopify, click Discounts.

  2. Locate your active discounts, and modify the products they apply to to include your duplicate products.

chevron-rightStep 12: Set up URL redirects on your B theme to redirect any visitors from original products to the duplicate productshashtag

Important: It is strongly recommended that you consult a developer prior to making changes to your theme code. If you do not have access to a developer, then ensure you back up your theme by creating a duplicate.

Despite the actions taken above, there may still be a chance that visitors allocated to your B theme end up on product pages (and prices) for the A side of your test. To handle this, we'll need to add redirect code to your B theme to handle each product being tested.

  1. Go to Online Store and click Themes.

  2. Locate your B theme and click Edit code.

  3. Under Layout, locate and click on theme.liquid.

  4. Now add redirect code for each original price product page to send to the variant price product page in the <head> of your theme.

  1. Click the Save button at the top right of the editor to apply your changes.

chevron-rightStep 13: Set up a theme test in Shoplift between your A theme and B themehashtag
  1. Within Shoplift, create a new test by clicking Create a test.

  2. Select Test a theme or a global element when drafting your test.

  3. A drawer will open, wherein you can specify the original theme for your test. Select your main (published) theme.

  4. When selecting your variant theme, choose your B theme (the one titled accordingly for the price test).

  5. (Optional) Specify your visitor, device, and audience configurations for your test. arrow-up-right

Last updated

Was this helpful?