Forum Replies Created

Viewing 15 replies - 286 through 300 (of 494 total)
  • Plugin Author Saravana Kumar K

    (@mycholan)

    @jason thanks for this info.

    Plugin Author Saravana Kumar K

    (@mycholan)

    Each custom field’s key should be prefixed with wccpf_, so your code should be like the following.

    function calculate_cart_total ( $cart_object ) {
    	foreach ( $cart_object->cart_contents as $key => $value ) {
    		/* You can access */
    		/* Check for the value (or it Could be any condition logic) */
    		if ( isset ( $value ["wccpf_nome_r1500"] ) && ( $value [ "wccpf_nome_r1500"] != "" ) ) {
    			// Change the price
    			$OrgPrice = floatval ( $value ['data']->price );
    			$Value['data']->price = $orgPrice * intval ( $value[ "wccpf_nome_r1500"] );
    		}
    	}
    }
    add_action ( 'woocommerce_before_calculate_totals', 'calculate_cart_total', 99 );

    Actually it wasn’t mentioned in that blog too, updated now.

    Plugin Author Saravana Kumar K

    (@mycholan)

    More than 8 fields not at all a problem, I have tested with 15 ( mostly ) fields without any problem.

    Is there any chance to view error.log, some exception or warning messages could point us to right direction.

    or it could be a plugin conflicts.
    to find out

    1. Deactivate your current theme & switch to twentytwelve theme or any of other WordPress default theme, and check whether it’s working. if it does then the issue is with your theme being used.

    2. If it doesn’t work even after switching to WordPress default theme, then deactivate all plugins except
    Woocommerce & WC Fields Factory and check again.

    Let me know

    Plugin Author Saravana Kumar K

    (@mycholan)

    Hi could you turn off the Fields Cloning option from wp-admin/Fields Factory/Settings, and try again.

    Plugin Author Saravana Kumar K

    (@mycholan)

    Hi, thanks for raising this, I got the issues. the fix simple but I cannot release it now as I am working on some pending features. So I will tell you where to edit, please update it by yourself.

    Open plugins/wc-fields-factory/classes/wcff-admin-form.php

    function inject_wccaf_on_product_variable_section( $loop, $variation_data, $variation ) LN : 170

    put global $post; at the beginning of that function.

    function save_wccaf_product_variable_fields( $variant_id, $i ) LN : 297

    replace that whole function with the below

    function save_wccaf_product_variable_fields( $variant_id, $i ) {
    	global $post;
    	$parent_post_id = -1;
    
    	if( !$post ) {
    		$parent_post_id = wp_get_post_parent_id( $variant_id );
    	} else {
    		$parent_post_id = $post->ID;
    	}
    
    	$this->location = "woocommerce_product_after_variable_attributes";
    	$all_fields = apply_filters( 'wcff/load/all_fields', $parent_post_id, 'wccaf', $this->location );
    	if( count( $all_fields ) > 0 ) {
    		foreach ( $all_fields as $fields ) {
    			if( count( $fields ) > 0 ) {
    				foreach ( $fields as $key => $field ) {
    					if( isset( $_REQUEST[ $field["name"] ][$i] ) ) {
    						update_post_meta( $variant_id, "wccaf_". $field["name"], $_REQUEST[ $field["name"] ][$i] );
    					}
    				}
    			}
    		}
    	}
    }

    I will release the fix with my next release.

    Forum: Plugins
    In reply to: [WC Fields Factory] Demo?
    Plugin Author Saravana Kumar K

    (@mycholan)

    Thanks,

    It’s getting ready, I will publish it soon.

    Plugin Author Saravana Kumar K

    (@mycholan)

    Thanks for reporting, I will check. in the mean time, make sure there is know empty line before or after on the Options field of the Radio button meta field.

    Plugin Author Saravana Kumar K

    (@mycholan)

    Hi make sure you have turned on the following settings

    Display on Cart & Checkout from wp-admin/Fields Factory/Settings ( This one is the global option applicable for all fields. ex, Product, Admin, Repeater … )

    and The following option has to be set for each admin fields you have created.

    1. Show on Product Page this option has to be turned on to show the fields on the product page ( I think you have done this ).

    2. Show on Cart & Checkout this option has to be turned on to show on cart & checkout page.

    3. Order Item Meta this option has to be turned on to add this fields as order meta.

    Please refer this article for more details.

    Plugin Author Saravana Kumar K

    (@mycholan)

    Re-Arrange : Thats easy you can just drag and drop to rearrange fields on the Fields Post Editing Screen and then hit Update button finally.

    File Location : all files will be uploaded on wp-content/uploads/ directory at the time of ad to cart action

    if you want the file location from cart item ( before you place the order )

    foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
     	// check for your field ( fiel field )
     	if( isset( $cart_item["wccpf_your_field_name"] ) ) {
     		$fobj = json_decode( $values[ 'wccpf_your_field_name' ], true );
     		//$fobj will be having url property
     		$furl =  $fobj["url"];
     	}
    }

    remember Your custom field’s key on $cart_item object contains wccpf_ as prefix along with your custom field’s Name ( not label )

    if you want the file location from order item meta ( after you place the order )

    $order = new WC_Order( $your_order_id );
    foreach ( $order->get_items() as $item_id => $item ) {
     	$furl = wc_get_order_item_meta( $item_id, "Your Field Label" );
    }

    here the key is just your Field’s Label ( not the name nor with wccpf_ prefix )

    Hope it helps

    Plugin Author Saravana Kumar K

    (@mycholan)

    For all who facing this issue

    from V1.2.9, we are using Fileinfo module to validate file uploads ( using their mime types )

    PHP 5.3.0 and later have Fileinfo built in, but on Windows you must enable it manually in your php.ini

    for windows this would help

    Plugin Author Saravana Kumar K

    (@mycholan)

    Hi, do you see any script error on your browser’s developer console while trying to add the field.?

    ( either Chrome or FF press Ctrl + Shift + i and go to Console tab )

    Plugin Author Saravana Kumar K

    (@mycholan)

    Hi, it looks like it’s working, I am able to enter text in all the Textarea fields, I tested in Chrome, FF & Opera.

    Plugin Author Saravana Kumar K

    (@mycholan)

    Hi could you post your product page url here.? so that I can test it. product which has the TextArea Fields custom field.

    Plugin Author Saravana Kumar K

    (@mycholan)

    Hi, with current version you cannot, this feature is under development, will let you know once it is ready.

    Plugin Author Saravana Kumar K

    (@mycholan)

    Sorry for the late response.

    It depends on what exporter plugin you are using. but most of the plugin gives you the option to include your custom order line item meta along with the exported values.

    Some plugins allows you to specify the order line meta keys, whichever you wanted to included on the exported items.

    Note : Currently we are developing an Order Exporter plugin, which will be compatible with WC Fields Factory. that will be released within a week ( hopefully )

Viewing 15 replies - 286 through 300 (of 494 total)