How do I fix this?

Solved
Highlighted
Excursionist
13 0 2

Hello,

 

I'm fairly new to the shopify family. I did have someone else do a little bit of work for me on my site... I'm getting code on the bottom of my product pages, and I honestly don't know how to fix it. Any help?

It seems to be happening on every product page. Random page:

https://yourgadgetcorner.com/collections/phone-accessories/products/apple-airpod-1-2-silicone-protec...

 

Thanks

David

 

 

0 Likes
Highlighted
Shopify Partner
856 128 145

Hi There!

Seems some bit of code was left out from the cleanup, can you access the product-template.liquid file on:

  • "Online Store"
  • "Edit"
  • "Edit Code"
  • "product-template.liquid"

And the proceed with copying the whole code here? I'll take a look at it!

Thanks!

- Did we solve your issue? Like & Mark As Solution to help the community
- Should you need any direct help: contact@jhkconsultancy.com
K&J
0 Likes
Highlighted
Excursionist
13 0 2

I appreciate the help.

Here is the code:

 

{% include 'product-template',
image_container_width: section.settings.image_size,
section_id: product.id,
social: section.settings.social_enable,
thumbnail_position: section.settings.thumbnail_position
%}

{% if settings.enable_product_reviews and settings.reviews_layout == 'full' %}
<hr id="Reviews-{{ product.id }}" class="hr--large">
<div class="index-section index-section--small product-reviews product-reviews--full">
<div class="page-width">
<div id="shopify-product-reviews" data-id="{{product.id}}">{{ product.metafields.spr.reviews }}</div>
</div>
</div>
{% endif %}

{% if section.settings.related_enable %}
{% unless isModal %}
{% include 'related-products' %}
{% endunless %}
{% endif %}

{% if section.settings.collection_links_enable and collection %}
{% unless isModal %}
{% include 'collection-navigation-links' %}
{% endunless %}
{% endif %}

{% schema %}
{
"name": "Product pages",
"settings": [
{
"type": "select",
"id": "image_size",
"label": "Image size",
"default": "medium",
"options": [
{
"value": "small",
"label": "Small"
},
{
"value": "medium",
"label": "Medium"
},
{
"value": "large",
"label": "Large"
}
]
},
{
"type": "select",
"id": "thumbnail_position",
"label": "Thumbnail position",
"default": "beside",
"options": [
{
"value": "beside",
"label": "Next to image"
},
{
"value": "below",
"label": "Below image"
}
]
},
{
"type": "select",
"id": "description_style",
"label": "Description position",
"default": "default",
"options": [
{
"value": "default",
"label": "Next to images"
},
{
"value": "full",
"label": "Below images"
}
]
},
{
"type": "checkbox",
"id": "social_enable",
"label": "Enable social sharing",
"default": true
},
{
"type": "checkbox",
"id": "related_enable",
"label": "Show related products",
"default": true
},
{
"type": "checkbox",
"id": "collection_links_enable",
"label": "Show back/next product links",
"default": true
},
{
"type": "range",
"id": "related_count",
"label": "Number of related products",
"default": 4,
"min": 2,
"max": 5,
"step": 1
}
]
}
{% endschema %}

0 Likes
Highlighted
Astronaut
1083 178 213

Hey, @YourGC 

1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find theme.liquid file
3. Paste all code here please

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
0 Likes
Highlighted
Excursionist
13 0 2

Hello, Here is the code:

<!doctype html>
<html class="no-js" lang="{{ shop.locale }}">
<head>
<meta name="p:domain_verify" content="3c529247a4bbc086bcc7c68f21a69c93"/>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="theme-color" content="{{ settings.color_button }}">
<link rel="canonical" href="{{ canonical_url }}">
<meta name="format-detection" content="telephone=no">

{%- if settings.favicon -%}
<link rel="shortcut icon" href="{{ settings.favicon | img_url: '32x32' }}" type="image/png" />
{%- endif -%}

{%- include 'seo-title' -%}
<title>{{ seo_title }}</title>

{%- if page_description -%}
<meta name="description" content="{{ page_description | escape }}">
{%- endif -%}

{%- include 'social-meta-tags' -%}

{% include 'font-face' %}
{{ 'theme.scss.css' | asset_url | stylesheet_tag }}

<script>
document.documentElement.className = document.documentElement.className.replace('no-js', 'js');

window.theme = window.theme || {};
theme.strings = {
addToCart: {{ 'products.product.add_to_cart' | t | json }},
soldOut: {{ 'products.product.sold_out' | t | json }},
unavailable: {{ 'products.product.unavailable' | t | json }},
stockLabel: {{ 'products.product.stock_label' | t: count: '[count]' | json }},
cartSavings: {{ 'cart.general.savings_html' | t: savings: '[savings]' | json }},
cartEmpty: {{ 'cart.general.empty' | t | json }},
cartTermsConfirmation: {{ 'cart.general.terms_confirm' | t | json }}
};
theme.settings = {
cartType: {{ settings.cart_type | json }},
moneyFormat: {{ shop.money_format | json }},
quickView: {{ settings.quick_shop_enable }},
themeVersion: "3.5.1"
};
</script>

{{ content_for_header }}
{% include 'oldIE-js' %}

{% include 'defer-script' with 'vendor.js' %}

{% if settings.enable_currencies %}
<script src="/services/javascripts/currencies.js" defer="defer"></script>
{% include 'defer-script' with 'jquery.currencies.min.js' %}
{% endif %}

{% include 'defer-script' with 'theme.js' %}

{%- if template contains 'customers' -%}
{% include 'defer-shopify-script' with 'shopify_common.js' %}
{%- endif -%}
{{ shop.metafields.theme.cdn_css }}
</head>

<body class="template-{{ template | replace: '.', ' ' | truncatewords: 1, '' | handle }}{% if settings.enable_currencies %} currencies-enabled{% endif %}" data-transitions="{{ settings.animate_page_transitions }}">

{% if settings.animate_page_transitions %}
<script type="text/javascript">window.setTimeout(function() { document.body.className += " loaded"; }, 25);</script>
{% endif %}

<a class="in-page-link visually-hidden skip-link" href="#MainContent">{{ 'general.accessibility.skip_to_content' | t }}</a>

<div id="PageContainer" class="page-container">
<div class="transition-body">

{% section 'header' %}

<main class="main-content" id="MainContent">
{{ content_for_layout }}
</main>

{% section 'footer' %}

</div>
</div>

{% section 'newsletter-popup' %}

{% if settings.cart_type == 'drawer' %}
{% include 'ajax-cart-template' %}
{% endif %}

{% if settings.enable_currencies %}
<span
id="CurrencyData"
class="hide"
data-shop-currency="{{ shop.currency }}"
data-default-currency="{{ settings.default_currency | default: shop.currency }}"
data-format="{{ settings.currency_format | default: 'money_with_currency_format' }}"
data-money-format="{{ shop.money_format | strip_html }}"
data-money-currency-format="{{ shop.money_with_currency_format | strip_html }}">
</span>
{% endif %}

{% include 'qty-selector-template' %}
{% include 'video-modal' %}
{% include 'photoswipe-template' %}
</body>
</html>
{% include "fireapps-aliorder-bulk-action-edit-product" %}

0 Likes
Highlighted
Astronaut
1083 178 213

This is an accepted solution.

Hm, nothing there. I have a feeling the faulty code may be below {% include 'product-template' %} in product.liquid. It's most definitely coming from an app you installed. I'd need to be in your store to verify.

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
1 Like
Highlighted
Excursionist
13 0 2

Okay... Man, I really don't know much about this. Can I let you take a look yourself, that would be much appreciated.

0 Likes
Highlighted
Excursionist
13 0 2

I think that did it
"

{% section 'product-template' %}

<script>
// Override default values of shop.strings for each template.
// Alternate product templates can change values of
// add to cart button, sold out, and unavailable states here.
theme.productStrings = {
addToCart: {{ 'products.product.add_to_cart' | t | json }},
soldOut: {{ 'products.product.sold_out' | t | json }},
unavailable: {{ 'products.product.unavailable' | t | json }}
};
</script
<script type="text/javascript">
var _learnq = _learnq || [];

var item = {
Name: {{ product.title|json }},
ProductID: {{ product.id|json }},
Categories: {{ product.collections|map:'title'|json }},
ImageURL: "https:{{ product.featured_image.src|img_url:'grande' }}",
URL: "{{ shop.secure_url }}{{ product.url }}",
Brand: {{ product.vendor|json }},
Price: {{ product.price|money|json }},
CompareAtPrice: {{ product.compare_at_price_max|money|json }}
};

_learnq.push(['track', 'Viewed Product', item]);
_learnq.push(['trackViewedItem', {
Title: item.Name,
ItemId: item.ProductID,
Categories: item.Categories,
ImageUrl: item.ImageURL,
Url: item.URL,
Metadata: {
Brand: item.Brand,
Price: item.Price,
CompareAtPrice: item.CompareAtPrice
}
}]);
</script>"

I deleted this out of there and now the pages look normal!

0 Likes
Highlighted
Astronaut
1083 178 213

I'm glad to hear that, @YourGC !

Next time feel free to contact me personally, I'll be happy to help.

Kind regards,
Diego

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
1 Like