Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Shopify Flow App - Product Metafield size charts

Shopify Flow App - Product Metafield size charts

divisionxmadi
Shopify Partner
7 0 0

Hi,

 

We've just implemented a new product Metafield for front-end sizing charts. These sizing charts are based on specific pages and have separate uses e.g. Mens Underwear, Girls Bras. 

 

The metafield is set up like this:

divisionxmadi_0-1714535250109.png

 

We want the metafield to add itself once new products are added. Happy to create multiple versions for our individual categories, however need some help to determine the original layout/format. 

 

Trying to implement a flow that follows this logic:

- product added to store

- check if metafield is empty

- check tags are equal to (e.g.s Mens Underwear) 

- Update product metafield to size guide - Mens underwear page

 

Is this possible with how the product metafield is setup?

 

 

Replies 2 (2)

tim
Shopify Partner
3911 394 1435

Flow seems to be simple, but the metafield setup can be a bit problematic IMHO.

 

See how my action looks for updating metafield of type "Page reference"

Screenshot 2024-05-01 at 2.25.42 pm.png

This works for my test, and may be it's not the only way to create metafield of this type (what do you think, @paul_n?).

 

The problem is obvious -- the person who creates the Flow would need to obtain this ID for Value.

Looks like the number matches the last part of the URL shown while you're editing the page object in question (for example the page  from the screenshot is found in my my store admin under address https://admin.shopify.com/store/XXX/pages/84085506102), but I am not sure it's the proper supported way.

 

I'd probably consider rather using the page handle, which is easy to obtain and easy to use in liquid.

 

Also, I doubt you already have a section or block in your theme which accepts metafield of this type, so would need some theme coding or Custom liquid anyway.

 

Even if you will assign these metafields manually, getting the page handle is trivial.

Obviously, picking a page from drop-down is easier, so it all depends on proportion between manual edits and assignments done by flow.

 

 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
paul_n
Shopify Staff
1433 157 332

Not much extra to add here. I've seen a lot of merchants doing this exact use case. 

 

We do have plans to add an easier way to set metafield "references" like page but it's likely not coming short-term. 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.