I have a code for Estimate delivery date for my product pages. Using custom CSS section and using the metafields. Works great.
However, I’m wanting to add range date and location from where the customer are from for better estimation dates, USA has different shipping times than Canada.
How can I add range date and location detection? Thanks
Hello @xnyjyh , To display the range date create another meta field “Range Date For Delivery” and replace your code with the below code. Also, Replace the meta field code for “product.metafields.custom.range_date_for_delivery” with your meta field.
this is the current metafield i had. on the product page I get only one option to input a number. with this new code, how would I set up the metafield and what would I input in the product metafield option?
Hi @xnyjyh
You can use the above code to set the delivery date using metafields. For location functionality, you need to use the Location API. This API allows us to detect the customer’s location and update the date range accordingly. Feel free to contact me if you have any questions.