Jump to content

calculating shiping cost by grouping products into suppliers


pat.motsumi

Recommended Posts

I would like to  achieve the following for shipping estimates

1. Get all products in the cart and populate in another array

e.g 

$customerequest =  '{
  "items": [
    {
      "name": "Shoes",
      "description": "yello",
      "imageUrl": "string",
      "isFragile": false,
      "length": 2,
      "width": 2,
      "height": 2,
      "mass": 2,
      "quantity": 1,
      "locationFrom": {
        "locationName": "Gaborone",
        "lat": -24.6523693,
        "lng": 25.9036909
      }
    }
  ],
  "customer": {
    "firstName": "Firstnamr",
    "lastName": "lastName",
    "phoneNumber": "+675190199983",
    "email": "[email protected]"
  },
  "reference": "7754874"
}';

2. Get product location in terms of coordinates to an array

e.g "locationFrom": {
        "locationName": "Gaborone",
        "lat": -24.6523693,
        "lng": 25.9036909
      }

3. Enforce suppliers or sellers to input their shop coordinates 

4. shipping estimate for multiple products from different suppliers

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...