The Multi-Location Inventory Info App provides a guide on leveraging Shopify’s metafields to seamlessly integrate custom data into product notes, enhancing the shopping experience.
Note: This advanced customization requires changes to liquid files in your theme. If you seek help with this, you may contact our support team.
This sample custom metafield definition was created by clicking Products > Add definition, as “Single line text” type.
The below example shows the value of custom.delivery_info being stored in the “product_delivery_info” variable.
<script>
window.product_delivery_info = ‘{{product.metafields.custom.delivery_info}}’;
</script>
Below is an example of using product_delivery_info within the Location notes field:
{{window.product_delivery_info}}
To get to the Location notes setting, click Location settings from the Inventory Widget.