Skip to content

Cancellable: How to use metafield to setup Cut off time for cancellation for event type product variant

soulchild edited this page Dec 18, 2023 · 2 revisions

This feature allows you to setup different cut-off time (ie. the time which an order containing that product can no longer be cancelled).

1. Enable cutoff time in the app

First, You need to enable the cut off time override in Cancellable app > Fulfillment page, and click "Save".

fulfillment

enable cut off time

2. Create metafields

Next, you need to create a metafield definiton for product, you will need to use one metafield to set the cut off time for the product.

Go to your store Settings, select Custom Data > Metafields, then select either "Products" (if the cut off time is same across all variant in product), or "Variants" (if the cut off time is different for each variant in product)

metafields settings

Select "Products / Variants" , and click Add definition.

products metafield

In the defintion, fill in details as below (you can copy paste) :

Name: Cancellation Cutoff Time

Namespace and key: cancellable.cutoff_time

For content type, select "Date and time"

metafield definition

Click "Save", and you should see a definition created as shown below :

definition output

3. Set cutoff time on product / variant

In your Shopify Admin, go to your product detail page (All products > select your product, or variant),then scroll to bottom until you see "Metafields", then click on the "cutoff time" metafield area.

product metafields

Select the cutoff date / time you want for the product, as in after this time, the order containing this product cannot be cancelled.

set product cutoff time

Then click "Save" , and repeat this process to other products that you want to set cutoff time for.