Hi Support,
I want to put extra information about the product on the EAN via custom fields.
I dont get it working. For now i want this meta fields enabled:
$warehouse = get_post_meta($product_id, 'usbs_stock_location_level_1', true);
$rack = get_post_meta($product_id, 'usbs_stock_location_level_2', true);
$shelf = get_post_meta($product_id, 'usbs_stock_location_level_3', true);
i would like to have the warehouse locations printed on the barcodes extra fields on a single line format: for example like this: 1.1.1 (warehouse, rack,shelf)
with a different plugin i implemented the meta fields like this:
add_filter('wf_pklist_package_product_table_additional_column_val', 'wt_pklist_add_custom_col_vl', 10, 6);
function wt_pklist_add_custom_col_vl($column_data, $template_type, $columns_key, $_product, $order_item, $order) {
if ($columns_key == 'new_col') {
$product_id = get_effective_product_id($_product);
$warehouse = get_post_meta($product_id, 'usbs_stock_location_level_1', true);
$rack = get_post_meta($product_id, 'usbs_stock_location_level_2', true);
$shelf = get_post_meta($product_id, 'usbs_stock_location_level_3', true);
// Bouw de locatie string op
$location_str = "";
if (!empty($warehouse)) {
$location_str.='Warehouse: '.$warehouse.'<br>';
}
if (!empty($rack)) {
$location_str.='Rack: '.$rack.'<br>';
}
if (!empty($shelf)) {
$location_str.='Shelf: '.$shelf;
}
$column_data = $location_str;
}
return$column_data;
}