Countries and Rates Card
CountriesAndRatesCard component enables merchants to select whether a discount will apply to all countries or to specific countries. The merchant can also provide an upper bound for shipping rates so that a discount can be limited only to shipping situations that are financially viable for the merchant.
||Whether a discount applies to all countries or to specific countries.||Yes|
||The specific country codes that a discount applies to.||Yes|
||Whether the discount only applies when shipping rates are under a certain amount.||Yes|
||The maximum shipping rate where the discount applies.||Yes|
||The widget the enables users to select countries.||Yes|
||The currency code used for the maxiumum shipping price input.||Yes|
Example codeAnchor link to section titled "Example code"
CountrySelectorAnchor link to section titled "CountrySelector"
The following code is an example of the
CountryPickerAnchor link to section titled "CountryPicker"
To load the list of countries where the merchant can ship, we need to query the GraphQL API. In the following
./authenticatedGraphQL is used to proxy the GraphQL request: