Can I link a product photo directly to an external website on Ira theme?

Hello,

on the product overview page, I would like to link a product photo directly to an external website (i.e. when I click on the product photo, I should not get directed to the product page, but to the external website, which should open in a new tab). I am using the Ira theme.

Is this possible?

Many thanks.

Laura

@LauraEEE

Yes, that’s possible but will require custom coding depending on how your theme’s section is set up.

Thanks for your reply. My theme section will look very similar to the Ira theme demo version product site: https://themes.shopify.com/themes/ira/styles/active/preview?surface_detail=minimalist&surface_inter_position=1&surface_intra_position=11&surface_type=collection

What do I need to do to link to external websites when clicking on a product photo?

Further question: Are there other themes that offer this functionality without extra coding?

@LauraEEE

As far as I am aware no themes come with a functionality of allowing users to add external links to collection items, but an efficient solution can be developed with some custom coding.

Unfortunately there is no way to offer a guide-by-guide step in a situation like this since it’s very specific, however feel free to reach out to me via message if you need further help.

Kind regards,
Diego

Hi @LauraEEE ,

This is possible. Please provide your product section code. I will provide the code edit.

Hi @made4Uo

Thanks for your reply. I am not sure whether the code you need is 1) main-product.liquid (from the “Section” folder), or 2) product.json (from the “Template” folder). I have therefore added both codes below.

1) main-product.liquid

{{ 'section-main-product.css' | asset_url | stylesheet_tag }} {{ 'component-accordion.css' | asset_url | stylesheet_tag }} {{ 'component-price.css' | asset_url | stylesheet_tag }} {{ 'component-rte.css' | asset_url | stylesheet_tag }} {{ 'component-slider.css' | asset_url | stylesheet_tag }} {{ 'component-rating.css' | asset_url | stylesheet_tag }} {{ 'component-loading-overlay.css' | asset_url | stylesheet_tag }} {{ 'component-deferred-media.css' | asset_url | stylesheet_tag }}

{%- style -%}
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}

@media screen and (min-width: 750px) {
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}
{%- endstyle -%}

{%- assign first_3d_model = product.media | where: “media_type”, “model” | first -%}
{%- if first_3d_model -%}
{{ ‘component-product-model.css’ | asset_url | stylesheet_tag }}

{%- endif -%}
{{ "accessibility.skip_to_product_info" | t }}
    {%- liquid assign variant_images = product.images | where: 'attached_to_variant?', true | map: 'src' assign media_count = product.media.size if section.settings.hide_variants and media_count > 1 assign media_count = media_count | minus: variant_images.size | plus: 1 endif

    if section.settings.media_size == ‘large’
    assign media_width = 0.65
    elsif section.settings.media_size == ‘medium’
    assign media_width = 0.55
    elsif section.settings.media_size == ‘small’
    assign media_width = 0.45
    endif
    -%}
    {%- if product.selected_or_first_available_variant.featured_media != null -%}
    {%- assign featured_media = product.selected_or_first_available_variant.featured_media -%}

  • {%- assign media_position = 1 -%} {% render 'product-thumbnail', media: featured_media, position: media_position, loop: section.settings.enable_video_looping, modal_id: section.id, xr_button: true, media_width: media_width, lazy_load: false %}
  • {%- endif -%} {%- for media in product.media -%} {%- unless media.id == product.selected_or_first_available_variant.featured_media.id -%}
  • {%- liquid assign media_position = media_position | default: 0 | plus: 1 assign lazy_load = false if media_position > 1 assign lazy_load = true endif render 'product-thumbnail', media: media, position: media_position, loop: section.settings.enable_video_looping, modal_id: section.id, xr_button: true, media_width: media_width, lazy_load: lazy_load -%}
  • {%- endunless -%} {%- endfor -%}
{% render 'icon-caret' %}
1 / {{ 'general.slider.of' | t }} {{ media_count }}
{% render 'icon-caret' %}
{%- if first_3d_model -%} {% render 'icon-3d-model' %} {{ 'products.product.xr_button' | t }} {%- endif -%} {%- if media_count > 1 and section.settings.gallery_layout != 'stacked' or section.settings.mobile_thumbnails == 'show' -%} {% render 'icon-caret' %}
    {%- if featured_media != null -%} {%- liquid capture media_index if featured_media.media_type == 'model' increment model_index elsif featured_media.media_type == 'video' or featured_media.media_type == 'external_video' increment video_index elsif featured_media.media_type == 'image' increment image_index endif endcapture assign media_index = media_index | plus: 1 -%}
  • {{ featured_media.alt | escape }}
  • {%- endif -%} {%- for media in product.media -%} {%- unless media.id == product.selected_or_first_available_variant.featured_media.id -%} {%- liquid capture media_index if media.media_type == 'model' increment model_index elsif media.media_type == 'video' or media.media_type == 'external_video' increment video_index elsif media.media_type == 'image' increment image_index endif endcapture assign media_index = media_index | plus: 1 -%}
  • {%- if media.media_type == 'model' -%} {%- render 'icon-3d-model' -%} {%- elsif media.media_type == 'video' or media.media_type == 'external_video' -%} {%- render 'icon-play' -%} {%- endif -%} {{ media.alt | escape }}
  • {%- endunless -%} {%- endfor -%}
{% render 'icon-caret' %} {%- endif -%}
{%- assign product_form_id = 'product-form-' | append: section.id -%}

{%- for block in section.blocks -%}
{%- case block.type -%}
{%- when ‘@app’ -%}
{% render block %}
{%- when ‘text’ -%}

{{- block.settings.text -}}

{%- when 'title' -%}

{{ product.title | escape }}

{{ product.title | escape }}

{%- when 'price' -%}
{%- render 'price', product: product, use_variant: true, show_badges: true, price_class: 'price--large' -%}
{%- if shop.taxes_included or shop.shipping_policy.body != blank -%}
{%- if shop.taxes_included -%} {{ 'products.product.include_taxes' | t }} {%- endif -%} {%- if shop.shipping_policy.body != blank -%} {{ 'products.product.shipping_policy_html' | t: link: shop.shipping_policy.url }} {%- endif -%}
{%- endif -%}
{%- assign product_form_installment_id = 'product-form-installment-' | append: section.id -%} {%- form 'product', product, id: product_form_installment_id, class: 'installment caption-large' -%} {{ form | payment_terms }} {%- endform -%}
{%- when 'description' -%} {%- if product.description != blank -%}
{{ product.description }}
{%- endif -%} {%- when 'custom_liquid' -%} {{ block.settings.custom_liquid }} {%- when 'collapsible_tab' -%}
{% render 'icon-accordion', icon: block.settings.icon %}

{{ block.settings.heading | default: block.settings.page.title }}

{% render 'icon-caret' %}
{{ block.settings.content }} {{ block.settings.page.content }}
{%- when 'quantity_selector' -%}
{{ 'products.product.quantity.label' | t }} {{ 'products.product.quantity.decrease' | t: product: product.title | escape }} {% render 'icon-minus' %} {{ 'products.product.quantity.increase' | t: product: product.title | escape }} {% render 'icon-plus' %}
{%- when 'popup' -%} {{ block.settings.text | default: block.settings.page.title }} {{ block.settings.text }} {%- when 'share' -%} {% render 'icon-share' %} {{ block.settings.share_label | escape }}
{% render 'icon-share' %} {{ block.settings.share_label | escape }}
{{ 'general.share.share_url' | t }}
{% render 'icon-close' %} {{ 'general.share.close' | t }} {% render 'icon-clipboard' %} {{ 'general.share.copy_to_clipboard' | t }}
{%- when 'variant_picker' -%} {%- unless product.has_only_default_variant -%} {%- if block.settings.picker_type == 'button' -%} {%- for option in product.options_with_values -%} {{ option.name }} {%- for value in option.values -%} {{ value }} {%- endfor -%} {%- endfor -%} {%- else -%} {%- for option in product.options_with_values -%}
{{ option.name }}
{% render 'icon-caret' %}
{%- endfor -%} {%- endif -%} {%- endunless -%}
{{ 'products.product.product_variants' | t }}
{% render 'icon-caret' %}
{%- when 'buy_buttons' -%}

{%- form ‘product’, product, id: product_form_id, class: ‘form’, novalidate: ‘novalidate’, data-type: ‘add-to-cart-form’ -%}

{%- if product.selected_or_first_available_variant.available -%} {{ 'products.product.add_to_cart' | t }} {%- else -%} {{ 'products.product.sold_out' | t }} {%- endif -%}
{%- if block.settings.show_dynamic_checkout -%} {{ form | payment_button }} {%- endif -%}
{%- endform -%}

{{ ‘component-pickup-availability.css’ | asset_url | stylesheet_tag }}

{%- assign pick_up_availabilities = product.selected_or_first_available_variant.store_availabilities | where: ‘pick_up_enabled’, true -%}

<pickup-availability class=“product__pickup-availabilities no-js-hidden quick-add-hidden”
{% if product.selected_or_first_available_variant.available and pick_up_availabilities.size > 0 %} available{% endif %}
data-root-url=“{{ routes.root_url }}”
data-variant-id=“{{ product.selected_or_first_available_variant.id }}”
data-has-only-default-variant=“{{ product.has_only_default_variant }}”

{% render 'icon-unavailable' %}

{{ 'products.product.pickup_availability.unavailable' | t }}

{{ 'products.product.pickup_availability.refresh' | t }}

{%- when ‘rating’ -%}
{%- if product.metafields.reviews.rating.value != blank -%}
{% liquid
assign rating_decimal = 0
assign decimal = product.metafields.reviews.rating.value.rating | modulo: 1
if decimal >= 0.3 and decimal <= 0.7
assign rating_decimal = 0.5
elsif decimal > 0.7
assign rating_decimal = 1
endif
%}

{{ product.metafields.reviews.rating.value }} / {{ product.metafields.reviews.rating.value.scale_max }}

({{ product.metafields.reviews.rating_count }}) {{ product.metafields.reviews.rating_count }} {{ "accessibility.total_reviews" | t }}

{%- endif -%} {%- endcase -%} {%- endfor -%} {{ 'products.product.view_full_details' | t }} {% render 'icon-arrow' %}
{% render 'icon-close' %}
{%- liquid if product.selected_or_first_available_variant.featured_media != null assign media = product.selected_or_first_available_variant.featured_media render 'product-media', media: media, loop: section.settings.enable_video_looping, variant_image: section.settings.hide_variants endif -%}

{%- for media in product.media -%}
{%- liquid
if section.settings.hide_variants and variant_images contains media.src
assign variant_image = true
else
assign variant_image = false
endif

unless media.id == product.selected_or_first_available_variant.featured_media.id
render ‘product-media’, media: media, loop: section.settings.enable_video_looping, variant_image: variant_image
endunless
-%}
{%- endfor -%}

{% assign popups = section.blocks | where: “type”, “popup” %}
{%- for block in popups -%}
<modal-dialog id=“PopupModal-{{ block.id }}” class=“product-popup-modal” {{ block.shopify_attributes }}>

{% render 'icon-close' %}

{{ block.settings.page.title }}

{{ block.settings.page.content }}
{%- endfor -%}

{%- if product.media.size > 0 -%}

{%- endif -%}

{%- if first_3d_model -%}

{%- endif -%}

{%- liquid
if product.selected_or_first_available_variant.featured_media
assign seo_media = product.selected_or_first_available_variant.featured_media
else
assign seo_media = product.featured_media
endif
-%}

{% schema %}
{
“name”: “t:sections.main-product.name”,
“tag”: “section”,
“class”: “section”,
“blocks”: [
{
“type”: “@app
},
{
“type”: “text”,
“name”: “t:sections.main-product.blocks.text.name”,
“settings”: [
{
“type”: “text”,
“id”: “text”,
“default”: “Text block”,
“label”: “t:sections.main-product.blocks.text.settings.text.label”
},
{
“type”: “select”,
“id”: “text_style”,
“options”: [
{
“value”: “body”,
“label”: “t:sections.main-product.blocks.text.settings.text_style.options__1.label”
},
{
“value”: “subtitle”,
“label”: “t:sections.main-product.blocks.text.settings.text_style.options__2.label”
},
{
“value”: “uppercase”,
“label”: “t:sections.main-product.blocks.text.settings.text_style.options__3.label”
}
],
“default”: “body”,
“label”: “t:sections.main-product.blocks.text.settings.text_style.label”
}
]
},
{
“type”: “title”,
“name”: “t:sections.main-product.blocks.title.name”,
“limit”: 1
},
{
“type”: “price”,
“name”: “t:sections.main-product.blocks.price.name”,
“limit”: 1
},
{
“type”: “quantity_selector”,
“name”: “t:sections.main-product.blocks.quantity_selector.name”,
“limit”: 1
},
{
“type”: “variant_picker”,
“name”: “t:sections.main-product.blocks.variant_picker.name”,
“limit”: 1,
“settings”: [
{
“type”: “select”,
“id”: “picker_type”,
“options”: [
{
“value”: “dropdown”,
“label”: “t:sections.main-product.blocks.variant_picker.settings.picker_type.options__1.label”
},
{
“value”: “button”,
“label”: “t:sections.main-product.blocks.variant_picker.settings.picker_type.options__2.label”
}
],
“default”: “button”,
“label”: “t:sections.main-product.blocks.variant_picker.settings.picker_type.label”
}
]
},
{
“type”: “buy_buttons”,
“name”: “t:sections.main-product.blocks.buy_buttons.name”,
“limit”: 1,
“settings”: [
{
“type”: “checkbox”,
“id”: “show_dynamic_checkout”,
“default”: true,
“label”: “t:sections.main-product.blocks.buy_buttons.settings.show_dynamic_checkout.label”,
“info”: “t:sections.main-product.blocks.buy_buttons.settings.show_dynamic_checkout.info”
}
]
},
{
“type”: “description”,
“name”: “t:sections.main-product.blocks.description.name”,
“limit”: 1
},
{
“type”: “share”,
“name”: “t:sections.main-product.blocks.share.name”,
“limit”: 1,
“settings”: [
{
“type”: “text”,
“id”: “share_label”,
“label”: “t:sections.main-product.blocks.share.settings.text.label”,
“default”: “Share”
},
{
“type”: “paragraph”,
“content”: “t:sections.main-product.blocks.share.settings.featured_image_info.content”
},
{
“type”: “paragraph”,
“content”: “t:sections.main-product.blocks.share.settings.title_info.content”
}
]
},
{
“type”: “custom_liquid”,
“name”: “t:sections.main-product.blocks.custom_liquid.name”,
“settings”: [
{
“type”: “liquid”,
“id”: “custom_liquid”,
“label”: “t:sections.main-product.blocks.custom_liquid.settings.custom_liquid.label”,
“info”: “t:sections.main-product.blocks.custom_liquid.settings.custom_liquid.info”
}
]
},
{
“type”: “collapsible_tab”,
“name”: “t:sections.main-product.blocks.collapsible_tab.name”,
“settings”: [
{
“type”: “text”,
“id”: “heading”,
“default”: “Collapsible row”,
“info”: “t:sections.main-product.blocks.collapsible_tab.settings.heading.info”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.heading.label”
},
{
“type”: “select”,
“id”: “icon”,
“options”: [
{
“value”: “none”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__1.label”
},
{
“value”: “apple”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__2.label”
},
{
“value”: “banana”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__3.label”
},
{
“value”: “bottle”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__4.label”
},
{
“value”: “box”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__5.label”
},
{
“value”: “carrot”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__6.label”
},
{
“value”: “chat_bubble”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__7.label”
},
{
“value”: “check_mark”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__8.label”
},
{
“value”: “clipboard”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__9.label”
},
{
“value”: “dairy”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__10.label”
},
{
“value”: “dairy_free”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__11.label”
},
{
“value”: “dryer”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__12.label”
},
{
“value”: “eye”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__13.label”
},
{
“value”: “fire”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__14.label”
},
{
“value”: “gluten_free”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__15.label”
},
{
“value”: “heart”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__16.label”
},
{
“value”: “iron”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__17.label”
},
{
“value”: “leaf”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__18.label”
},
{
“value”: “leather”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__19.label”
},
{
“value”: “lightning_bolt”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__20.label”
},
{
“value”: “lipstick”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__21.label”
},
{
“value”: “lock”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__22.label”
},
{
“value”: “map_pin”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__23.label”
},
{
“value”: “nut_free”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__24.label”
},
{
“value”: “pants”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__25.label”
},
{
“value”: “paw_print”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__26.label”
},
{
“value”: “pepper”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__27.label”
},
{
“value”: “perfume”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__28.label”
},
{
“value”: “plane”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__29.label”
},
{
“value”: “plant”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__30.label”
},
{
“value”: “price_tag”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__31.label”
},
{
“value”: “question_mark”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__32.label”
},
{
“value”: “recycle”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__33.label”
},
{
“value”: “return”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__34.label”
},
{
“value”: “ruler”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__35.label”
},
{
“value”: “serving_dish”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__36.label”
},
{
“value”: “shirt”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__37.label”
},
{
“value”: “shoe”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__38.label”
},
{
“value”: “silhouette”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__39.label”
},
{
“value”: “snowflake”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__40.label”
},
{
“value”: “star”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__41.label”
},
{
“value”: “stopwatch”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__42.label”
},
{
“value”: “truck”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__43.label”
},
{
“value”: “washing”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__44.label”
}
],
“default”: “check_mark”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.label”
},
{
“type”: “richtext”,
“id”: “content”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.content.label”
},
{
“type”: “page”,
“id”: “page”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.page.label”
}
]
},
{
“type”: “popup”,
“name”: “t:sections.main-product.blocks.popup.name”,
“settings”: [
{
“type”: “text”,
“id”: “text”,
“default”: “Pop-up link text”,
“label”: “t:sections.main-product.blocks.popup.settings.link_label.label”
},
{
“id”: “page”,
“type”: “page”,
“label”: “t:sections.main-product.blocks.popup.settings.page.label”
}
]
},
{
“type”: “rating”,
“name”: “t:sections.main-product.blocks.rating.name”,
“limit”: 1,
“settings”: [
{
“type”: “paragraph”,
“content”: “t:sections.main-product.blocks.rating.settings.paragraph.content”
}
]
}
],
“settings”: [
{
“type”: “checkbox”,
“id”: “enable_sticky_info”,
“default”: true,
“label”: “t:sections.main-product.settings.enable_sticky_info.label”
},
{
“type”: “header”,
“content”: “t:sections.main-product.settings.header.content”,
“info”: “t:sections.main-product.settings.header.info”
},
{
“type”: “select”,
“id”: “gallery_layout”,
“options”: [
{
“value”: “stacked”,
“label”: “t:sections.main-product.settings.gallery_layout.options__1.label”
},
{
“value”: “thumbnail”,
“label”: “t:sections.main-product.settings.gallery_layout.options__2.label”
},
{
“value”: “thumbnail_slider”,
“label”: “t:sections.main-product.settings.gallery_layout.options__3.label”
}
],
“default”: “stacked”,
“label”: “t:sections.main-product.settings.gallery_layout.label”
},
{
“type”: “select”,
“id”: “media_size”,
“options”: [
{
“value”: “small”,
“label”: “t:sections.main-product.settings.media_size.options__1.label”
},
{
“value”: “medium”,
“label”: “t:sections.main-product.settings.media_size.options__2.label”
},
{
“value”: “large”,
“label”: “t:sections.main-product.settings.media_size.options__3.label”
}
],
“default”: “large”,
“label”: “t:sections.main-product.settings.media_size.label”,
“info”: “t:sections.main-product.settings.media_size.info”
},
{
“type”: “select”,
“id”: “mobile_thumbnails”,
“options”: [
{
“value”: “show”,
“label”: “t:sections.main-product.settings.mobile_thumbnails.options__1.label”
},
{
“value”: “hide”,
“label”: “t:sections.main-product.settings.mobile_thumbnails.options__2.label”
}
],
“default”: “hide”,
“label”: “t:sections.main-product.settings.mobile_thumbnails.label”
},
{
“type”: “checkbox”,
“id”: “hide_variants”,
“default”: false,
“label”: “t:sections.main-product.settings.hide_variants.label”
},
{
“type”: “checkbox”,
“id”: “enable_video_looping”,
“default”: false,
“label”: “t:sections.main-product.settings.enable_video_looping.label”
},
{
“type”: “header”,
“content”: “t:sections.all.padding.section_padding_heading”
},
{
“type”: “range”,
“id”: “padding_top”,
“min”: 0,
“max”: 100,
“step”: 4,
“unit”: “px”,
“label”: “t:sections.all.padding.padding_top”,
“default”: 36
},
{
“type”: “range”,
“id”: “padding_bottom”,
“min”: 0,
“max”: 100,
“step”: 4,
“unit”: “px”,
“label”: “t:sections.all.padding.padding_bottom”,
“default”: 36
}
]
}
{% endschema %}

2) product.json

{{ 'section-main-product.css' | asset_url | stylesheet_tag }} {{ 'component-accordion.css' | asset_url | stylesheet_tag }} {{ 'component-price.css' | asset_url | stylesheet_tag }} {{ 'component-rte.css' | asset_url | stylesheet_tag }} {{ 'component-slider.css' | asset_url | stylesheet_tag }} {{ 'component-rating.css' | asset_url | stylesheet_tag }} {{ 'component-loading-overlay.css' | asset_url | stylesheet_tag }} {{ 'component-deferred-media.css' | asset_url | stylesheet_tag }}

{%- style -%}
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}

@media screen and (min-width: 750px) {
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}
{%- endstyle -%}

{%- assign first_3d_model = product.media | where: “media_type”, “model” | first -%}
{%- if first_3d_model -%}
{{ ‘component-product-model.css’ | asset_url | stylesheet_tag }}

{%- endif -%}
{{ "accessibility.skip_to_product_info" | t }}
    {%- liquid assign variant_images = product.images | where: 'attached_to_variant?', true | map: 'src' assign media_count = product.media.size if section.settings.hide_variants and media_count > 1 assign media_count = media_count | minus: variant_images.size | plus: 1 endif

    if section.settings.media_size == ‘large’
    assign media_width = 0.65
    elsif section.settings.media_size == ‘medium’
    assign media_width = 0.55
    elsif section.settings.media_size == ‘small’
    assign media_width = 0.45
    endif
    -%}
    {%- if product.selected_or_first_available_variant.featured_media != null -%}
    {%- assign featured_media = product.selected_or_first_available_variant.featured_media -%}

  • {%- assign media_position = 1 -%} {% render 'product-thumbnail', media: featured_media, position: media_position, loop: section.settings.enable_video_looping, modal_id: section.id, xr_button: true, media_width: media_width, lazy_load: false %}
  • {%- endif -%} {%- for media in product.media -%} {%- unless media.id == product.selected_or_first_available_variant.featured_media.id -%}
  • {%- liquid assign media_position = media_position | default: 0 | plus: 1 assign lazy_load = false if media_position > 1 assign lazy_load = true endif render 'product-thumbnail', media: media, position: media_position, loop: section.settings.enable_video_looping, modal_id: section.id, xr_button: true, media_width: media_width, lazy_load: lazy_load -%}
  • {%- endunless -%} {%- endfor -%}
{% render 'icon-caret' %}
1 / {{ 'general.slider.of' | t }} {{ media_count }}
{% render 'icon-caret' %}
{%- if first_3d_model -%} {% render 'icon-3d-model' %} {{ 'products.product.xr_button' | t }} {%- endif -%} {%- if media_count > 1 and section.settings.gallery_layout != 'stacked' or section.settings.mobile_thumbnails == 'show' -%} {% render 'icon-caret' %}
    {%- if featured_media != null -%} {%- liquid capture media_index if featured_media.media_type == 'model' increment model_index elsif featured_media.media_type == 'video' or featured_media.media_type == 'external_video' increment video_index elsif featured_media.media_type == 'image' increment image_index endif endcapture assign media_index = media_index | plus: 1 -%}
  • {{ featured_media.alt | escape }}
  • {%- endif -%} {%- for media in product.media -%} {%- unless media.id == product.selected_or_first_available_variant.featured_media.id -%} {%- liquid capture media_index if media.media_type == 'model' increment model_index elsif media.media_type == 'video' or media.media_type == 'external_video' increment video_index elsif media.media_type == 'image' increment image_index endif endcapture assign media_index = media_index | plus: 1 -%}
  • {%- if media.media_type == 'model' -%} {%- render 'icon-3d-model' -%} {%- elsif media.media_type == 'video' or media.media_type == 'external_video' -%} {%- render 'icon-play' -%} {%- endif -%} {{ media.alt | escape }}
  • {%- endunless -%} {%- endfor -%}
{% render 'icon-caret' %} {%- endif -%}
{%- assign product_form_id = 'product-form-' | append: section.id -%}

{%- for block in section.blocks -%}
{%- case block.type -%}
{%- when ‘@app’ -%}
{% render block %}
{%- when ‘text’ -%}

{{- block.settings.text -}}

{%- when 'title' -%}

{{ product.title | escape }}

{{ product.title | escape }}

{%- when 'price' -%}
{%- render 'price', product: product, use_variant: true, show_badges: true, price_class: 'price--large' -%}
{%- if shop.taxes_included or shop.shipping_policy.body != blank -%}
{%- if shop.taxes_included -%} {{ 'products.product.include_taxes' | t }} {%- endif -%} {%- if shop.shipping_policy.body != blank -%} {{ 'products.product.shipping_policy_html' | t: link: shop.shipping_policy.url }} {%- endif -%}
{%- endif -%}
{%- assign product_form_installment_id = 'product-form-installment-' | append: section.id -%} {%- form 'product', product, id: product_form_installment_id, class: 'installment caption-large' -%} {{ form | payment_terms }} {%- endform -%}
{%- when 'description' -%} {%- if product.description != blank -%}
{{ product.description }}
{%- endif -%} {%- when 'custom_liquid' -%} {{ block.settings.custom_liquid }} {%- when 'collapsible_tab' -%}
{% render 'icon-accordion', icon: block.settings.icon %}

{{ block.settings.heading | default: block.settings.page.title }}

{% render 'icon-caret' %}
{{ block.settings.content }} {{ block.settings.page.content }}
{%- when 'quantity_selector' -%}
{{ 'products.product.quantity.label' | t }} {{ 'products.product.quantity.decrease' | t: product: product.title | escape }} {% render 'icon-minus' %} {{ 'products.product.quantity.increase' | t: product: product.title | escape }} {% render 'icon-plus' %}
{%- when 'popup' -%} {{ block.settings.text | default: block.settings.page.title }} {{ block.settings.text }} {%- when 'share' -%} {% render 'icon-share' %} {{ block.settings.share_label | escape }}
{% render 'icon-share' %} {{ block.settings.share_label | escape }}
{{ 'general.share.share_url' | t }}
{% render 'icon-close' %} {{ 'general.share.close' | t }} {% render 'icon-clipboard' %} {{ 'general.share.copy_to_clipboard' | t }}
{%- when 'variant_picker' -%} {%- unless product.has_only_default_variant -%} {%- if block.settings.picker_type == 'button' -%} {%- for option in product.options_with_values -%} {{ option.name }} {%- for value in option.values -%} {{ value }} {%- endfor -%} {%- endfor -%} {%- else -%} {%- for option in product.options_with_values -%}
{{ option.name }}
{% render 'icon-caret' %}
{%- endfor -%} {%- endif -%} {%- endunless -%}
{{ 'products.product.product_variants' | t }}
{% render 'icon-caret' %}
{%- when 'buy_buttons' -%}

{%- form ‘product’, product, id: product_form_id, class: ‘form’, novalidate: ‘novalidate’, data-type: ‘add-to-cart-form’ -%}

{%- if product.selected_or_first_available_variant.available -%} {{ 'products.product.add_to_cart' | t }} {%- else -%} {{ 'products.product.sold_out' | t }} {%- endif -%}
{%- if block.settings.show_dynamic_checkout -%} {{ form | payment_button }} {%- endif -%}
{%- endform -%}

{{ ‘component-pickup-availability.css’ | asset_url | stylesheet_tag }}

{%- assign pick_up_availabilities = product.selected_or_first_available_variant.store_availabilities | where: ‘pick_up_enabled’, true -%}

<pickup-availability class=“product__pickup-availabilities no-js-hidden quick-add-hidden”
{% if product.selected_or_first_available_variant.available and pick_up_availabilities.size > 0 %} available{% endif %}
data-root-url=“{{ routes.root_url }}”
data-variant-id=“{{ product.selected_or_first_available_variant.id }}”
data-has-only-default-variant=“{{ product.has_only_default_variant }}”

{% render 'icon-unavailable' %}

{{ 'products.product.pickup_availability.unavailable' | t }}

{{ 'products.product.pickup_availability.refresh' | t }}

{%- when ‘rating’ -%}
{%- if product.metafields.reviews.rating.value != blank -%}
{% liquid
assign rating_decimal = 0
assign decimal = product.metafields.reviews.rating.value.rating | modulo: 1
if decimal >= 0.3 and decimal <= 0.7
assign rating_decimal = 0.5
elsif decimal > 0.7
assign rating_decimal = 1
endif
%}

{{ product.metafields.reviews.rating.value }} / {{ product.metafields.reviews.rating.value.scale_max }}

({{ product.metafields.reviews.rating_count }}) {{ product.metafields.reviews.rating_count }} {{ "accessibility.total_reviews" | t }}

{%- endif -%} {%- endcase -%} {%- endfor -%} {{ 'products.product.view_full_details' | t }} {% render 'icon-arrow' %}
{% render 'icon-close' %}
{%- liquid if product.selected_or_first_available_variant.featured_media != null assign media = product.selected_or_first_available_variant.featured_media render 'product-media', media: media, loop: section.settings.enable_video_looping, variant_image: section.settings.hide_variants endif -%}

{%- for media in product.media -%}
{%- liquid
if section.settings.hide_variants and variant_images contains media.src
assign variant_image = true
else
assign variant_image = false
endif

unless media.id == product.selected_or_first_available_variant.featured_media.id
render ‘product-media’, media: media, loop: section.settings.enable_video_looping, variant_image: variant_image
endunless
-%}
{%- endfor -%}

{% assign popups = section.blocks | where: “type”, “popup” %}
{%- for block in popups -%}
<modal-dialog id=“PopupModal-{{ block.id }}” class=“product-popup-modal” {{ block.shopify_attributes }}>

{% render 'icon-close' %}

{{ block.settings.page.title }}

{{ block.settings.page.content }}
{%- endfor -%}

{%- if product.media.size > 0 -%}

{%- endif -%}

{%- if first_3d_model -%}

{%- endif -%}

{%- liquid
if product.selected_or_first_available_variant.featured_media
assign seo_media = product.selected_or_first_available_variant.featured_media
else
assign seo_media = product.featured_media
endif
-%}

{% schema %}
{
“name”: “t:sections.main-product.name”,
“tag”: “section”,
“class”: “section”,
“blocks”: [
{
“type”: “@app
},
{
“type”: “text”,
“name”: “t:sections.main-product.blocks.text.name”,
“settings”: [
{
“type”: “text”,
“id”: “text”,
“default”: “Text block”,
“label”: “t:sections.main-product.blocks.text.settings.text.label”
},
{
“type”: “select”,
“id”: “text_style”,
“options”: [
{
“value”: “body”,
“label”: “t:sections.main-product.blocks.text.settings.text_style.options__1.label”
},
{
“value”: “subtitle”,
“label”: “t:sections.main-product.blocks.text.settings.text_style.options__2.label”
},
{
“value”: “uppercase”,
“label”: “t:sections.main-product.blocks.text.settings.text_style.options__3.label”
}
],
“default”: “body”,
“label”: “t:sections.main-product.blocks.text.settings.text_style.label”
}
]
},
{
“type”: “title”,
“name”: “t:sections.main-product.blocks.title.name”,
“limit”: 1
},
{
“type”: “price”,
“name”: “t:sections.main-product.blocks.price.name”,
“limit”: 1
},
{
“type”: “quantity_selector”,
“name”: “t:sections.main-product.blocks.quantity_selector.name”,
“limit”: 1
},
{
“type”: “variant_picker”,
“name”: “t:sections.main-product.blocks.variant_picker.name”,
“limit”: 1,
“settings”: [
{
“type”: “select”,
“id”: “picker_type”,
“options”: [
{
“value”: “dropdown”,
“label”: “t:sections.main-product.blocks.variant_picker.settings.picker_type.options__1.label”
},
{
“value”: “button”,
“label”: “t:sections.main-product.blocks.variant_picker.settings.picker_type.options__2.label”
}
],
“default”: “button”,
“label”: “t:sections.main-product.blocks.variant_picker.settings.picker_type.label”
}
]
},
{
“type”: “buy_buttons”,
“name”: “t:sections.main-product.blocks.buy_buttons.name”,
“limit”: 1,
“settings”: [
{
“type”: “checkbox”,
“id”: “show_dynamic_checkout”,
“default”: true,
“label”: “t:sections.main-product.blocks.buy_buttons.settings.show_dynamic_checkout.label”,
“info”: “t:sections.main-product.blocks.buy_buttons.settings.show_dynamic_checkout.info”
}
]
},
{
“type”: “description”,
“name”: “t:sections.main-product.blocks.description.name”,
“limit”: 1
},
{
“type”: “share”,
“name”: “t:sections.main-product.blocks.share.name”,
“limit”: 1,
“settings”: [
{
“type”: “text”,
“id”: “share_label”,
“label”: “t:sections.main-product.blocks.share.settings.text.label”,
“default”: “Share”
},
{
“type”: “paragraph”,
“content”: “t:sections.main-product.blocks.share.settings.featured_image_info.content”
},
{
“type”: “paragraph”,
“content”: “t:sections.main-product.blocks.share.settings.title_info.content”
}
]
},
{
“type”: “custom_liquid”,
“name”: “t:sections.main-product.blocks.custom_liquid.name”,
“settings”: [
{
“type”: “liquid”,
“id”: “custom_liquid”,
“label”: “t:sections.main-product.blocks.custom_liquid.settings.custom_liquid.label”,
“info”: “t:sections.main-product.blocks.custom_liquid.settings.custom_liquid.info”
}
]
},
{
“type”: “collapsible_tab”,
“name”: “t:sections.main-product.blocks.collapsible_tab.name”,
“settings”: [
{
“type”: “text”,
“id”: “heading”,
“default”: “Collapsible row”,
“info”: “t:sections.main-product.blocks.collapsible_tab.settings.heading.info”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.heading.label”
},
{
“type”: “select”,
“id”: “icon”,
“options”: [
{
“value”: “none”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__1.label”
},
{
“value”: “apple”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__2.label”
},
{
“value”: “banana”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__3.label”
},
{
“value”: “bottle”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__4.label”
},
{
“value”: “box”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__5.label”
},
{
“value”: “carrot”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__6.label”
},
{
“value”: “chat_bubble”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__7.label”
},
{
“value”: “check_mark”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__8.label”
},
{
“value”: “clipboard”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__9.label”
},
{
“value”: “dairy”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__10.label”
},
{
“value”: “dairy_free”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__11.label”
},
{
“value”: “dryer”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__12.label”
},
{
“value”: “eye”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__13.label”
},
{
“value”: “fire”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__14.label”
},
{
“value”: “gluten_free”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__15.label”
},
{
“value”: “heart”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__16.label”
},
{
“value”: “iron”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__17.label”
},
{
“value”: “leaf”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__18.label”
},
{
“value”: “leather”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__19.label”
},
{
“value”: “lightning_bolt”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__20.label”
},
{
“value”: “lipstick”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__21.label”
},
{
“value”: “lock”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__22.label”
},
{
“value”: “map_pin”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__23.label”
},
{
“value”: “nut_free”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__24.label”
},
{
“value”: “pants”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__25.label”
},
{
“value”: “paw_print”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__26.label”
},
{
“value”: “pepper”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__27.label”
},
{
“value”: “perfume”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__28.label”
},
{
“value”: “plane”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__29.label”
},
{
“value”: “plant”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__30.label”
},
{
“value”: “price_tag”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__31.label”
},
{
“value”: “question_mark”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__32.label”
},
{
“value”: “recycle”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__33.label”
},
{
“value”: “return”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__34.label”
},
{
“value”: “ruler”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__35.label”
},
{
“value”: “serving_dish”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__36.label”
},
{
“value”: “shirt”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__37.label”
},
{
“value”: “shoe”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__38.label”
},
{
“value”: “silhouette”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__39.label”
},
{
“value”: “snowflake”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__40.label”
},
{
“value”: “star”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__41.label”
},
{
“value”: “stopwatch”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__42.label”
},
{
“value”: “truck”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__43.label”
},
{
“value”: “washing”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.options__44.label”
}
],
“default”: “check_mark”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.icon.label”
},
{
“type”: “richtext”,
“id”: “content”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.content.label”
},
{
“type”: “page”,
“id”: “page”,
“label”: “t:sections.main-product.blocks.collapsible_tab.settings.page.label”
}
]
},
{
“type”: “popup”,
“name”: “t:sections.main-product.blocks.popup.name”,
“settings”: [
{
“type”: “text”,
“id”: “text”,
“default”: “Pop-up link text”,
“label”: “t:sections.main-product.blocks.popup.settings.link_label.label”
},
{
“id”: “page”,
“type”: “page”,
“label”: “t:sections.main-product.blocks.popup.settings.page.label”
}
]
},
{
“type”: “rating”,
“name”: “t:sections.main-product.blocks.rating.name”,
“limit”: 1,
“settings”: [
{
“type”: “paragraph”,
“content”: “t:sections.main-product.blocks.rating.settings.paragraph.content”
}
]
}
],
“settings”: [
{
“type”: “checkbox”,
“id”: “enable_sticky_info”,
“default”: true,
“label”: “t:sections.main-product.settings.enable_sticky_info.label”
},
{
“type”: “header”,
“content”: “t:sections.main-product.settings.header.content”,
“info”: “t:sections.main-product.settings.header.info”
},
{
“type”: “select”,
“id”: “gallery_layout”,
“options”: [
{
“value”: “stacked”,
“label”: “t:sections.main-product.settings.gallery_layout.options__1.label”
},
{
“value”: “thumbnail”,
“label”: “t:sections.main-product.settings.gallery_layout.options__2.label”
},
{
“value”: “thumbnail_slider”,
“label”: “t:sections.main-product.settings.gallery_layout.options__3.label”
}
],
“default”: “stacked”,
“label”: “t:sections.main-product.settings.gallery_layout.label”
},
{
“type”: “select”,
“id”: “media_size”,
“options”: [
{
“value”: “small”,
“label”: “t:sections.main-product.settings.media_size.options__1.label”
},
{
“value”: “medium”,
“label”: “t:sections.main-product.settings.media_size.options__2.label”
},
{
“value”: “large”,
“label”: “t:sections.main-product.settings.media_size.options__3.label”
}
],
“default”: “large”,
“label”: “t:sections.main-product.settings.media_size.label”,
“info”: “t:sections.main-product.settings.media_size.info”
},
{
“type”: “select”,
“id”: “mobile_thumbnails”,
“options”: [
{
“value”: “show”,
“label”: “t:sections.main-product.settings.mobile_thumbnails.options__1.label”
},
{
“value”: “hide”,
“label”: “t:sections.main-product.settings.mobile_thumbnails.options__2.label”
}
],
“default”: “hide”,
“label”: “t:sections.main-product.settings.mobile_thumbnails.label”
},
{
“type”: “checkbox”,
“id”: “hide_variants”,
“default”: false,
“label”: “t:sections.main-product.settings.hide_variants.label”
},
{
“type”: “checkbox”,
“id”: “enable_video_looping”,
“default”: false,
“label”: “t:sections.main-product.settings.enable_video_looping.label”
},
{
“type”: “header”,
“content”: “t:sections.all.padding.section_padding_heading”
},
{
“type”: “range”,
“id”: “padding_top”,
“min”: 0,
“max”: 100,
“step”: 4,
“unit”: “px”,
“label”: “t:sections.all.padding.padding_top”,
“default”: 36
},
{
“type”: “range”,
“id”: “padding_bottom”,
“min”: 0,
“max”: 100,
“step”: 4,
“unit”: “px”,
“label”: “t:sections.all.padding.padding_bottom”,
“default”: 36
}
]
}
{% endschema %}

Hi @LauraEEE ,

Sorry, I mean your “product overview” section. Do you mean the collection page? or featured products. I see your using the Shopify 2.0 Free themes based on your codes. If you are unsure what is the code involved, I would recommend sharing your URL and I can take a look

Hi @LauraEEE ,

This is possible but we will need to use metafields.

  1. Click Settings on your left hand corner.

  2. Go to Metafields > Products

  3. Please copy the inputs in the image below.

  1. You will see this metafield in every product that you have. From Admin page > Products > choose the product and scroll all the way down. Please refer to image below. You have to include http or https or mailto links

  1. Click SAVE

Next, we need to include the metafield in our theme.

  1. In your Admin store, click Online store > Themes

  2. Go to the theme you want to edit, click Actions > Edit code

  3. In your Section folder, open the main-collection-product-grid.liquid

  4. Find the card-product, then add the code below. Please refer to image for placement. Make sure to click SAVE

,external_link: card_product.metafields.custom.dynamic_link.value

  1. Lastly, open the card-product.liquid under the Snippet folder.

  2. Find all codes {{ card_product.url }} and replace it with the code below. See image for reference

{% if external_link %} {{ external_link }} {% else %}{{ card_product.url }}{% endif %}

  1. Make sure to click SAVE
1 Like

Hi @made4Uo thank you so much for the detailed description and step-by-step guide. I will try to implement this and let you know on this page whether it worked. Thank you!

1 Like

Hi @made4Uo . Your explanation was super easy to follow, but for some reason it has not worked. I have sent you the code via direct mail. Do you know what went wrong?

Hi @LauraEEE ,

I see your code you sent but the step#6 is not done. You have to replace all the codes {{card_product.url}} as shown in the image

Hi @made4Uo

Thank you. I have checked again, but I have replaced all {{card_product.url}} with

{% if external_link %} {{ external_link }} {% else %}{{ card_product.url }}{% endif %}

There were 3 x {{card_product.url}}, and I have replaced all three with the code you provided.

Any other ideas why it does not seem to work?

Thank you @made4Uo for your continued help. We changed the main-collection-product-grid.liquid as follows:thecard_product link was changed to **product.**Now it works :slightly_smiling_face:

Hi @made4Uo , thank you for helping with this issue. Is it possible with your proposed solution that the external page opens in a new tab? Perhaps you have an idea…

Dear @made4Uo : You have helped me to solve this request 2 years ago… One follow up question: Do you know how it is possible to achieve that by clicking on a product photo in the product recommendations as well as after a product search that this also forwards the user to an external website? I.e. same issue but now for products in the “Product recommendations” section and following a search? I can also open a new thread, if that’s easier…

@LauraEEE

You need to edit the search and the product recommendation. Find the image links, replace it with your external links. You might want to use product metafields for your external links of they are dynamic. Hard to tell you specific code edits since your using third party theme

1 Like

@helloooshop

Yes, just add target=“_blank” in your link tag. See sample below

your image

Hi @made4Uo thank you for your reply. I am unable to find where the image links are… This is the predictive.search-liquid code…:

{% comment %}theme-check-disable ImgLazyLoading{% endcomment %}
{%- if predictive_search.performed -%}

{%- if predictive_search.resources.products.size > 0 -%}

{{ 'templates.search.products' | t }}

{%- endif -%}
{%- if search.results_count == 0 -%} {{ 'templates.search.no_results' | t: terms: predictive_search.terms }} {%- else -%} {{ 'templates.search.results_with_count' | t: terms: predictive_search.terms, count: predictive_search.resources.products.size }} {%- endif -%} {%- endif -%}