For Business

Troubleshoot templates for Shopify

Validate and troubleshoot the Buy with Prime app for your store and your variations

Validate Buy with Prime for your store

  1. After completing the onboarding steps within the app, under Managing your account, select Troubleshoot your experience.
    After completing the onboarding steps within the Buy with Prime for Shopify app, under Managing your account, select Troubleshoot your experience.
  2. To match your products across Shopify and Amazon, enter your Amazon SKU (viewable on Amazon Seller Central) for each product in your catalog one by one, or in bulk using a pre-formatted CSV file. When you activate Buy with Prime on a product, it’s live on your Shopify site immediately, if the Conditions to offer Buy with Prime are met. If the Buy with Prime button isn’t showing on your site, choose Buy with Prime button not showing on your site? Troubleshoot here.
    To match your products across Shopify and Amazon, enter your Amazon SKU (viewable on Amazon Seller Central) for each product in your catalog one by one, or in bulk using a pre-formatted CSV file. When you activate Buy with Prime on a product, it's live on your Shopify site immediately, if the Conditions to offer Buy with Prime are met. If the Buy with Prime button isn't showing on your site, go to Buy with Prime button not showing on your site? Troubleshoot here.
  3. On the Troubleshooting your Buy with Prime experience page, choose Select products.
     On the Troubleshooting your Buy with Prime experience page, choose Select products.
  4. Choose your products from the list and click Select. A list of validations are performed.
  5. Identify the validations with an exclamation mark and work on the resolutions.

Troubleshoot issues with the delivery promise container code

There are two ways to install the delivery promise container code:

  • Use the Themes method to add the delivery promise container code:
    1. In your Shopify admin, choose Online store, and then Themes.
    2. Choose the more actions (…) drop-down menu on your theme, and then Edit Code.
    3. In the code editor, search for the following files and folders in your product detail page. Search for these files one by one to find the correct location to install your button.
      1. In the Snippets folder:
        • product-form.liquid
        • product-info.liquid
        • buy-buttons.liquid
      2. In the sections folder:
        • product-template.liquid
        • product-details.liquid
        • main-product.liquid
      3. In the templates folder:
        • product.liquid
    4. Place your cursor anywhere in the code file, and then search for the words “payment” or “cart” in any of the preceding files. The most common location is under {{form| payment_button}}.
    5. Paste the delivery promise container script code under a </div> or </button> tag, whichever is the last tag that contains the payment or add to cart button.

      <div class = "delivery-promise__promise-container"></div>

    6. Choose Save.
  • Customize the Template method to add the delivery promise container code:
    1. In your Shopify admin, navigate to Online store, Themes, and then choose Customize.
    2. In the Shopify designer, choose the Home Page button at the top of the page, select Products, and then choose the Default Products template. If your product isn’t in the Default Products option, select the correct template.
    3. On the side menu, locate the Template section. Hover over the Buy buttons block, and then select the (+) option to add a new block.
    4. For block type, select Custom Liquid or HTML.
    5. Paste the following code block into the Custom Liquid editor, and then choose Save:

      <div class = "delivery-promise__promise-container"></div>

    6. On the side menu, drag the new Custom Liquid block, and then place it below Buy buttons.

Validate variations

In customized implementations, you might have different product templates for each variant. You can validate and troubleshoot variants using the following steps if Buy with Prime shows up for a subset but not all of the variants.

  1. Open your Shopify admin.
    Note: These steps may vary if you’re using a customized theme.
  2. On the side menu, under Sales Channels, choose Online store.
  3. Choose the more actions (…) drop-down menu on your theme, and then Edit Code.
  4. In the code editor, choose Assets, and open the product-info.js file.
  5. Locate the updateURL function, and then add the following script:
    updateURL() {
        if (!this.currentVariant || this.dataset.updateUrl === 'false') return;
        window.history.replaceState({}, '', `${this.dataset.url}?variant=${this.currentVariant.id}`);
    }
  6. Save your changes.
Looking for something else?