Home Forums Plugins Store Exporter Support [Resolved] exporting custom field

Welcome to our community support forums! We're here to help - but if you have an urgent request for a Pro Plugin, you will get a prioritised response through our Premium Support page.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35205
    KatrinaMiller
    Participant

    – we purchased importer deluxe because we have a custom field we want to update, the attribute is Lead Time (lead-time)
    – when we use store exporter to export the products, we see and check Attribute: Lead Time under Product Fields
    – the csv file created has a column called Attribute:Lead Time but it is empty, no data
    – everything else is exporting correctly
    – do we have to do something special to get the custom field data to show up in the export file?

    I submitted a ticket for premium support 10 days ago but haven’t received a response

    #35427
    KatrinaMiller
    Participant

    I added this code, it adds the Lead Time field to the product options list on the export screen, and creates a row in the export file, but all the values are 0

    function wpsc_ce_custom_product_fields( $fields ) {
    $fields[] = array (
    ‘name’ => ‘leadtime’,
    ‘label’ => ‘Lead Time’,
    ‘default’ => 1
    );
    return $fields;
    }
    add_filter( ‘wpsc_ce_product_fields’, ‘wpsc_ce_custom_product_fields’ );

    function wpsc_ce_custom_product_item_leadtime( $product, $product_id ) {
    $product->leadtime = $product->lead-time;
    return $product;
    }
    add_filter( ‘wpsc_ce_product_item’, ‘wpsc_ce_custom_product_item_leadtime’, 10, 2 );

    #37562
    Michael Visser
    Keymaster

    Hi KatrinaMiller, just to clarify you did not define the value for $product->leadtime (the 3rd to last line), it needs to connect to something.

    $product->leadtime = get_post_meta( $product_id, ‘Lead Time’, true );

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] exporting custom field’ is closed to new replies.