If I need to offer a product in a WooCommerce product tab inside another product I can. This can be done with a WooCommerce shortcode
Now if you also want the customer to be able to add this product to the cart you can add a cart button and connect it to the product id like so
However what I need is to have the sample product in tab to be connected to the parent product. Connected in the way that the main product SKU and and title are connected to the sample product in the tab. The sample product is a separate product this way now. But it is a sample of the main product.
The reason to add it this way is to be able to not add hundreds of sample products besides the main product. And all these sample products cost the same and do not need a separate thumbnail per se.
Pass SKU and Title Main Product to Sample Product
Now, how can I on adding to cart add this sample product to be added with the name and SKU of the product its page it is displayed on in a WooCommerce Tab?
So let's say a loaf of wholewheat bread SKU 1238, price €1.23, sample slice €0.2 - sku 125 - is added to cart with name Wholewheat Bread Sample SKU 1238, price €0.22.
Question in detail
Can I do this with this general sample product somehow? This so the seller sees what sample to send basically? By having the title and SKU of the product the sample is based on. And to not have to great hundreds of sample products?