Shopify Reviews not visible after script exclusion (Uncaught ReferenceError: SPR is not defined)

Yannick_neowake
Excursionist
12 1 5

Hello,

I am using the Shopify Review plugin to display reviews in a tab on our product pages:

Product page (In German: Bewertungen - Reviews).

 

And for normal products, it does work. But for a specific product category (called "Mannayan", we use an external Payment Provider, so the "Add to Cart" button opens an external minicart.

 

Our Affiliate Plugin however, caused problems with the minicart. Because of that, I excluded the Affiliate script on all Mannayan - Products in the header of theme.liquid :

 

{% if product.vendor contains "Mannayan" %}
  {{ h_content | remove: "\/\/cdn.shopify.com\/proxy\/f1776f021e45cd40c103b75dbf05e32c00d583044f5a8254ffd2ab0ccc6a546c\/api.goaffpro.com\/loader.js?shop=neuroprogrammer.myshopify.com\u0026sp-cache-control=cHVibGljLCBtYXgtYWdlPTkwMA" }}
{% else %}
  {{ content_for_header }}
{% endif %}

But now the Mannayan products can't display the reviews and when I want to add a new review, I get the error "Uncaught ReferenceError: SPR is not defined"

 

Every time I remove my code, the Reviews work again (but not the minicart). Did I make a mistake somewhere?

Replies 0 (0)