Zip code is not working when i add in delivery customization app

Solved

Zip code is not working when i add in delivery customization app

outorigin
Shopify Partner
6 0 0
query RunInput {
  cart {
    deliveryGroups {
      deliveryAddress {
        provinceCode
       zip
      }
      deliveryOptions {
        handle
        title
      }
    }
  }
}
In run.js
// @TS-check
/**
* @typedef {import("../generated/api").RunInput} RunInput
* @typedef {import("../generated/api").FunctionRunResult} FunctionRunResult
* @typedef {import("../generated/api").Operation} Operation
*/


/**
* @Anonymous {RunInput} input
* @returns {FunctionRunResult}
*/
export function run(input) {

    let toRemove = input.cart.deliveryGroups
          .filter((group) => {
            return group.deliveryAddress.zip == "V0N1M0";
          })
          .flatMap(group => group.deliveryOptions)
          .map(option => /** @type {Operation} */({
            hide: {
              deliveryOptionHandle: option.handle
            }
          }));
 
    return {
      operations: toRemove
    };

};
Accepted Solution (1)

SealSubs-Roan
Trailblazer
737 58 71

This is an accepted solution.

Hi @outorigin !

 

Are you using an application for this? If yes, it would be best to reach out to the app developer as they have the ability to check the back end settings or code of their to see where the issue is coming.

Roan
Please let me know if it works by marking it as a solution!
Seal Subscriptions App, a subscription app for Shopify, with glowing user testimonials and a free plan.

View solution in original post

Replies 2 (2)

SealSubs-Roan
Trailblazer
737 58 71

This is an accepted solution.

Hi @outorigin !

 

Are you using an application for this? If yes, it would be best to reach out to the app developer as they have the ability to check the back end settings or code of their to see where the issue is coming.

Roan
Please let me know if it works by marking it as a solution!
Seal Subscriptions App, a subscription app for Shopify, with glowing user testimonials and a free plan.
outorigin
Shopify Partner
6 0 0

No, I'm using Discount Customization for this.
Thanks by the way.
The issue is resolved now.