Metafield value in order details

PBoss
New Member
7 0 0

Hey all!

 

I have a phone case business and trying to add phone models as metafields on the products (for example: I have a case design called "Foxy". In the product I can choose the phone model (that's the metafield, so it points to a different product)). My problem is that the different "Foxy" cases all called "Foxy" (the url changed regarding the phone model), but in the checkout, it's not showing which one, only the standard variation values. Is there any way to add the metafield value to the checkout (in my case the metafield value: IPhone 15 Pro Max) and order details?

 

 

Thank you!

Replies 3 (3)

LuffyOnePiece
Shopify Partner
607 87 105

Hi @PBoss ,

 

We do have to pass the metafield as the line item properties.

 

<p class="line-item-property__field">
  <label for="model">Model</label>
  <input id="model" type="text" name="properties[Model]" value="{{ product.metafield.custom.model.value}}">
</p>

Please don't hesitate to reach out if you need further help optimizing or customizing your store. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

 

Best Regards,
LuffyOnePiece

 

 

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184
PBoss
New Member
7 0 0

That's great! But where do I need to add it?

 

Thanks!

LuffyOnePiece
Shopify Partner
607 87 105

Hi @PBoss ,

 

We do need to add the code in the product form.

 

Thanks

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184