From 8bd3a89f1fded1c7a8ea5e1a0980dc7a767ffa59 Mon Sep 17 00:00:00 2001 From: fPolic Date: Thu, 19 Sep 2024 11:41:43 +0200 Subject: [PATCH 1/2] fix: list so rules on store endpoint --- .../src/cart/workflows/list-shipping-options-for-cart.ts | 2 ++ packages/medusa/src/api/store/shipping-options/query-config.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/core/core-flows/src/cart/workflows/list-shipping-options-for-cart.ts b/packages/core/core-flows/src/cart/workflows/list-shipping-options-for-cart.ts index 767577f3d8e6f..2a82045c51619 100644 --- a/packages/core/core-flows/src/cart/workflows/list-shipping-options-for-cart.ts +++ b/packages/core/core-flows/src/cart/workflows/list-shipping-options-for-cart.ts @@ -36,6 +36,8 @@ export const listShippingOptionsForCartWorkflow = createWorkflow( "stock_locations.fulfillment_sets.service_zones.shipping_options.provider_id", "stock_locations.fulfillment_sets.service_zones.shipping_options.data", "stock_locations.fulfillment_sets.service_zones.shipping_options.amount", + "stock_locations.fulfillment_sets.service_zones.shipping_options.rules.attribute", + "stock_locations.fulfillment_sets.service_zones.shipping_options.rules.value", "stock_locations.fulfillment_sets.service_zones.shipping_options.type.id", "stock_locations.fulfillment_sets.service_zones.shipping_options.type.label", diff --git a/packages/medusa/src/api/store/shipping-options/query-config.ts b/packages/medusa/src/api/store/shipping-options/query-config.ts index 07cb17ccfc3f1..ba6a0a8c25bbe 100644 --- a/packages/medusa/src/api/store/shipping-options/query-config.ts +++ b/packages/medusa/src/api/store/shipping-options/query-config.ts @@ -9,6 +9,7 @@ export const defaultStoreShippingOptionsFields = [ ] export const listTransformQueryConfig = { + defaults: defaultStoreShippingOptionsFields, defaultLimit: 20, isList: true, } From 4eb6267f703a124dfa3b527250171ac14fa5523c Mon Sep 17 00:00:00 2001 From: fPolic Date: Wed, 25 Sep 2024 09:39:41 +0200 Subject: [PATCH 2/2] fix: change rule filter --- .../src/cart/workflows/list-shipping-options-for-cart.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/core-flows/src/cart/workflows/list-shipping-options-for-cart.ts b/packages/core/core-flows/src/cart/workflows/list-shipping-options-for-cart.ts index 2a82045c51619..16a7bd464dca4 100644 --- a/packages/core/core-flows/src/cart/workflows/list-shipping-options-for-cart.ts +++ b/packages/core/core-flows/src/cart/workflows/list-shipping-options-for-cart.ts @@ -54,7 +54,7 @@ export const listShippingOptionsForCartWorkflow = createWorkflow( id: input.sales_channel_id, "stock_locations.fulfillment_sets.service_zones.shipping_options": { context: { - is_return: "false", + is_return: "true", enabled_in_store: "true", }, filters: {