Changeset 3155137
- Timestamp:
- 09/20/2024 11:03:03 AM (19 months ago)
- Location:
- shipping-by-city-for-woocommerce
- Files:
-
- 11 added
- 4 edited
-
assets/screenshot-3.png (modified) (previous)
-
assets/screenshot-4.png (added)
-
tags/1.0.6 (added)
-
tags/1.0.6/changelog.txt (added)
-
tags/1.0.6/class-shipping-by-city-for-woocommerce.php (added)
-
tags/1.0.6/includes (added)
-
tags/1.0.6/includes/cmetric_sbcfw_setting_functions.php (added)
-
tags/1.0.6/includes/css (added)
-
tags/1.0.6/includes/css/admin.css (added)
-
tags/1.0.6/index.php (added)
-
tags/1.0.6/readme.txt (added)
-
tags/1.0.6/shipping-by-city-for-woocommerce.php (added)
-
trunk/includes/cmetric_sbcfw_setting_functions.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (5 diffs)
-
trunk/shipping-by-city-for-woocommerce.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
shipping-by-city-for-woocommerce/trunk/includes/cmetric_sbcfw_setting_functions.php
r2839328 r3155137 126 126 public function woocommerce_package_rates_func( $rates, $package ) { 127 127 128 129 130 128 $shipping_city = $package['destination']['city']; // get shipping city field value 131 129 … … 217 215 if($is_available){ 218 216 $ship_id = $methodvalue->instance_id; 219 $newrate = $methodvalue->cost;217 $newrate = (float) $this->get_shipping_cost_by_instance_id($rates, $ship_id); 220 218 $newrateid = $methodvalue->id.':'.$ship_id; 221 219 $newratelabel = $methodvalue->title; … … 236 234 237 235 $ship_id = $methodvalue->instance_id; 238 $newrate = $methodvalue->cost;236 $newrate = (float) $this->get_shipping_cost_by_instance_id($rates, $ship_id); 239 237 $newrateid = $methodvalue->id.':'.$ship_id; 240 238 $newratelabel = $methodvalue->title; … … 299 297 300 298 } 299 public function get_shipping_cost_by_instance_id($shipping_rates, $instance_id_to_find) { 300 foreach ($shipping_rates as $rate) { 301 if ($rate->get_instance_id() == $instance_id_to_find) { 302 return $rate->get_cost(); // This returns a string, so it's fine 303 } 304 } 305 return '0'; // Return a default value like '0' instead of null to avoid errors 306 } 301 307 } 302 308 endif; -
shipping-by-city-for-woocommerce/trunk/readme.txt
r3148446 r3155137 2 2 Contributors: rupeshjorkar, jankiuser, dhavalkapadane 3 3 Donate link: 4 Tags: WooCommerce, Shipping By City, Shipping By Zone, E-Commerce, Shipping By City,4 Tags: ShippingByCity, WooCommerce, EcommerceSolutions, ShippingZones, TransparentShipping 5 5 Requires at least: 5.0 6 6 Tested up to: 6.6.1 7 Stable tag: 1.0. 57 Stable tag: 1.0.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 15 15 Transform your WooCommerce store’s shipping options with our intuitive "Shipping by City" option. Say goodbye to the complexities of shipping by postal code and streamline your logistics by configuring shipping options based on cities instead. This plugin is designed to make managing shipping zones and rates easier and more flexible 16 16 17 Features of the plugin include: 18 17 == Features of the plugin include: == 18 19 19 * Provide complete solution for Shipping by city option in our E-commerce site instead on Shipping by Postal code for every Zone. 20 * Our "Shipping by City" plugin enables you to define shipping rates and zones according to cities. 21 * You can quickly add cities, set up shipping zones, and establish rates tailored to each location. 22 * Enhance your customers' shopping experience by presenting clear and transparent shipping options based on their city. 23 * Easily add or remove cities from your shipping zones as needed. 20 24 * it include Option to configure all cities for every Zone under Woocommerce settings. 21 25 * Simple-configuration - just install,setup and enjoy. … … 44 48 Go to WooCommerce > Settings, find "Advance Shipping Zone," configure the settings, and see the results on the checkout page 45 49 50 = Does this plugin conflict with the Table Rate Shipping plugin? = 51 52 Our plugin has been upgraded from 1.0.5 to 1.0.6 and is now compatible with the Table Rate Shipping plugin. We have successfully resolved the conflict with the table rate shipping plugin in the 1.0.6 version. 53 54 = What happens if the same city matches one or more shipping methods? = 55 56 If the same city matches one or more shipping methods, the system will choose the shipping method with the last specified charge. 57 58 = Does this plugin work with class-based shipping conditions, for example, '10 * [qty]'?" = 59 60 Our plugin has been upgraded from 1.0.5 to 1.0.6 and is now compatible with the shipping class cost. We have successfully resolved the conflict with the shipping class cost in the 1.0.6 version. 61 62 = Does this plugin conflict with the Weight Based Shipping Plugin? = 63 64 Our plugin does not conflict with weight-based plugins, but it works based on shipping by city. 65 66 = Does this plugin work with city and delivery zone ? = 67 68 Yes, our plugin works with different cities and delivery zones 69 70 = Does this plugin work using the ZIP code? = 71 72 Our plugin works with the city name, so please use the city name instead of the zip code. 73 46 74 == Screenshots == 47 75 48 1. S hipping Method Example #176 1. Screenshot of enabling the shipping method 49 77 50 2. S hipping Method Charge Example #278 2. Screenshot of adding the shipping cost 51 79 52 3. Checkout Page Shipping Charge Example #3 80 3. Screenshot of adding a custom city for shipping zones 81 82 4. Screenshot of the shipping charge on the checkout page 53 83 54 84 == Changelog == … … 66 96 = 1.0.5 = 67 97 * Tested with latest PHP and WordPress version 98 = 1.0.6 = 99 * We have successfully resolved the conflict with the shipping class cost in the 1.0.6 version. 100 * We have successfully resolved the conflict with the table rate shipping plugin in the 1.0.6 version. 68 101 69 102 == Upgrade Notice == … … 83 116 = 1.0.5 = 84 117 * Tested with latest PHP and WordPress version 118 = 1.0.6 = 119 * We have successfully resolved the conflict with the shipping class cost in the 1.0.6 version. 120 * We have successfully resolved the conflict with the table rate shipping plugin in the 1.0.6 version. -
shipping-by-city-for-woocommerce/trunk/shipping-by-city-for-woocommerce.php
r3147575 r3155137 4 4 Plugin URI: https://www.c-metric.com/ 5 5 Description: Calculate Shipping method by City for Woocommerce 6 Version: 1.0. 56 Version: 1.0.6 7 7 Author: C-Metric 8 8 Author URI: https://www.c-metric.com/
Note: See TracChangeset
for help on using the changeset viewer.