Hello, everyone.
I need help. When I go to the page to search for a product, it says above the products:
How can I fix it? Thanks in advance. Any help is welcome!
Hello, @babysnatch
Welcome to the Shopify community!
and Thanks for your question.
Please share your site URL,
So I will check and provide a solution here.
Here you are:
{% comment %}
This snippet is used to showcase each product during the loop,
‘for product in collection.products’ in collection.liquid.
A liquid variable (grid_item_width) is set just before the this
snippet is included to change the size of the container.
Once the variable is set on a page, all future instances of this
snippet will use that width. Overwrite the variable to adjust this.
Example
{% endcomment %}
{% unless grid_item_width %}
{% assign grid_item_width = ‘large–one-third medium–one-half’ %}
{% endunless %}
{% unless width %}
{%- assign width = 310 -%}
{% endunless %}
{% unless height %}
{%- assign height = 415 -%}
{% endunless %}
{% assign on_sale = false %}
{% if product.compare_at_price > product.price %}
{% assign on_sale = true %}
{% endif %}
{% assign sold_out = true %}
{% if product.available %}
{% assign sold_out = false %}
{% endif %}
{%- assign variant = product.selected_or_first_available_variant -%}
{% capture img_id_class %}ProductImage-{{ product.featured_image.id }}{% endcapture %}
{% capture img_wrapper_id %}ProductImageWrapper-{{ product.featured_image.id }}{% endcapture %}
{%- assign img_url = product.featured_image | img_url: ‘1x1’ | replace: ‘1x1.', '{width}x.’ -%}
{{ 'products.product.sold_out_html' | t }}
{{ 'products.general.save_html' | t: saved_amount: saved_amount }}
{% if on_sale %}
{{ ‘products.general.sale_price’ | t }}
{% else %}
{{ ‘products.general.regular_price’ | t }}
{% endif %}
{% if product.price_varies %}
{{ product.price_min | money_without_trailing_zeros }}
asd
+
{% else %}
{{ product.price | money_without_trailing_zeros }}
{% endif %}
SALE
{%- if product.price_varies == false and variant.available and variant.unit_price_measurement -%}
{%- capture unit_price_separator -%}
/ {{ ‘general.accessibility.unit_price_separator’ | t }}
{%- endcapture -%}
{%- capture unit_price_base_unit -%}
{%- if variant.unit_price_measurement.reference_value != 1 -%}
{{- variant.unit_price_measurement.reference_value -}}
{%- endif -%}
{{ variant.unit_price_measurement.reference_unit }}
{%- endcapture -%}
{{ ‘products.general.unit_price’ | t }}
{{ variant.unit_price | money }}{{- unit_price_separator -}}{{- unit_price_base_unit -}}
{%- endif -%}
{% if section.settings.product_vendor_enable %}
{{ product.vendor }}
{% endif %}I need your store login details. Yes, I know your login details are confidential. For this second option, I have added your store to my Shopify partner account so I will check your code easily and manage what you think about it?
Hi Ketan, im having the same issue as the one mentioned above. Could you, or anyone reading this, provide the solution?
Thanks!
I found the solution,
you should add a space between two == included in your code.
This is your code:
that code did not fix it for me. any more advice?
What code? did you provide one? I do not see it
oops, sorry something is wrong
can you please share your site URL,
So I will check and provide a solution here.
i know this is old, but in case anyone comes looking for this, i just solved this same problem for me. in the snippets product-grid-item.liquid you need to change:
product.featured_image.src== blank
to
product.featured_image.src== blank
there needs to be a blank after the .src and before the ==. there were two instances where that needed to be fixed in my snippet, and that sorted it out.
correction to:
product.featured_image.src == blank
*that extra space keeps getting deleted in my response…