let map; let marker; function initMap() { map = new google.maps.Map(document.getElementById("map"), { center: { lat: 53.5461, lng: -113.4938 }, // Default center, e.g., Edmonton zoom: 10, }); map.addListener("click", (event) => { placeMarker(event.latLng); }); } function placeMarker(location) { if (marker) { marker.setPosition(location); } else { marker = new google.maps.Marker({ position: location, map: map, }); } // Pass the location to calculate delivery rate calculateDeliveryRate(location); } $w("#timeSlotDropdown").options = [ { label: "9:00 AM - 11:00 AM", value: "9-11" }, { label: "11:00 AM - 1:00 PM", value: "11-1" }, { label: "1:00 PM - 3:00 PM", value: "1-3" }, ]; function proceedToCheckout() { const deliveryDetails = { address: marker.getPosition().toString(), rate: $w("#deliveryRate").text, timeSlot: $w("#timeSlotDropdown").value, }; // Add custom order details to the checkout flow wixStores.addProductToCart("productID", { options: { DeliveryDetails: JSON.stringify(deliveryDetails) }, }).then(() => { wixLocation.to("/checkout"); }); }
top of page
IMG_0575_edited.jpg

About Us

Greencut Group first made its appearance in 2015, we started off from humble beginnings with just a simple Zero turn lawn mower and a desire to turn our clients’ ideas into reality. This model has gotten us to where we are today.


In the construction industry we often get sidetracked with the size of a project,  We like to focus on our clients and how much the particular project means to them, most clients are spending a large portion of their budget on a particular project, we take that seriously, we are very careful that we take care of every detail that matters, from the budget to our workmanship.  We hope we can be of service to you and turn your ideas into reality.

About: About Us

©2022 by Greencut Group. Proudly created with Wix.com

bottom of page
async function calculateDeliveryRate(destination) { const origin = "123 Aggregate Rd, Edmonton, AB"; // Your loading center const apiKey = "YOUR_API_KEY"; const url = `https://maps.googleapis.com/maps/api/directions/json?origin=${origin}&destination=${destination.lat()},${destination.lng()}&key=${apiKey}`; const response = await fetch(url); const data = await response.json(); if (data.routes && data.routes.length > 0) { const distance = data.routes[0].legs[0].distance.value / 1000; // Distance in km const deliveryRate = calculateRate(distance); displayDeliveryRate(deliveryRate); } } function calculateRate(distance) { const baseRate = 50; // Base delivery fee const perKmRate = 2; // Per km charge return baseRate + distance * perKmRate; } function displayDeliveryRate(rate) { $w("#deliveryRate").text = `$${rate.toFixed(2)}`; }