Changeset 3484903
- Timestamp:
- 03/17/2026 03:30:15 PM (2 weeks ago)
- Location:
- fuvar-hu-api/trunk
- Files:
-
- 3 edited
-
fuvarhu.php (modified) (1 diff)
-
inc/shipping_method.php (modified) (12 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fuvar-hu-api/trunk/fuvarhu.php
r3435026 r3484903 5 5 Plugin URI: https://app.packli.hu 6 6 description: Bővítmény segítségével hozzáadhatod a packli.hu által kínált szolgáltatásokat a webshopodhoz 7 Version: 3.0. 27 Version: 3.0.3 8 8 Author: Packli Logistic KFT 9 9 License: GPL2 -
fuvar-hu-api/trunk/inc/shipping_method.php
r3435026 r3484903 12 12 $methods[ 'fuvarhu_aut_fxp' ] = 'WC_Shipping_fuvarhu_AUT_FXP'; 13 13 14 $methods[ 'fuvarhu_hazhoz_gls' ] = 'WC_Shipping_fuvarhu_HAZ_GLS'; 15 $methods[ 'fuvarhu_csp_gls' ] = 'WC_Shipping_fuvarhu_CSP_GLS'; 16 $methods[ 'fuvarhu_aut_gls' ] = 'WC_Shipping_fuvarhu_AUT_GLS'; 17 14 18 return $methods; 15 19 } 16 20 add_action( 'woocommerce_admin_order_data_after_order_details', 'fuvarhu_display_order_data_in_admin', 10, 1 ); 17 21 function fuvarhu_display_order_data_in_admin( $order ){ 18 echo '<div class="order_data_column"> <h4>' . __( " Fuvar.hu Szállítás", "woocommerce" ) . '</h4>';22 echo '<div class="order_data_column"> <h4>' . __( "Packli.hu Szállítás", "woocommerce" ) . '</h4>'; 19 23 20 24 foreach( $order->get_items( 'shipping' ) as $item_id => $item ){ … … 81 85 $this->id = 'fuvarhu_hazhoz'; 82 86 $this->instance_id = absint( $instance_id ); 83 $this->method_title = __( ' Fuvar.hu - Házhoz szállítás (MPL)' );84 $this->method_description = __( 'Házhozszállítás a Fuvar.hu szerződött partnere által' );87 $this->method_title = __( 'Packli.hu - Házhoz szállítás (MPL)' ); 88 $this->method_description = __( 'Házhozszállítás a Packli.hu szerződött partnere által' ); 85 89 $this->supports = array( 86 90 'shipping-zones', … … 123 127 $this->id = 'fuvarhu_hazhoz_dpd'; 124 128 $this->instance_id = absint( $instance_id ); 125 $this->method_title = __( ' Fuvar.hu - Házhoz szállítás (DPD)' );126 $this->method_description = __( 'Házhozszállítás a Fuvar.hu szerződött partnere által' );129 $this->method_title = __( 'Packli.hu - Házhoz szállítás (DPD)' ); 130 $this->method_description = __( 'Házhozszállítás a Packli.hu szerződött partnere által' ); 127 131 $this->supports = array( 128 132 'shipping-zones', … … 165 169 $this->id = 'fuvarhu_aut_dpd'; 166 170 $this->instance_id = absint( $instance_id ); 167 $this->method_title = __( ' Fuvar.hu - Automata & Csomagpont (DPD)' );168 $this->method_description = __( 'DPD Automata & Csomagpont a Fuvar.hu szerződött partnere által' );171 $this->method_title = __( 'Packli.hu - Automata & Csomagpont (DPD)' ); 172 $this->method_description = __( 'DPD Automata & Csomagpont a Packli.hu szerződött partnere által' ); 169 173 $this->supports = array( 170 174 'shipping-zones', … … 207 211 $this->id = 'fuvarhu_aut_pck'; 208 212 $this->instance_id = absint( $instance_id ); 209 $this->method_title = __( ' Fuvar.hu - Automata & Csomagpont (Packeta)' );210 $this->method_description = __( 'Packeta Automata & Csomagpont a Fuvar.hu szerződött partnere által' );213 $this->method_title = __( 'Packli.hu - Automata & Csomagpont (Packeta)' ); 214 $this->method_description = __( 'Packeta Automata & Csomagpont a Packli.hu szerződött partnere által' ); 211 215 $this->supports = array( 212 216 'shipping-zones', … … 249 253 $this->id = 'fuvarhu_aut_fxp'; 250 254 $this->instance_id = absint( $instance_id ); 251 $this->method_title = __( ' Fuvar.hu - Automata (Foxpost)' );252 $this->method_description = __( 'Foxpost Automata a Fuvar.hu szerződött partnere által' );255 $this->method_title = __( 'Packli.hu - Automata (Foxpost)' ); 256 $this->method_description = __( 'Foxpost Automata a Packli.hu szerződött partnere által' ); 253 257 $this->supports = array( 254 258 'shipping-zones', … … 292 296 $this->id = 'fuvarhu_pop'; 293 297 $this->instance_id = absint( $instance_id ); 294 $this->method_title = __( ' Fuvar.hu - MPL PostaPontra (MOL, Coop)' );298 $this->method_title = __( 'Packli.hu - MPL PostaPontra (MOL, Coop)' ); 295 299 $this->method_description = __( 'Kiszállítás MPL PostaPontra' ); 296 300 $this->supports = array( … … 334 338 $this->id = 'fuvarhu_pos'; 335 339 $this->instance_id = absint( $instance_id ); 336 $this->method_title = __( ' Fuvar.hu - Postára kézbesítés' );340 $this->method_title = __( 'Packli.hu - Postára kézbesítés' ); 337 341 $this->method_description = __( 'Kiszállítás postán maradó csomagként' ); 338 342 $this->supports = array( … … 376 380 $this->id = 'fuvarhu_csp'; 377 381 $this->instance_id = absint( $instance_id ); 378 $this->method_title = __( ' Fuvar.hu - MPL Csomagautoma' );382 $this->method_title = __( 'Packli.hu - MPL Csomagautoma' ); 379 383 $this->method_description = __( 'Kiszállítás MPL Csomagautomatába' ); 380 384 $this->supports = array( … … 399 403 $this->enabled = $this->get_option( 'enabled' ); 400 404 $this->title = 'Automata (MPL)'; 405 406 add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) ); 407 } 408 409 public function calculate_shipping( $package = array() ) { 410 $this->add_rate( array( 411 'id' => $this->id . $this->instance_id, 412 'label' => $this->title, 413 'cost' => $this->get_option('shipping_fee'), 414 ) ); 415 } 416 } 417 } 418 419 420 if(!class_exists("WC_Shipping_fuvarhu_HAZ_GLS")){ 421 class WC_Shipping_fuvarhu_HAZ_GLS extends WC_Shipping_Method { 422 public function __construct( $instance_id = 0 ) { 423 $this->id = 'fuvarhu_hazhoz_gls'; 424 $this->instance_id = absint( $instance_id ); 425 $this->method_title = __( 'Packli.hu - Házhoz szállítás (GLS)' ); 426 $this->method_description = __( 'Házhozszállítás a Packli.hu szerződött partnere által' ); 427 $this->supports = array( 428 'shipping-zones', 429 'instance-settings', 430 ); 431 $this->instance_form_fields = array( 432 'enabled' => array( 433 'title' => __( 'Engedélyezve' ), 434 'type' => 'checkbox', 435 'label' => __( 'Szállítási mód engedélyezése' ), 436 'default' => 'yes', 437 ), 438 'shipping_fee' => array( 439 'title' => __( 'Szállítás összege' ), 440 'type' => 'number', 441 'description' => __( 'A vevőre terhelt szállítási díj' ), 442 'default' => __( '0' ), 443 'desc_tip' => true 444 ) 445 ); 446 $this->enabled = $this->get_option( 'enabled' ); 447 $this->title = 'Házhoz szállítás (GLS)'; 448 449 add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) ); 450 } 451 452 public function calculate_shipping( $package = array() ) { 453 $this->add_rate( array( 454 'id' => $this->id . $this->instance_id, 455 'label' => $this->title, 456 'cost' => $this->get_option('shipping_fee'), 457 ) ); 458 } 459 } 460 } 461 462 if(!class_exists("WC_Shipping_fuvarhu_CSP_GLS")){ 463 class WC_Shipping_fuvarhu_CSP_GLS extends WC_Shipping_Method { 464 public function __construct( $instance_id = 0 ) { 465 $this->id = 'fuvarhu_csp_gls'; 466 $this->instance_id = absint( $instance_id ); 467 $this->method_title = __( 'Csomagpont (GLS)' ); 468 $this->method_description = __( 'GLS Csomagpont a Packli.hu szerződött partnere által' ); 469 $this->supports = array( 470 'shipping-zones', 471 'instance-settings', 472 ); 473 $this->instance_form_fields = array( 474 'enabled' => array( 475 'title' => __( 'Engedélyezve' ), 476 'type' => 'checkbox', 477 'label' => __( 'Szállítási mód engedélyezése' ), 478 'default' => 'yes', 479 ), 480 'shipping_fee' => array( 481 'title' => __( 'Szállítás összege' ), 482 'type' => 'number', 483 'description' => __( 'A vevőre terhelt szállítási díj' ), 484 'default' => __( '0' ), 485 'desc_tip' => true 486 ) 487 ); 488 $this->enabled = $this->get_option( 'enabled' ); 489 $this->title = 'Csomagpont (GLS)'; 490 491 add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) ); 492 } 493 494 public function calculate_shipping( $package = array() ) { 495 $this->add_rate( array( 496 'id' => $this->id . $this->instance_id, 497 'label' => $this->title, 498 'cost' => $this->get_option('shipping_fee'), 499 ) ); 500 } 501 } 502 } 503 504 if(!class_exists("WC_Shipping_fuvarhu_AUT_GLS")){ 505 class WC_Shipping_fuvarhu_AUT_GLS extends WC_Shipping_Method { 506 public function __construct( $instance_id = 0 ) { 507 $this->id = 'fuvarhu_aut_gls'; 508 $this->instance_id = absint( $instance_id ); 509 $this->method_title = __( 'Automata (GLS)' ); 510 $this->method_description = __( 'GLS Automata a Packli.hu szerződött partnere által' ); 511 $this->supports = array( 512 'shipping-zones', 513 'instance-settings', 514 ); 515 $this->instance_form_fields = array( 516 'enabled' => array( 517 'title' => __( 'Engedélyezve' ), 518 'type' => 'checkbox', 519 'label' => __( 'Szállítási mód engedélyezése' ), 520 'default' => 'yes', 521 ), 522 'shipping_fee' => array( 523 'title' => __( 'Szállítás összege' ), 524 'type' => 'number', 525 'description' => __( 'A vevőre terhelt szállítási díj' ), 526 'default' => __( '0' ), 527 'desc_tip' => true 528 ) 529 ); 530 $this->enabled = $this->get_option( 'enabled' ); 531 $this->title = 'Automata (GLS)'; 401 532 402 533 add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) ); … … 458 589 } 459 590 591 if(strpos($chosen_method_id,"fuvarhu_aut_gls") !== false){ 592 $selected = "aut"; 593 } 594 595 if(strpos($chosen_method_id,"fuvarhu_csp_gls") !== false){ 596 $selected = "csp"; 597 } 598 460 599 if($selected != "haz" && ($selected == "pos" || $selected == "csp" || $selected = "pop" || $selected = "aut")){ 461 600 if(!isset($_POST['pickup_store']) || empty($_POST['pickup_store'])){ … … 521 660 522 661 $packli_service_id = [11]; 662 } 663 664 if(strpos($chosen_method_id,"fuvarhu_aut_gls") !== false){ 665 $selected = "aut"; 666 $provider = "gls"; 667 $show_for = "fuvarhu_aut_gls"; 668 669 $packli_service_id = [14]; 670 } 671 672 if(strpos($chosen_method_id,"fuvarhu_csp_gls") !== false){ 673 $selected = "csp"; 674 $provider = "gls"; 675 $show_for = "fuvarhu_csp_gls"; 676 677 $packli_service_id = [13]; 523 678 } 524 679 -
fuvar-hu-api/trunk/readme.txt
r3435026 r3484903 4 4 Requires at least: 5.6.1 5 5 Tested up to: 6.1 6 Stable tag: 3.0. 26 Stable tag: 3.0.3 7 7 Requires PHP: 8.1 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.