Creating Collections and Shopify Taxonomy Bug

AlohaAkahai
Shopify Partner
68 3 25

Creating collections by on Product Category is currently broken as  Shopify Taxonomy does  not function any longer. 

 

There is 1 error with this collection:

Product taxonomy node id missing or invalid. Please provide an id from the Shopify Product Taxonomy.

shopify.PNG

 

Replies 6 (6)

Kris_Doyle
Shopify Partner
140 1 42

I know this one is a little older, but it looks like we're running into an issue with creating collections using PRODUCT_TAXONOMY_NODE_ID rules.

 

We just keep getting 422 - Unprocessable Entity when we try to create collections containing PRODUCT_TAXONOMY_NODE_ID rules.

 

We're an app developer by the way. Anyone on the @Shopify team able to help?

jkhamler
Shopify Partner
3 0 0

Hello!

Were you able to get this working? It seems I have the exact same issue - I cannot set the productCategory (containing the taxonomy ID) no matter how I try - REST API/GraphQL (on create and update)

Is there a fundamental bug in the system?

Thanks

Jon

Kris_Doyle
Shopify Partner
140 1 42

Hi @jkhamler ,

 

It was a while ago for us, but I believe the solution was to specify the column name:

PRODUCT_TAXONOMY_NODE_ID

and then for the value (the taxonomy ID), we used:

gid://shopify/ProductTaxonomyNode/{numeric_taxonomy_node_id}

Where the taxonomy ID is from this list: https://help.shopify.com/txt/product_taxonomy/en.txt 

 

Hope this helps 🙂

jkhamler
Shopify Partner
3 0 0

Thanks so much @Kris_Doyle that does work! Well... almost 😉

The product category only gets set from the second product pushed in. It's almost as if the first try initialises a value for the product category which can then be used from the second row onwards. 

Did you encounter this at all?

        $product->product_category = [
            'product_taxonomy_node_id' => [
                'id' => "3077"
            ]
        ];
Kris_Doyle
Shopify Partner
140 1 42

Hey @jkhamler ,

 

The way we implemented it was to generate the GraphQL with multiple rule conditions. I see how you have it though which I guess wouldn't work because you'd end up with duplicate keys.

 

Is there a way you can add multiple categories? Or are you bound to just one?

jkhamler
Shopify Partner
3 0 0

Hey @Kris_Doyle ,

Thanks for coming back to me (again) 🙂

All the products we are trying to push use a single category. We just want to set the Product Category of each product to this as we push in via the REST API.

 

3077 - Home & Garden > Decor > Artwork > Posters, Prints, & Visual Artwork