Translation missing: en.products.product.discounted_price_html

1 Like

I started getting the same error message on our site as well. We haven’t made any changes to the code, so it seems to be a bug in Shopify.

2 Likes

im getting a very similar issue of today! any luck fixing it?

Same here, in a very close time frame. Maybe they updated something that broke the theme functionality.

1 Like

I spoken to Support jus, they could find nothing on the issue and just recommended me here

Facing the same issue, nothing has changed on my end, so I am confident it has something to do with Shopify.

Facing same issue

Same error here, Just hide the discount badge from the product card setting. but could not find a solution to this problem.

I am also facing same issue still shopify had not solved this issue ?

hi

did you get this resolved? I’m also facing the same issue…if yes, plz refer me to the source.

thanks

您解决了吗

How to Fix the “Translation Missing” Error for Discounted Price in Products

The “translation missing: en.products.product.discounted_price_html” error can occur when your theme fails to find the appropriate translation for a specific variable, such as the discounted price. This issue can happen with any theme, and the solution may vary. Below, I’ll outline a general approach that can be applied to any theme, as well as a specific solution for those using the Minimog theme.

General Solution for Any Theme:

  1. Check Translations in the Language Editor:

    • Step 1: In your Shopify admin, go to Online Store > Themes.
    • Step 2: Click Actions on your active theme and select Edit languages.
    • Step 3: Use the search bar to look for terms like “discounted_price,” “price,” or “discount.”
    • Step 4: Ensure that the fields related to these terms are filled in. If they are blank, add the necessary translations or text. This may immediately resolve the error without needing to modify code.
  2. Edit the Translation File (.json):

    • Step 1: If the issue persists, you may need to manually edit the theme’s translation files. Go to Online Store > Themes > Actions > Edit code.
    • Step 2: Find the Locales folder and open the language file, such as en.json.
    • Step 3: Check if the key products.product.discounted_price_html or a similar one exists. If not, add the following:
{
  "products": {
    "product": {
      "discounted_price_html": "Discounted Price: {{ discounted_price }}"
    }
  }
}
  • Step 4: Save the file to ensure that the translation is applied correctly.

  • Review the Liquid Code:

    • Step 1: Go back to the code editor at Online Store > Themes > Actions > Edit code.
    • Step 2: Open the file that handles product display, such as product.liquid or product-template.liquid.
    • Step 3: Verify that the discounted_price variable is being called correctly and is wrapped in translation tags (t):
{{ 'products.product.discounted_price_html' | t: price: product.price, discounted_price: product.discounted_price }}
  • Step 4: Adjust the code as necessary to ensure that translations are being applied.

  • Theme Update or Customization:

    • Step 1: Check if your theme is up-to-date. Theme updates often fix known issues.
    • Step 2: If necessary, contact the theme developer’s support team or hire a Shopify expert to customize the solution.

Specific Solution for the Minimog Theme:

If you are using the Minimog theme and encountering the “translation missing” error, follow these additional steps:

  1. Identifying and Fixing Discounted Price Code:

    • This error occurs because the translation key for discounted_price_html might be missing or incorrect. In the Minimog theme, you can fix this by editing the language files.
    • Navigate to Online Store > Themes > Actions > Edit code.
    • Go to the Locales folder and open the en.default.json file.
    • Add the following line if it is missing:
{
  "products": {
    "product": {
      "discounted_price_html": "Discounted Price: {{ discounted_price }}"
    }
  }
}
  • This should resolve the missing translation issue specific to the Minimog theme.

  • Customizing the Liquid Code in Minimog:

    • In Minimog, you can also check the product-price.liquid file or similar, where the discounted price is formatted and displayed.
    • Ensure that the {{ discounted_price_html }}​ formatting is correctly wrapped in the translation tag (t) and that the translation is properly referenced.

For more details specific to the Minimog theme, you can refer to their official troubleshooting guide on translation issues.

This combination of solutions should help both Minimog theme users and those with other Shopify themes to efficiently fix the “translation missing” error.