fitbox
Forum Replies Created
-
had the same suspicious file in my system. deleted…and guess what it came back. Looking for the culprit now.
does anybody have an idea how to best track the creation of this file?Forum: Fixing WordPress
In reply to: AH00524: Handler for fastcgi-script returned invalid result code 32@steve
encountering the same issue. have you ever resolved this?
do you know what it was?thanks for any help
Forum: Plugins
In reply to: [WooCommerce] Prevent User from Editing certain Field in User Accountok removing works great. thanks.
i was wondering how i would implement custom validation methods analogous to
add_action( 'woocommerce_checkout_process', 'my_custom_checkout_field_process' ); function my_custom_checkout_field_process() { if ( ! $_POST['shipping_first_name'] ) { wc_add_notice( 'Bitte gib deinen Vollst?ndingen Namen ein', 'error' ); } }
Forum: Plugins
In reply to: [WooCommerce] Dummy Shipping Method for WC 2.6 with ZONE Support?solved.
since my class was already initialized with the code above the end part needs to be changed to:
add_filter( ‘woocommerce_shipping_methods’, ‘register_test_method’ );
function register_test_method( $methods ) {
$methods[ ‘test_method’ ] = new WC_Shipping_Bike();
return $methods;
}final working code as plugin
<?php if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } /* Plugin Name: eigenes hipping Plugin URI: fitmeal.at Description: asdfsfd Version: 1.0 Author: Philipp Protschka Author URI: fitmeal.at License: GPL */ /** * Check if WooCommerce is active */ /** * Check if WooCommerce is active */ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { function bike_shipping_method_init() { if ( ! class_exists( 'WC_Shipping_Bike' ) ) { class WC_Shipping_Bike extends WC_Shipping_Method { /** * Constructor. The instance ID is passed to this. */ public function __construct( $instance_id = 0 ) { $this->id = 'test_method'; $this->instance_id = absint( $instance_id ); $this->method_title = __( 'Test Method' ); $this->method_description = __( 'Some shipping method.' ); $this->supports = array( 'shipping-zones', 'instance-settings', ); $this->instance_form_fields = array( 'enabled' => array( 'title' => __( 'Enable/Disable' ), 'type' => 'checkbox', 'label' => __( 'Enable this shipping method' ), 'default' => 'yes', ), 'title' => array( 'title' => __( 'Method Title' ), 'type' => 'text', 'description' => __( 'This controls the title which the user sees during checkout.' ), 'default' => __( 'Test Method' ), 'desc_tip' => true ) ); $this->enabled = $this->get_option( 'enabled' ); $this->title = $this->get_option( 'title' ); add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) ); } /** * calculate_shipping function. * @param array $package (default: array()) */ public function calculate_shipping( $package = array() ) { $this->add_rate( array( 'id' => $this->id . $this->instance_id, 'label' => $this->title, 'cost' => 100, ) ); } } //class ends here } } add_action( 'woocommerce_shipping_init', 'bike_shipping_method_init' ); add_filter( 'woocommerce_shipping_methods', 'register_test_method' ); function register_test_method( $methods ) { $methods[ 'test_method' ] = new WC_Shipping_Bike(); return $methods; } }
Forum: Plugins
In reply to: [WooCommerce] Dummy Shipping Method for WC 2.6 with ZONE Support?even with your code from git i get same errors:
ERROR
this is after i select the custom shipping method from the drop down when trying to add it to a zone. It shows up in the dropdown but is not added to the zone.perhaps my method of implementation is wrong?
<?php if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } /* Plugin Name: eigenes hipping Plugin URI: fitmeal.at Description: asdfsfd Version: 1.0 Author: Philipp Protschka Author URI: fitmeal.at License: GPL */ /** * Check if WooCommerce is active */ /** * Check if WooCommerce is active */ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { function bike_shipping_method_init() { if ( ! class_exists( 'WC_Shipping_Bike' ) ) { class WC_Shipping_Test_Method extends WC_Shipping_Method { /** * Constructor. The instance ID is passed to this. */ public function __construct( $instance_id = 0 ) { $this->id = 'test_method'; $this->instance_id = absint( $instance_id ); $this->method_title = __( 'Test Method' ); $this->method_description = __( 'Some shipping method.' ); $this->supports = array( 'shipping-zones', 'instance-settings', ); $this->instance_form_fields = array( 'enabled' => array( 'title' => __( 'Enable/Disable' ), 'type' => 'checkbox', 'label' => __( 'Enable this shipping method' ), 'default' => 'yes', ), 'title' => array( 'title' => __( 'Method Title' ), 'type' => 'text', 'description' => __( 'This controls the title which the user sees during checkout.' ), 'default' => __( 'Test Method' ), 'desc_tip' => true ) ); $this->enabled = $this->get_option( 'enabled' ); $this->title = $this->get_option( 'title' ); add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) ); } /** * calculate_shipping function. * @param array $package (default: array()) */ public function calculate_shipping( $package = array() ) { $this->add_rate( array( 'id' => $this->id . $this->instance_id, 'label' => $this->title, 'cost' => 100, ) ); } } //class ends here } } add_action( 'woocommerce_shipping_init', 'bike_shipping_method_init' ); function add_your_shipping_method( $methods ) { $methods[] = 'WC_Shipping_Test_Method'; return $methods; } add_filter( 'woocommerce_shipping_methods', 'add_your_shipping_method' ); }
Forum: Plugins
In reply to: [WooCommerce] Dummy Shipping Method for WC 2.6 with ZONE Support?mike you are everywhere…! thanks for the pointer will try adapt.
i think there is an error on line 17 in the example code located here:
https://gist.github.com/mikejolley/3b37b9cc19a774665f31$this->method_title = __( ‘Test Method‘‘ );
Parse error: syntax error, unexpected ” ); ‘ (T_CONSTANT_ENCAPSED_STRING)
Forum: Plugins
In reply to: [WooCommerce] Adresse Hausnummer Abfragekannst gern auf meiner seite freudig testen (is nur ne testing platform)
Forum: Plugins
In reply to: [WooCommerce] Adresse Hausnummer Abfragenaja weil du es ja dort vlt auch mit css versteckt hast? oder fehlt das ganze ding?
Forum: Plugins
In reply to: [WooCommerce] Adresse Hausnummer AbfrageForum: Plugins
In reply to: [WooCommerce] Adresse Hausnummer Abfragemach lieber: #billing_address_1 {display:none !important;}
sonst styled das irgend eine theme wieder auf display: float etc. etc…
Forum: Plugins
In reply to: [WooCommerce] Adresse Hausnummer Abfragehier gehts:
https://philipp-protschka.com/shop/Forum: Plugins
In reply to: [WooCommerce] Adresse Hausnummer Abfrageare you loading jquery?
how are you loading this javascript?Forum: Plugins
In reply to: [WooCommerce] Prevent User from Editing certain Field in User Accountideas?
Forum: Plugins
In reply to: [WooCommerce] Adresse Hausnummer Abfragehab da einfach 4 neue felder erstellt
strasse/hausnummer/tuernummer/stiege (zb) wenn einer von denen geaaendert wird kopiert es den gesammen text dann in die shipping_adress_1//fire copy function everytime a change happens to any of those fields jQuery("#shipping_strasse ,#shipping_house_number, #shipping_stiege, #shipping_door_number").on('change', update_shipping_adress); // copies all values from all these fields to the shipping_adress_1 field function update_shipping_adress () { var strasse = jQuery("#shipping_strasse").val(); var hausnummer = jQuery("#shipping_house_number").val(); var stiegen = jQuery("#shipping_stiege").val(); var tuer = jQuery("#shipping_door_number").val(); jQuery("#shipping_address_1").val(strasse +' '+ hausnummer +' /'+ stiegen +'/'+ tuer); }
Forum: Plugins
In reply to: [WooCommerce] Adresse Hausnummer Abfrageich würde zwei neue felder anlegen und das originalle “billing adress” verstecken. dann mit einem Javascript das ganze in das versteckte kopieren.
Sichtbar:
Strasse
HausnummerUnsichtbar:
billing_adress_1javascript guckt “onchange” strasse und hausnummer und kopiert es ins billing adress 1. Du kannst dann auch per “custom validation” überprüfen das strasse und hausnummer ausgefüllt wurde.
google mal “how to create custom woocommerce fields” bzw “woocommerce custom fields validation”
english
create 2 new fields “street” and “number”. Hide the original billing_adress_1 field . Create javascript to copy streent and number into billing_adress_1use custom validation to check that street and numbers was filled out during submission.