Giter Site home page Giter Site logo

sofyansitorus / woocommerce-shipping-distance-matrix Goto Github PK

View Code? Open in Web Editor NEW
29.0 3.0 11.0 1.39 MB

WooCommerce shipping rates calculator based on products shipping class and distances that calculated using Google Maps Distance Matrix API.

Home Page: https://wordpress.org/plugins/wcsdm/

PHP 66.56% JavaScript 29.15% SCSS 2.21% Shell 2.07%
woocommerce woocommerce-extension shipping-module woocommerce-shipping

woocommerce-shipping-distance-matrix's People

Contributors

dependabot[bot] avatar engkhaledb avatar sofyansitorus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

woocommerce-shipping-distance-matrix's Issues

Not save anything

I want to used( wcsdm ) in our woo-commerce but after insert value and push the save button nothing save!
and after the refresh page, everything is back to default.
So could you help me how to fix this problem?

Store Location Latitude and Longitude is required

I added you plugin in word press, I also got an api key from google. the map showed 1 second then I got the error:
Oops! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.
Actually the address is already set for the woocommerce plugin.
Do you have any idea for what is going on?
Looking forward to hearing from you.
Peter

get_destination_info don't use customer address field

Hi,

I activated the address field for calculated shipping using the filter filter_woocommerce_shipping_calculator_enable_address but still wasn't used.
After some debug the problem is that the $fields_default doesn't have any field with the name address but with the name address_1, so I had to fix using:

$field_data = isset( $fields_default[ $field ] ) ? $fields_default[ $field ] : false;
if ($field == 'address') {
    $field_data = isset( $fields_default[ 'address_1' ] ) ? $fields_default[ 'address_1' ] : false;				
}
if ( empty( $field_data ) ) {
    continue;
}

Do not enqueue frontend scripts when the shipping is disabled

If you activate the plugin, and add the shipping method to any shipping zone with status is disabled, the frontend script is still enqueued. This can make confusion when people seeing the address 1/2 fields on the shipping calculator form and will assuming that the shipping method is active

YITH WooCommerce Delivery Date Integration

We are using this plugin the "YITH WooCommerce Delivery Date" and the YITH adds two new fields to the latest table that is being hidden in your case.

inline-1016487138

We had to edit the css to be able to edit the fields.

Better postcode validation

Please allow users to override your validate_postcode function. It is wrong for LV postcodes and there's no way to fix it without losing the fix upon plugin update.

Ideally, you should implement your validation as a filter (WC_Validation::is_postcode invokes the woocommerce_validate_postcode filter).

If that is not an option for some reason, you should provide a filter of your own that works identically to woocommerce_validate_postcode.

LV postcodes are usually formatted as "LV-1234" and practically never as "1234".

Cheers.

Checkout page header issue

Once I installed the plugin, the header of the checkout page does not show up, neither the image assigned to the page.

Any idea? I'm also using Elementor.
Thanks a lot

This API project is not authorized to use this API.

Hi sir,

Maybe, I am doing something wrong but, the plugin seems to use its own api key set on a constant called "WCSDM_MAP_SECRET_KEY", which is decode in the main js file ( wcsdm.js ), to load and execute the google maps api script using the wrong api key rather than the one that I've set in the Api key field on the "Shipping Distance Matrix Settings" popup.

I've tested it on a brand new wp installation so that there is no conflict.

Thank you for your time.

Cheers!

frontend adress picker

hi, I was using this plugin for a food delivery store, this is the only option for calculate the shipping cost that i find and work. Only in some cases the shipping cost is wrong and I need it to be more accurate with the frontend adress picker

my question is if there is a pro version (I would pay for it) or if there is a way to do it

thanks for this plugin

Address via Jquery

I am adding address by using Google Maps Location Picker, so filling the fields with jQuery. shipping does not calculate while i set address with jQuery. if i do manually it works fine. Can you please guide?

Use different API keys for admin map than Distance Matrix API

The plugin currently loads the frontend maps Javascript API based on the API key that's entered into the configuration screen. This API key is also used to make server-side requests to the Distance Matrix API.

My issue is that I would like to restrict the API keys I have generated for just my usage, but Google does not allow you to specify both an HTTP referrer restriction (for the admin map usage) and an IP address restriction (for the server-side distance matrix calculation), and therefore it's not possible to use one API key for both purposes if one wishes to restrict it.

Would it be possible to add two filters to set an API key for the javascript maps API and the distance matrix API? Then there wouldn't be a need to set them more than if multiple instances of the plugin are used, and in my use case, would allow me to set them in the filter via an ENV variable.

Thanks,
Sam

Possibility of more rules

Brilliant plugin, thank you!

I would love a way to make free delivery for a minimum spend amount and within a certain distance range.
If the minimum spend is not reached, the free delivery should not be available.
And if a client is beyond a certain distance, free delivery should also not be available.

Nos showing in a guest session

Hello, first of all i have to thank you for this excellent plugin nonetheless i need it to work even without an account.

When i enable my clients to buy as a guest the shipping option is not been showed. Please help.

multiple shipping option availble for short distance need one option

Hi
I have created one shipping zone and 3 shipping method.

Shipping method 1 is local pickup and it work fine.
Shipping method 2 is wooreer and distance 1-5 km with fixed surcharge
Shipping method 2 is wooreer and distance 6-15 km with fixed surcharge

If I enter address between 1-5 km it still shows the 6-15 km option.
image

My shipping method image.

image

Any advice please?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.