Comments (13)
Thanks @samthaman for the help, finally getting a grip on how this works.
from shopifyscripts.
can you paste your code here? It's important that you clear all css and have this as your first line:
{% layout none %}<?xml
version="1.0"?>``
from shopifyscripts.
Thanks sam, I thought the first line needs to be {% section 'collection-template' %} in order to assign the template to collections. I am getting the same error as powerflow in that facebook product catalog says it is an html page. Also, I am still getting the google_product_catalog error even when i use the facebook feed by flexify. In order to troubleshoot, I only added 5 products to the fb-product-feed colleciton.
In google shopping app, I selected the collection and tried to publish.. received the following error.
I receive the following error in facebook product catalog fetch (after I re-added {% section 'collection-template' %} at the top of the template because when I took it out it provided a different error that there were no products.
With section code added back in
So in summary, facebook catalog doesn't like the format, and google shopping app says that the google_product_discription or catalog isn't provided and facebook gives the same error even when i use facebook feed by flexify.
Any insight would be appreciated.
from shopifyscripts.
Also if I might add, by adding the {% section 'collection-template' %} at the top of the template I get a hybrid of broken html (images not aligned, etc) and the lower half of the page seems to be a huge block of text of products, description, variants etc, but no xml code present, just standard text & links when going directly to the URL in the browser.
from shopifyscripts.
Of course I am just learning all of this so I am trying to be as clear as possible (probably not working lol)
but here is what I get in the google shopping app even when I point it to a specific collection, (not the facebook feed collection)
Regardless of pointing to the a specific collection or the facebook feed collection that I created, I get the same error in google shopping app..
from shopifyscripts.
@reconrad45 each product needs to be assigned to a google shopping category so that google and FB (FB uses the same categories) know what type of product you're selling. You can assign the categories during a .csv product upload to shopify, or through the Shopify Google Shopping App.
Until you have your google taxonomy memorized, I've found that it's easier and more accurate to assign categories through the google shopping app after I've published a product
More on the google taxonomy here:
https://support.google.com/merchants/answer/6324436?hl=en
from shopifyscripts.
This is the code that's currently live on my site for google. Once you have categories assigned, you should start seeing good results with this.
{% layout none %}<?xml version="1.0"?>
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
{% paginate collection.products by 350 %}
{% assign useSEOtitle = false %}
{% assign useSEOdescription = false %}
{% assign CountryCode = 'US' %}
{% if shop.currency == 'CAD' %}{% assign CountryCode = 'CA' %}{% endif %}
{% assign Color = "" %}
{% assign Size = "" %}
<channel>
<title>{{ shop.name }} {{ collection.title | strip_html | strip_newlines | replace: '&', '&' }}</title>
<link>{{ shop.url }}</link>
<description>{{ collection.description | strip_html | strip_newlines | replace: '&', '&' }}</description>
{% for product in collection.products %}
{% assign GoogleProductCategory = product.metafields.google.google_product_type %}
{% assign Gender = product.metafields.google.gender %}
{% assign AgeGroup = product.metafields.google.age_group %}
{% for variant in product.variants %}
{% for option in product.options %}
{% if option == 'Color' %}{% capture Color %}{{ variant.options[forloop.index0] }}{% endcapture %}
{% elsif option == 'Size' %}{% capture Size %}{{ variant.options[forloop.index0] }}{% endcapture %}
{% endif %}
{% endfor %}
{% capture productTitle %}{{ product.vendor }} {{ product.title }} {{ Color }}{% endcapture %}
{% if useSEOtitle and product.metafields.global.title_tag.size > 0 %}{% assign productTitle = product.metafields.global.title_tag %}{% endif %}
{% assign productDescrition = product.description %}
{% if useSEOdescription and product.metafields.global.description_tag.size > 0 %}{% assign productDescrition = product.metafields.global.description_tag %}{% endif %}
<item>
<title>{{ productTitle | replace: '&', '&' }}</title>
<link>{{ shop.url }}{{ variant.url }}</link>
<description>{{ productDescrition | strip_html | strip_newlines | replace: '&', '&' }}</description>
<g:google_product_category>{{ GoogleProductCategory | replace: '&', '&' }}</g:google_product_category>
<g:item_group_id>shopify_{{ CountryCode }}_{{ product.id }}</g:item_group_id>
<g:id>shopify_{{ CountryCode }}_{{ product.id }}_{{ variant.id }}</g:id>
<g:condition>new</g:condition>
<g:price>{{ variant.price | money_without_currency }} {{ shop.currency }}</g:price>
<g:availability>{% if variant.available %}in stock{% else %}out of stock{% endif %}</g:availability>
<g:image_link>http:{% if variant.image.src %}{{ variant.image.src | product_img_url: 'grande' }}{% else %}{{ product.featured_image.src | product_img_url: 'grande' }}{% endif %}</g:image_link>
<g:gtin>{{ variant.barcode }}</g:gtin>
<g:brand>{{ product.vendor }}</g:brand>
<g:mpn>{{ variant.sku }}</g:mpn>
<g:product_type>{{ product.type }}</g:product_type>
<g:age_group>{{ AgeGroup }}</g:age_group>
{% unless Color == "" %}<g:color>{{ Color | strip_html | strip_newlines | replace: '&', '&' }}</g:color>{% endunless %}
{% unless Size == "" %}<g:size>{{ Size | strip_html | strip_newlines | replace: '&', '&' }}</g:size>{% if product.type == "Apparel" %}<g:size_system>US</g:size_system>{% else %}{% endif %}{% endunless %}
<g:gender>{{ Gender }}</g:gender>
<g:custom_label_0>{{ product.metafields.google.custom_label_0 }}</g:custom_label_0>
<g:custom_label_1>{{ product.metafields.google.custom_label_1 }}</g:custom_label_1>
<g:custom_label_2>{{ product.metafields.google.custom_label_2 }}</g:custom_label_2>
<g:custom_label_3>{{ product.metafields.google.custom_label_3 }}</g:custom_label_3>
<g:custom_label_4>{{ product.metafields.google.custom_label_4 }}</g:custom_label_4>
<g:shipping_weight>{{ variant.weight | weight_with_unit }}</g:shipping_weight>
</item>
{% endfor %}
{% endfor %}
</channel>
</rss>
{% endpaginate %}
from shopifyscripts.
Final thought: are you assigning this template to your collection? That should happen on the collection page itself. You can select your template towards the bottom right.
from shopifyscripts.
Thanks @samthaman
"are you assigning this template to your collection?" Yep
"You can assign the categories during a .csv product upload to shopify, or through the Shopify Google Shopping App." I have been trying to find how to do this.. as I don't see anything in the google shopping app that lets me edit products and I don't see anything in products that lets me edit using the google shopping app.
from shopifyscripts.
In the app, click into a product and then change values as needed here:
from shopifyscripts.
Ah that's it... I assumed that the link in google shopping app was a link to the product page.... hadn't realized that it was a link to adjust the specific google shop settings. Thanks.. now I am getting somewhere lol.
from shopifyscripts.
Makes automation a bit cumbersome needing to go into each and assign a category as well as demands a color variant be created... and if an existing color variant does exist but isn't called straight up "color" it wants you to modify it to color.. i.e. rename "metal color" to just "color.
from shopifyscripts.
Seems like this is resolved. Sorry for not getting involved earlier. Thanks @samthaman for troubleshooting. Closing this issue.
from shopifyscripts.
Related Issues (12)
- Wrap Title and Description in XML feeds with <![CDATA[
- Pass Facebook Debug Check
- Facebook. Missing ID
- Filter products by Google Shopping Channel availability
- Dynamic Remarketing: Hand currency properly for AUD
- Missing google product category
- Add AUD support to remarketing tags
- Remove color from Title if color already in title HOT 1
- Add support for Sale price HOT 1
- Add option to ignore GTIN
- No longer working (facebook catalogue) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shopifyscripts.