Hi Aaron,
I did look into this but had to abandon due to other priorities. Hopefully this thread can generate a solution! I noted some juicy bits of code for you from the model folders, which the /admin/controller/tool/csv_import.php does have access to. On a positive note, as you pointed out, csv_import.php admin controller does have a line of code for product_related... so perhaps all that is necessary is to supply the data -in the correct syntax?
/admin/model/product.php (search for 'product_related'):
Code: Select all
if (isset($data['product_related'])) {
foreach ($data['product_related'] as $related_id) {
$this->db->query("INSERT INTO " . DB_PREFIX . "product_related SET product_id = '" . (int)$product_id . "', related_id = '" . (int)$related_id . "'");
$this->db->query("INSERT INTO " . DB_PREFIX . "product_related SET product_id = '" . (int)$related_id . "', related_id = '" . (int)$product_id . "'");
}
}
/admin/model/tool/csv_import.php
Code: Select all
$query = $this->db->query("TRUNCATE TABLE " . DB_PREFIX . "product_related");
All the best,
Gary