I would like both unlogged in and logged in users to be able to run a search which returns which businesses in the database deliver to their address.
Businesses have entered their address into the db and stated how far from their address they are willing to do delivery.
Subsequently, a customer could have 2 businesses that are both 10km away from them however, only 1 business will deliver to them as their radius for delivery is 20km and the other business will not deliver as their radius for delivery is only 5 km.
How will the pink customer return only the blue businesses in their results?
Hi. I’m just searching for a very similar solution. Did you every sort out your conditional search logic constraint?
I’ve managed to create the logic to search for results within a predefined distance but not the ‘the distance between customer and business is less than or equal to the business’ max delivery radius. ’ part.