Product recommendations on but not showing - Capital theme

Hi,

I have the product recommendations feature turned on, but it doesn’t seem to be showing. It will show for a second and then disappear; I assume something is wrong with the code. How can I fix this?

My website is: https://raidednz.com/

2 Likes

Do you have a previous copy of your theme?

Something crazy is going on in this one, like this – you can’t nest script and this way of calling Facebook pixel is wrong.

<script><script>
  fbq('track', 'AddToCart', {
    contents: [
        {
            quantity: 1
        }
    ],
  });
</script>;<script>

Besides – last <script> opens another Javascript element, but …

There are also 2 pairs of <body> and </body> tags.

These need to be sorted out – browser gets confused

I do, but it’s mad old and I can’t be bothered updating the entire thing again

@raidednz was it working before and stopped after you made an edit or update or added any app? the code been removed from the page which suggests it can happen due to javascript conflicts, do you remember any change to the site?

Ok, at least try to remove the last <script> in the snippet I’ve copied from your side.
Or remove it entirely, as it would not work properly anyway.

Should be in your layouts/theme.liquid, probably first thing after <body> tag.