update for contact number
This commit is contained in:
parent
d0a274dabe
commit
79280eeee3
12
server.js
12
server.js
@ -206,14 +206,10 @@ app.post('/create-order', async (req, res) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (customerData.contact_phone || customerData.contactNumber || customerData.contact_number) {
|
orderPayload.order.note_attributes = [
|
||||||
orderPayload.order.note_attributes = [
|
{ name: "Contact Number", value: customerData.contact_number || "" },
|
||||||
{
|
{ name: "Courier", value: customerData.courier || "" }
|
||||||
name: 'Contact Number',
|
];
|
||||||
value: customerData.contact_phone || customerData.contactNumber || customerData.contact_number
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
const shopifyResponse = await fetch(`https://${process.env.SHOPIFY_STORE_DOMAIN}/admin/api/2024-01/orders.json`, {
|
const shopifyResponse = await fetch(`https://${process.env.SHOPIFY_STORE_DOMAIN}/admin/api/2024-01/orders.json`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user