Making featured image the facebook image turned off the variants

New Member
3 0 0

So I found out how to make facebook use the featured image by changing the og:image meta field. That seemed to work.

I also figured out from a help article page (https://help.shopify.com/themes/customization/products/variants/show-featured-image-on-product-page) how to display the featured image when the product page is initially loaded as opposed to the first variant being selected and displaying its image. That seemed to work.

But when I made these two changes, something caused the variants in my facebook shop to "disappear" and only an add to cart button is available per product even though there are variants that should be selected.

Does anyone have any thoughts how to re-enable product variants in facebook and yet still display the featured image on load of a product page, and as the main image for each facebook products?

0 Likes
Excursionist
18 0 5

I have the same problem.... this is not good!

0 Likes
Excursionist
18 0 5

 {%- capture og_image_tags -%}{% for image in product.images limit:1 -%}<meta property="og:image" content="http:{{ product.featured_image | product_img_url: '1200x1200' }}">{% endfor -%}{% endcapture -%}
    {%- capture og_image_secure_url_tags -%}{% for image in product.images limit:1 -%}<meta property="og:image:secure_url" content="https:{{ product.featured_image | product_img_url: '1200x1200' }}">{% endfor -%}{% endcapture -%}

0 Likes
Tourist
5 0 1

Ever slved this?

I'm trying to achieve the behaviour you where trying to get rid off.

 

I don't want the variants to show on Facebook.. only one item per product without varaints

0 Likes