Hi!
I randomly noticed that this little piece of code shows up at the bottom of my product images. Any idea how to fix? The code that appears is “, soldOut: “Sold out”, unavailable: “Unavailable” onclick=“pintrk(‘track’, ‘addtocart’);””
Hi!
I randomly noticed that this little piece of code shows up at the bottom of my product images. Any idea how to fix? The code that appears is “, soldOut: “Sold out”, unavailable: “Unavailable” onclick=“pintrk(‘track’, ‘addtocart’);””
Typically this is a result of deleting an app from your store that injected code into your product page. Have you recently removed any apps? The code snippet will likely live in either the “product.liquid” or “product-template. liquid” file which can be accessed by going to Online Store/Themes/Actions/Edit Code. If you can share the URL to your store, then I can take a look at the front-facing code to see how it can be removed.
Hello @dauthority ,
This is because there is broken html in your product page.
I suggest share your store URL so someone can check and confirm where it is.
Thanks
Looks like it’s a script added by an app. If you go to Online Store/Themes/Actions/Edit code, then open the “product.liquid” file, do you see a snippet/script code at the very bottom of the file? If yes, I would try deleting that line then saving the file as I suspect that should resolve the issue.
{% comment %}
The contents of the product.liquid template can be found in /sections/product-template.liquid
{% endcomment %}
{% section 'product-template' %}
,
soldOut: {{ 'products.product.sold_out' | t | json }},
unavailable: {{ 'products.product.unavailable' | t | json }}
onclick="pintrk('track', 'addtocart');"
{% assign current_variant = product.selected_or_first_available_variant %}
{% include 'buddha-crosssell' %}
I would try removing [% include ‘buddha-crosssell’’ %] as that is likely the cause of the issue.
Hmm, that didn’t seem to work
Thank you for confirming. This may be outside my level of expertise, however, looking at the code you’ve provided, it could be the script you have near the top of the file
,> soldOut: {{ ‘products.product.sold_out’ | t | json }},> unavailable: {{ ‘products.product.unavailable’ | t | json }}> onclick=“pintrk(‘track’, ‘addtocart’);”>
This appears directly above the broken string on your product pages when viewing the console code. You could try removing that script and seeing if that resolves the issue. If not, then you can revert the code back by clicking “older versions” in the file you edited which will allow you to revert the file back to how you had it before.
If this is a Shopify-free theme, then I would recommend contacting Shopify Support so our themes team can take a closer look as they’ll have direct access to your store. You can do this by logging into your store through the help center, searching your question/issue, then selecting “continue” at the bottom of the page that displays the search results.
Removing the script worked!! Thanks ![]()