FROM CACHE - en_header

Custom shipping rates with custom app, read order notes data

rameezs
Tourist
5 0 1

Hi, 

 

So my Shopify app (argo.qa) asks the user for a delivery location (within my country) on checkout. In the backend the pinned location's coordinates are saved in the order's notes attributes. I currently only offer one standard delivery rate, but I'd like to offer more rates depending on how far away from the city you are. So would it be possible to make a Shipping rate app that can read the pinned delivery location from the checkout (now in my order notes attributes), and generate a shipping price based on that? If so, could anyone point me in the right direction of how I might go about doing it?

 

Thanks

Reply 1 (1)
nemanjabrisqq
Shopify Partner
2 0 0

I have a similar issue. The custom carrier service receives origin and destination without coordinates and I need coordinates to calculate distance.
Is there any way to get coordinates within the locations?
Payload example:

 

"rate": {
			"origin": {
				"country": "GB",
				"postal_code": "SE22 8DL",
				"province": "ENG",
				"city": "london",
				"name": null,
				"address1": "london",
				"address2": "",
				"address3": null,
				"phone": "12345678",
				"fax": null,
				"email": null,
				"address_type": null,
				"company_name": "brisqqstore"
			},
			"destination": {
				"country": "GB",
				"postal_code": "SW10 9TN",
				"province": "ENG",
				"city": "London",
				"name": "testing",
				"address1": "363 Fulham Road",
				"address2": "",
				"address3": null,
				"phone": null,
				"fax": null,
				"email": null,
				"address_type": null,
				"company_name": null
			},