• Resolved page52

    (@page52)


    Hello,

    I am using Custom WooCommerce Fields by RightPress to create different custom product fields for different product categories. I’ve added these as custom export fields in the settings for Advanced Order Export For WooCommerce and they thankfully do come out in my order export, however, because I’ve had to add each custom field separately, I’ve had to create separate columns for each set.

    Is there a way I could put different custom fields under the same column for export?

    Appreciate any help and happy to send a file as an example.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hello

    Could you visit >Setup Fields>Products and drag field “Product Variation” to export?

    if it won’t work — please, submit this plugin and sample file to helpdesk.
    thanks, Alex

    Thread Starter page52

    (@page52)

    Hello,

    This did work but carries across all the variation data making for a very long field and not in a format we can work with unfortunately. I’ll log a ticket, thank you!

    Plugin Author algol.plus

    (@algolplus)

    ok, I’ve replied

    Plugin Author algol.plus

    (@algolplus)

    For all users who want to export product options added by RightPress
    ?
    Please, follow to https://algolplus.freshdesk.com/support/solutions/articles/25000018287-add-calculated-field-for-product-
    add metakey “rp_options” and use this PHP code
    thanks, Alex

    add_filter('woe_get_order_product_value_rp_options', function ($value, $order, $item, $product,$item_meta) {
    	$lines = array();
    	foreach($item_meta as $key=>$val) {
    		if( !preg_match("#_wccf_pf_data_(.+)#",$key,$m) )
    			continue;
    			
    		$field_id = $item_meta["_wccf_pf_id_".$m[1]][0];
    		$name = get_post_meta($field_id,"label", true);
    		$data = unserialize($val[0]);
    		
    		$selected = maybe_unserialize( $item_meta["_wccf_pf_".$m[1]][0] ) ;
    		if( !is_array($selected))
    			$selected  = array($selected );
    		$labels = array();
    		foreach($selected  as $selected_idx)
    			$labels[] = $data["labels"][$selected_idx];
    		$lines[] = $name . " : " . join(",", $labels); 
    	}
    	return join("\n", $lines);
    }, 10, 5);
    • This reply was modified 5 years, 8 months ago by algol.plus.
    • This reply was modified 5 years, 8 months ago by algol.plus.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Meta Export with Custom WooCommerce Fields by RightPress’ is closed to new replies.