Changeset 3051056
- Timestamp:
- 03/14/2024 12:50:21 PM (2 years ago)
- Location:
- fuvar-hu-api/trunk
- Files:
-
- 4 edited
-
fuvarhu.php (modified) (1 diff)
-
inc/export.php (modified) (1 diff)
-
inc/shipping_method.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fuvar-hu-api/trunk/fuvarhu.php
r3030545 r3051056 5 5 Plugin URI: https://uzlet.fuvar.hu 6 6 description: Fuvar.hu B2B Rendszer api 7 Version: 1.4. 27 Version: 1.4.3 8 8 Author: Fuvar.hu 9 9 License: GPL2 -
fuvar-hu-api/trunk/inc/export.php
r3030544 r3051056 81 81 82 82 if(isset($geocode["status"]) && $geocode["status"] == "OK"){ 83 $elements = [ ];83 $elements = ['street_number' => '', 'locality' => '', 'route' => '']; 84 84 foreach ($geocode["results"][0]["address_components"] as $key => $value) { 85 85 $elements[$value["types"][0]] = $value["long_name"]; -
fuvar-hu-api/trunk/inc/shipping_method.php
r2884491 r3051056 3 3 add_filter( 'woocommerce_shipping_methods', 'fuvarhu_registerfuvarhu_method' ); 4 4 function fuvarhu_registerfuvarhu_method( $methods ) { 5 $methods[ 'fuvarhu_hazhozdpd' ] = 'WC_Shipping_fuvarhu_HAZ_DPD'; 5 6 $methods[ 'fuvarhu_hazhoz' ] = 'WC_Shipping_fuvarhu_HAZ'; 6 7 $methods[ 'fuvarhu_pop' ] = 'WC_Shipping_fuvarhu_POP'; … … 76 77 $this->id = 'fuvarhu_hazhoz'; 77 78 $this->instance_id = absint( $instance_id ); 78 $this->method_title = __( 'Fuvar.hu - Házhoz szállítás' ); 79 $this->method_description = __( 'Házhozszállítás a Fuvar vagy szerződött partnerei által' ); 80 $this->supports = array( 81 'shipping-zones', 82 'instance-settings', 83 ); 84 $this->instance_form_fields = array( 85 'enabled' => array( 86 'title' => __( 'Engedélyezve' ), 87 'type' => 'checkbox', 88 'label' => __( 'Szállítási mód engedélyezése' ), 89 'default' => 'yes', 90 ), 91 'shipping_fee' => array( 92 'title' => __( 'Szállítás összege' ), 93 'type' => 'number', 94 'description' => __( 'A vevőre terhelt szállítási díj' ), 95 'default' => __( '0' ), 96 'desc_tip' => true 97 ) 98 ); 99 $this->enabled = $this->get_option( 'enabled' ); 100 $this->title = 'Házhoz szállítás a Fuvarral'; 79 $this->method_title = __( 'Fuvar.hu - Házhoz szállítás (MPL)' ); 80 $this->method_description = __( 'Házhozszállítás a Fuvar.hu szerződött partnere által' ); 81 $this->supports = array( 82 'shipping-zones', 83 'instance-settings', 84 ); 85 $this->instance_form_fields = array( 86 'enabled' => array( 87 'title' => __( 'Engedélyezve' ), 88 'type' => 'checkbox', 89 'label' => __( 'Szállítási mód engedélyezése' ), 90 'default' => 'yes', 91 ), 92 'shipping_fee' => array( 93 'title' => __( 'Szállítás összege' ), 94 'type' => 'number', 95 'description' => __( 'A vevőre terhelt szállítási díj' ), 96 'default' => __( '0' ), 97 'desc_tip' => true 98 ) 99 ); 100 $this->enabled = $this->get_option( 'enabled' ); 101 $this->title = 'Házhoz szállítás (MPL)'; 102 103 add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) ); 104 } 105 106 public function calculate_shipping( $package = array() ) { 107 $this->add_rate( array( 108 'id' => $this->id . $this->instance_id, 109 'label' => $this->title, 110 'cost' => $this->get_option('shipping_fee'), 111 ) ); 112 } 113 } 114 } 115 116 if(!class_exists("WC_Shipping_fuvarhu_HAZ_DPD")){ 117 class WC_Shipping_fuvarhu_HAZ_DPD extends WC_Shipping_Method { 118 public function __construct( $instance_id = 0 ) { 119 $this->id = 'fuvarhu_hazhoz_dpd'; 120 $this->instance_id = absint( $instance_id ); 121 $this->method_title = __( 'Fuvar.hu - Házhoz szállítás (DPD)' ); 122 $this->method_description = __( 'Házhozszállítás a Fuvar.hu szerződött partnere által' ); 123 $this->supports = array( 124 'shipping-zones', 125 'instance-settings', 126 ); 127 $this->instance_form_fields = array( 128 'enabled' => array( 129 'title' => __( 'Engedélyezve' ), 130 'type' => 'checkbox', 131 'label' => __( 'Szállítási mód engedélyezése' ), 132 'default' => 'yes', 133 ), 134 'shipping_fee' => array( 135 'title' => __( 'Szállítás összege' ), 136 'type' => 'number', 137 'description' => __( 'A vevőre terhelt szállítási díj' ), 138 'default' => __( '0' ), 139 'desc_tip' => true 140 ) 141 ); 142 $this->enabled = $this->get_option( 'enabled' ); 143 $this->title = 'Házhoz szállítás (DPD)'; 101 144 102 145 add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) ); -
fuvar-hu-api/trunk/readme.txt
r3030544 r3051056 4 4 Requires at least: 5.6.1 5 5 Tested up to: 6.1 6 Stable tag: 1.4. 26 Stable tag: 1.4.3 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.