-
Hi, I'm trying to add a gift card product to the cart in Hydrogen, while adding custom attributes such as Here's const lines = [
{
merchandiseId: selectedVariant.id,
quantity: 1,
attributes: [
{
key: 'Recipient Name',
value: recipientName.trim() || '',
},
{
key: 'Recipient Email',
value: recipientEmail.trim() || '',
},
{
key: 'Message',
value: recipientMessage.trim() || '',
},
{
key: '__shopify_send_gift_card_to_recipient',
value: 'on',
},
],
},
] Additionally, the gift card product has been published to the online store and one of the Hydrogen channels which is used for tesing. Could you tell me if I am missing something? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Oh I found the problem... You can't use |
Beta Was this translation helpful? Give feedback.
Oh I found the problem...
You can't use
[Recipient Name]
. Instead,[Recipient name]
is the correct attribute name.