All things Shopify and commerce
Hey everyone,
I’m trying to use Metaobjects to connect to a product variant to bypass inventory tracking. Specifically, I want to assign my product variants (P-Clamp sizes in my case) without using Shopify’s default variant system.
I have been working with shopify support, and he has been able to set up one test product metafield/object that is able to sucessfully connect to one of my product variant. In this case, it is P-Clamp Selection V2 under product metafield.
However, when I try to select a new entry and enter my own description under that metafield, it comes up with a handle tag (If that's the right word), instead of the description I want to display on my website.
It won't let me keep my original description either, and is forcing me to delete them (highlighted text in orange), before I can save.
The example is highlighted in blue.
How do you create entries under that metafield without that format showing up?
For that highlighted blue text, I originally typed in P-Clamp (16mm I.D)
Solved! Go to the solution
This is an accepted solution.
Hey everyone,
I wanted to follow up and close out this discussion. Originally, my intent for connecting a specific variant of my product to a metafield or metaobject, was to exclude a selectable variant from being inventory tracked. It turned out this didn't work anyways.
Here's what I ended up doing to resolve my issue by:
1. Creating a new page template under "Product" in Shopify. You'll be modifying this particular template, and
for this example, I'm calling the template Custom
Then, going to my product settings, adding a new block under "Custom Liquid"
Custom Liquid
Here is where you are going to input a code in the custom liquid, that is generated using the link below.
You can select the button type, whether it's required before customers can add it to check out, or whether or not you want this information captured on the order summary or checkout pages by selecting "show at checkout", ect.
Under this section "Options if using radio buttons, a drop-down select, or checkbox group"
You can type in the selectable options, and you add your options by breaking up the text using ","
Once your done, you copy the code in the clipboard below
Link to the UI Generator
https://ui-elements-generator.myshopify.com/pages/line-item-property
Paste your generated code in the custom liquid box.
If done correctly, you'll see your selectable option pop up to wherever you have arranged your custom variant block. Hit Save if it's what you want.
Then finally, your going to go to your product editing page and go down to "Theme Template" In the drop box.
You will select your custom product theme template you have created with your custom code, to assign only that specific product to your new variant selection to show up.
In my case, I have named my theme template "Custom" for this example.
If done correctly, it should show only on that specific product page. You can test this by turning on Test mode on shopify payment settings, and test the whole checkout process to make sure you see the variant as a note, in your order summary.
This solves the problem when you want a customer to be able to select a variant as a note, but NOT having it tracked by inventory, without an App.
Thanks to everyone who contributed
don't think that makes much sense. each variant is it's own sku. either it is tracked or not based on the item itself / sku. why would a metafield effect the variant inventory? a metafield doesn't change the sku. it just gives extra details of the product
I don't want the P-Clamp selection to be under it's own SKU. If you include that in the variant, it will be tracked.
I'm attempting to use metafield to exclude it from being tracked.
metafields do not change the product or order
what you could do is code a cart attribute to the page. it would just be a note added to an order. it cannot effect the price or inventory. just some text in the notes section
I appreciate the insight, is there a way to add a selectable button in a specific product page instead of adding a cart attribute?
you could code a dropdown but there is not point in doing so if the information is never going to get to you.
why would you want a selectable button that the customer clicks if you never see what they click?
This is an accepted solution.
Hey everyone,
I wanted to follow up and close out this discussion. Originally, my intent for connecting a specific variant of my product to a metafield or metaobject, was to exclude a selectable variant from being inventory tracked. It turned out this didn't work anyways.
Here's what I ended up doing to resolve my issue by:
1. Creating a new page template under "Product" in Shopify. You'll be modifying this particular template, and
for this example, I'm calling the template Custom
Then, going to my product settings, adding a new block under "Custom Liquid"
Custom Liquid
Here is where you are going to input a code in the custom liquid, that is generated using the link below.
You can select the button type, whether it's required before customers can add it to check out, or whether or not you want this information captured on the order summary or checkout pages by selecting "show at checkout", ect.
Under this section "Options if using radio buttons, a drop-down select, or checkbox group"
You can type in the selectable options, and you add your options by breaking up the text using ","
Once your done, you copy the code in the clipboard below
Link to the UI Generator
https://ui-elements-generator.myshopify.com/pages/line-item-property
Paste your generated code in the custom liquid box.
If done correctly, you'll see your selectable option pop up to wherever you have arranged your custom variant block. Hit Save if it's what you want.
Then finally, your going to go to your product editing page and go down to "Theme Template" In the drop box.
You will select your custom product theme template you have created with your custom code, to assign only that specific product to your new variant selection to show up.
In my case, I have named my theme template "Custom" for this example.
If done correctly, it should show only on that specific product page. You can test this by turning on Test mode on shopify payment settings, and test the whole checkout process to make sure you see the variant as a note, in your order summary.
This solves the problem when you want a customer to be able to select a variant as a note, but NOT having it tracked by inventory, without an App.
Thanks to everyone who contributed
looks great. I have this setup but where is the code that transposes the information into the order notes? that has been the hard part. I did it for a custom registration page but never got it working for the product page to the order to the notes.
I'm not tech savvy so I'm having a hard time understanding what your trying to articulate.
But if what your trying to ask is, where is the code you would use to paste into the custom liquid,
it would be in the bottom of this page to copy the link, after you input the information you'd need.
If you check "show at checkout", it will show in your order notes after the customer submits the order.
You can test this by putting shopify in test mode under payment, and placing an order on one of your own product, to see if that variant selection shows up.
https://ui-elements-generator.myshopify.com/pages/line-item-property
and the information shows up in the notes of the order?
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025