Forums › EAN and Barcodes for WooCommerce › Field to store the EAN
- Support forum for the WooCommerce EAN Barcode Generator: UPC, ISBN & GTIN Inventory.
- This topic has 6 replies, 2 voices, and was last updated 3 years, 1 month ago by
Tom Anbinder.
-
AuthorPosts
-
March 2, 2022 at 10:25 am #85114
Julien Vanwinsberghe
GuestHello,
I’m interested to buy the plugin for a client, but there one issue I have to fix before.
Can you add an option to choose in which field to store the EAN by default?
Instead of saving it in a custom EAN field, it would be great to have the ability to choose between product ID and SKU fields as well.
My client is using the OpenPOS plugin as Point of Sale, and it doesn’t have the ability to use your EAN custom field.
I’ve tested other barcode plugins and most of them use the SKU field, so it would be good to have the option to use this field for being able to switch from other plugins to yours as well.
I’ve seen that you recommend to export product data as CSV and import the EAN field data into the SKU field, but I can’t ask my client to do this everytime he creates barcodes.
Thanks in advance for your reply
March 2, 2022 at 3:15 pm #85115Hi Julien,
Yes, this is possible. What you need to do, is go to “WooCommerce > Settings > EAN > Advanced” and set the “Meta key” option there to
_sku
.Also, if you wish, I can try to make your POS plugin compatible instead. In that case, please send me the link to your POS plugin (or if it’s a paid one, please send me its zip to [email protected]).
Hope this helps. Please let me know if you have any questions.
March 2, 2022 at 5:09 pm #85116Julien
GuestThanks for the fast reply! It works, now the barcode is saved in the SKU field 🙂
But it is also created in the EAN custom field. It may confuse my client to have the barcode in two fields. Is there a way to remove the EAN custom field to only use the SKU field?
March 2, 2022 at 9:05 pm #85117I would suggest to try doing it the other way around – i.e. instead disable SKU by adding this PHP snippet (e.g. to your (child) theme’s functions.php file):
add_filter( 'wc_product_sku_enabled', '__return_false' );
Also – not sure if you really need it though – you can change our “Title” option (in “WooCommerce > Settings > EAN”) from the default “EAN” to “SKU”.
Please give it a try and let me know what you think.
March 3, 2022 at 4:36 am #85118Julien
GuestThanks Tom for your advice. The problem is that I need to use the SKU field for compatibility with other plugins and functionalities (WooCommerce CSV Import using the SKU as ID for updates, OpenPOS for point of sale, reporting plugin, other plugin a bit more easy to use to print the barcodes, etc). Can I hide the EAN field with a code snippet?
March 3, 2022 at 5:11 pm #85119Hi Julien,
Ok, got it. Let me work on it (as well as on your other questions) and get back to you a bit later today.
March 3, 2022 at 10:41 pm #85120Hi again, Julien,
Please update the plugin to the latest v3.6.0. Then add this PHP snippet to your site:
add_filter( 'alg_wc_ean_edit', '__return_false' );
This should hide the EAN input field on the product edit page (and in “quick edit” and “bulk edit” as well).
Give it a try and let me know if it’s working as expected.
-
AuthorPosts
- You must be logged in to reply to this topic.