We are using the Bulk Order Form – Classic Theme, and I would like to add support for searching products by barcode. Specifically, I would like the search field to also look into the product meta field called `_global_unique_id`, which we use to store GTIN, UPC, EAN, or ISBN codes.
If this customization is possible within the Classic Theme, I would greatly appreciate your help with implementing it.
This will modify the SKU search functionality so that when you select the SKU search option in the form, it will search both the product SKU and your custom '_global_unique_id' field that contains the GTIN/UPC/EAN codes.
The last filter also changes the display text of the search option from "SKU" to "SKU / Unique ID" on the frontend.
Let me know if you need any clarification or run into any issues!
Hello,
I hope you're doing well.
We are using the Bulk Order Form – Classic Theme, and I would like to add support for searching products by barcode. Specifically, I would like the search field to also look into the product meta field called `_global_unique_id`, which we use to store GTIN, UPC, EAN, or ISBN codes.
If this customization is possible within the Classic Theme, I would greatly appreciate your help with implementing it.
Thank you in advance!
Attached files: barcodee.jpg
Hi Dario,
Yes, we can do that using some code snippets:
You can add the following code snippets to your theme's functions.php file or using a code snippets plugin:
This will modify the SKU search functionality so that when you select the SKU search option in the form, it will search both the product SKU and your custom '_global_unique_id' field that contains the GTIN/UPC/EAN codes.
The last filter also changes the display text of the search option from "SKU" to "SKU / Unique ID" on the frontend.
Let me know if you need any clarification or run into any issues!
Kind regards,
Stefan