kartoza / GeoHosting

https://kartoza.github.io/GeoHosting/
GNU Affero General Public License v3.0
0 stars 0 forks source link

patch: update currency based on location #122

Closed tinashechiraya closed 2 months ago

tinashechiraya commented 2 months ago

Description

The user will be prompted to allow access to location so product price and currency can be adjusted according to users location

Adjustments:

dimasciput commented 2 months ago

@tinashechiraya

Let's avoid fetching another API here. Instead, we can change the API that retrieves product details to POST request. The React frontend can send the user's location (if available) to the server, and the server will handle pricing logic and return the products with the correct prices.

For example, the current API to get product details:

https://geohosting.dev.do.kartoza.com/api/products/G3W/

Let's convert this to a POST request, with the frontend adding the user's location if it exists.

meomancer commented 2 months ago

Thank you @tinashechiraya Please create test for this @meomancer done

meomancer commented 2 months ago

@tinashechiraya Please split the function:

meomancer commented 2 months ago

LGTM Thank you @tinashechiraya