- Support forum for the WooCommerce EAN Barcode Generator: UPC, ISBN & GTIN Inventory.
Tagged: meta fields
- This topic has 2 replies, 3 voices, and was last updated 1 year, 2 months ago by Tom Anbinder.
- AuthorPosts
- September 18, 2023 at 11:50 am #124274AngeloParticipant
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; }
September 19, 2023 at 7:56 pm #124444MoshtafizurParticipantHi there,
I hope you are well today.
I have passed your request to our development team. They will get back to you as soon as possible.
Kind regards.
September 20, 2023 at 10:45 am #124497Hi, Angelo,
Do you mean in the “EAN > Print” section? If that’s the case, I think what you need is our
[alg_wc_ean_product_meta]
shortcode:[alg_wc_ean_product_meta key="usbs_stock_location_level_1"] [alg_wc_ean_product_meta key="usbs_stock_location_level_2"] [alg_wc_ean_product_meta key="usbs_stock_location_level_3"]
This should go in the “EAN > Print > Template” option.
Please give it a try and let me know what you think.
- AuthorPosts
- You must be logged in to reply to this topic.