Hi,
With several option products to pre-select, you do not want to hardcode each id in the override. The clean way is a custom product field that flags which products are pre-selected, then you check that field instead of a fixed id.
1. Go to Display > Custom Fields and create a new field with Table set to "Product" and type "Single dropdown", with two values: 0 for "No" and 1 for "Yes" (default "No"). Give it a column name, for example option_default. Publish it. It then appears on every product edit page.
2. Edit each Support product (39, 36, 13, ...) and set that new field to "Yes". Leave all the other products on "No".
3. In your option view override, replace the fixed id test with the field:
if(empty($optionElement->variants) && !empty($optionElement->option_default))
$value = $optionElement->product_id;
Use the column name you chose in place of option_default. From then on you decide which options are pre-selected directly from the product edit page, with no further code change when you add a new product.
If you would rather not add a field, you can instead list the ids in the override and add to the list over time:
$preselect = array(39, 36, 13);
if(empty($optionElement->variants) && in_array($optionElement->product_id, $preselect))
$value = $optionElement->product_id;
Note that, thinking about this, we've decided to add extra options to products for this in the next version of HikaShop.
So, ideally, I would recommend switching to the new options after you update HikaShop to 6.5.1 (or a later version).