Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Rename Local Delivery Option In One-Page Checkout

Rename Local Delivery Option In One-Page Checkout

jamalali81
Shopify Partner
25 0 4

We offer local delivery to our customers but want to rename the option that appears on one-page checkout. I have implemented this tutorial (I have only removed the zip code filter) and it does rename the standard delivery option but not the local delivery one.

 

Here is my code:

export function run(input) {
const message = "May be delayed due to weather conditions";

let toRename = input.cart.deliveryGroups
.flatMap(group => group.deliveryOptions)
.map(option => ({
rename: {
deliveryOptionHandle: option.handle,
title: option.title ? `${option.title} - ${message}` : message
}
}));

return {
operations: toRename
};
};

 

Here is a screenshot of the checkout page:

Screenshot 2024-01-02 at 22.45.15.png

Here is a screenshot of the function run details:

Screenshot 2024-01-02 at 22.44.58.png

Replies 4 (4)

Liam
Community Manager
3108 344 902

Hi Jamalali81,

 

From what you've shared this should work - but I've reached out to our product team to see if this is an intended limitation. 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

jamalali81
Shopify Partner
25 0 4

Thank you! Please keep me updated.

jamalali81
Shopify Partner
25 0 4

Hi Liam, looks like local delivery options cannot be renamed.

 

Screenshot 2024-01-07 at 02.14.48.png

 

Take from this page. Is there a reason for this?

Liam
Community Manager
3108 344 902

Hi again Jamalali - it does indeed look like this is not currently possible. I'll connect with our internal dev teams though to see why this is and to make a feature request to be able to programmatically adjust the name. 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog