Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI Extensions]: Include Shop Location in Checkout API #1334

Open
dhruveonmars opened this issue Sep 12, 2023 · 3 comments
Open

[UI Extensions]: Include Shop Location in Checkout API #1334

dhruveonmars opened this issue Sep 12, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@dhruveonmars
Copy link

Please list the related package(s)

  • checkout-ui-extensions

If this related to specific APIs or components, please list them here

  • useShop seems the most appropriate

Is your feature request related to a problem? Please describe.

  • Checkout.liquid and liquid in general has shop.address.country.iso_code which allowed us to do specific things according to the shop location, for compliance, etc, while this isn't possible in Checkout Extensibility

Describe the changes you are looking for

  • Adding an address object in useShop, so we can do something like the following
const address = useShop().address
OR
const territory = useShop().address.country

if (territory.iso_code == 'US') {
... 
} else if (territory.iso_code == 'GB') {
...
} else {
...
}

Describe alternatives you’ve considered

  • Thought about adding a cart attribute in the theme, but this seems extremely tricky to manage and easy to end up being missed/incorrect, eg if customer gets to the checkout via a third party sales channel
@dhruveonmars dhruveonmars added the enhancement New feature or request label Sep 12, 2023
@dnagoda
Copy link
Contributor

dnagoda commented Sep 12, 2023

@dhruveonmars Thanks for the request. I've added it to the backlog for review.

@dhruveonmars
Copy link
Author

Hey @dnagoda, just wanted to check if there was any movement on this, or if there was any idea on timelines?

@dnagoda
Copy link
Contributor

dnagoda commented Oct 25, 2023

Hi @dhruveonmars, no updates or timeline yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants