the manufacturers function in oscommerce is proving to be very useful feature, I'm using it to filter products by their conditions. I then wanted to be able to have another of such functionalities to filter my products ones more I have dublicated all the files and code snippets related to manufacturers and called it 'byproducts'; so far I managed to get most of it working:
In the admin area I can add the new byproducts (manufacturers) - and then I can view the combo box in the view pages (exactly like having a second manufacturers combo box, but with different content)
Now the problem is when trying to assign the byproducts to a new product. Again I managed to place the option into the .../admin/categories.php - so the user can type the product name, select their manufacturer and select the 'byproduct' such the sameway.
But when I add the product to the database, everthing gets added to the products table apart from the byproducts_id
I made sure that I have made the right changes to the database. this is the code that I think should be running when I add a new product
From .../admin/categories.php
tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, byproducts_id)
values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "', '" . (int)$product['byproducts_id'] . "')");
$dup_products_id = tep_db_insert_id();
This code does not give any errors, as I said I am aware that I needed to add code to other files, so every file that mentioned manufacturer, I coped the coped/pasted the code and changed the manufacturer to byproducts - But I have a strong feeling that the problem is not in the above code but somewhere else
thanks a lot for your help