You can add a metafield, name Shelf Location on variants of the products.
Then, you can add specific shelfs on each variants.
When you receive an order for the variants, you can click on the product and view the shelf data on meta field section (named: Shelf Location in this case).
Is that what you were looking for?
Please let me know if it was something else that you were looking for.
Thank you.
Sajat
Was my reply helpful? If yes, Mark this reply as Solution so that others can find the solution easily.
You can find it in the file related to the product page, which may be main-product.liquid or buy-button.liquid
{%- form ‘product’,
product,
id: product_form_id
-%}
{%- endform %}
Add the code.
{%- form 'product',
product,
id: product_form_id
-%}
{%- endform %}