Saravana Kumar K
Forum Replies Created
-
Hi, thanks for posting this fix, I will include it with my next release.
Forum: Plugins
In reply to: [WC Fields Factory] make wccpf_unique_key conditionalHi, thanks for posting this, the behavior should be like you said, I update with my next release.
Forum: Plugins
In reply to: [WC Fields Factory] How to translate field label/placeholder etc?Hi, the text domain would be
wc-fields-factory. it should be working, I haven’t tried on WPML, but have tested with Loco Translate and it seems working.Forum: Plugins
In reply to: [WC Fields Factory] Allowed file typesNo, you did correctly, but we are using HTML5
acceptattribute which would still allow customer to changeAll Filesoption.But it it should fail on the server side, looks like some issue out there on file validation, I will have a look.
Forum: Plugins
In reply to: [WC Fields Factory] Checkbox checked/unchecked by defaultHi, by default all check boxes you added will be unchecked only.
Hi,
could be, but your handler for validation hook’s priority is
101so it doesn’t matter whethervalidate_wccpffunction uses$passedvar or not because it will always be executed after thevalidate_wccpf.your point is noted, I will fix it, I will use
$passedvar invalidate_wccpffunction with the next release.mean time you can change your
validate_defeitospriority to5and modifyvalidate_wccpffunction onwcff-product-form.phpfile like this.LN : 170
$is_passed = $passed;let me know the result.
Hi, I too seen this before, but it’s gone after some time, I honestly don’t know how.
can you please do inspect element
Add To Cartbutton after validation failed, and tell me if you see any class or attribute added to that button, likedisable.Forum: Plugins
In reply to: [WC Fields Factory] Use custom field to set feeHi, this might help you.
function wccpf_add_fee( $cart ) { $extra_fee = 100; foreach ( $cart->cart_contents as $key => $value ) { /* Check for the value ( or it could be any condition logic ) */ if( isset( $value[ "your_wcff_fields_name" ] ) && ( $value[ "your_wcff_fields_name" ] == "your value" ) ) { WC()->cart->add_fee( $value[ "your_wcff_fields_name" ], $extra_fee, true, "" ); } } } add_action( 'woocommerce_cart_calculate_fees', 'wccpf_add_fee', 1 );Forum: Plugins
In reply to: [WC Fields Factory] Date Picker within the Dates onlyGood option, I will try to include this as configurable with my next release.
mean time you can validate from your
functions.phpusing the following snippet.function validate_wccpf( $passed, $pid = null ) { if( isset( $_REQUEST[ "your_date_field_name" ] ) ) { $dateBegin = strtotime( "07/12/1985" ); $dateEnd = strtotime( "26/02/2016" ); $givendate = strtotime( $_REQUEST[ "your_date_field_name" ] ); if( $givendate < $dateBegin && $givendate > $dateEnd ) { return false; } } return true; } add_filter( 'woocommerce_add_to_cart_validation', 'validate_wccpf', 100, 2 );haven’t tested though, let me know whether it works.
Forum: Plugins
In reply to: [WC Fields Factory] Admin Fields Not Showing in Front EndHi, by default admin fields won’t display on product page, but you can display theme on cart, checkout, order and email fields.
I will enable this option with my next release.
mean time do some thing like this to achieve this
function inject_wccaf_admin_field() { global $post; $all_fields = apply_filters( 'wcff/load/all_fields', $post->ID, 'wccaf', "any" ); if( count( $all_fields ) > 0 ) { foreach ( $all_fields as $fields ) { if( count( $fields ) > 0 ) { foreach ( $fields as $key => $field ) { $mval = ""; $mval = get_post_meta( $post->ID, "wccaf_". $field["name"], true ); if( !$mval ) { if( isset( $field["default_value"] ) && $field["type"] != "radio" && $field["type"] != "select" ) { $mval = $field["default_value"]; } else { $mval = ""; } } $field["value"] = $mval; $field["location"] = "product-page"; echo apply_filters( 'wcff/render/admin/field/type='.$field["type"], $field ); } } } } } add_action( 'woocommerce_before_add_to_cart_button', "inject_wccaf_admin_field" );Forum: Plugins
In reply to: [WC Fields Factory] All fields empty if user fails to provide required infoHi, WC Fields Factory now has the option of Client Side Validation, Go to
wp-admin -> Fields Factory -> Settingsand enableClient Side Validationoption and save the changes.Forum: Plugins
In reply to: [WC Fields Factory] Suggestion for your Change LogDeeveedee thanks,
Done.!
Forum: Plugins
In reply to: [WC Fields Factory] How to access WC Fields Factory meta data in order itemHi, I got your point.
In the earliest version I used fields name only. but the name is not more expressive ( since it’s a slug, contains under scores and all smaller cases ) especially when you view it on the backend order details screen or from your account screen’s my orders section.
So I used Label instead of Name.
What I can do is, Triggering a filter before assigning key to order item meta, I will try to include this on my next release.
Forum: Plugins
In reply to: [WC Fields Factory] Custom fields not showing in Cart & CheckoutHi Camille V, thanks for posting this issue.
It’s been fixed, please use V1.2.8Regards
SarkHi,
These custom fields will be stored as custom order item meta.
In your wp-admin visit any single woocommerce shop order, there you will be able to view all the custom order item meta.Exporting custom order item meta is depending on the plugin being used by you, some plugins support these feature, for that too you have to specify whether to include custom meta as well on the result using their setting page.