vuestorefront / vue-storefront-1

The open-source frontend for any eCommerce. Built with a PWA and headless approach, using a modern JS stack. We have custom integrations with Magento, commercetools, Shopware and Shopify and total coverage is just a matter of time. The API approach also allows you to merge VSF with any third-party tool like CMS, payment gateways or analytics. Newest updates: https://blog.vuestorefront.io. Always Open Source, MIT license.
https://www.vuestorefront.io
MIT License
19 stars 13 forks source link

Load available regions and use select HTML tag #380

Open Fifciu opened 4 years ago

Fifciu commented 4 years ago

What is the motivation for adding / enhancing this feature?

Currently, State/Region is text field. In my opinion, it should be select with loaded regions from the backend.

What are the acceptance criteria

Version of Vue Storefront

Can you complete this feature request by yourself?

hcmlopes commented 3 years ago

@Fifciu I made a comment related to this in https://github.com/vuestorefront/vue-storefront/pull/4770

My question is. Should we use the countries endpoint in magento directly or should this be something that gets entered into the Elastic index?

Also have you started any work and do you have any further guidance on this, it is a feature I need and I was going to tackle it starting today as a separate module called vsf-countries-and-regions

Fifciu commented 3 years ago

I've implemented it in many shops in the previous job. However, nowadays I wonder if it would not be better to hardcode list of available ones.

Putting it in ES might be a good idea. However, I've fetched it directly from Magento2 and cached response for the very long time