I have some coding that places the SKUs and BARCODEs of products onto the front end of the website. So that customers can see these on the product pages. The admin enters them into the back end fields and they are visible on the front end on product pages.
This works fine for regular products. However we needed a new template for variable products. It is the same coding, but in this case only the SKU is shown properly. The BARCODE is not displayed, and instead the SKU data is there. So although on the front end it has signs for SKU and BARCODE, the SKU data field from the backend is being displayed twice in the frontend.
The variable products have different SKUs and BARCODEs variants. When switching between the variants on the front end, the SKUs change as they should. However the BARCODE data is not displayed at all. Rather is replaced by the SKU data.