Monk Posted August 19, 2004 Share Posted August 19, 2004 Hello, I am using the Bundled Products contribution. It works fine if you are creating a NEW product contribution made up from one or more other products. This works Great!! My problem is that I have several hundred products that I have entered into the inventory of my store, that are really made up from 2 other products. At the time, I did not know about the bundled products and now I want to go back and turn these items into a bundled product for inventory purposes. The issue is the contribution DOES NOT let you edit an existing product to BECOME a bundled product. Nor does it allow you to edit a bundled product once it has been created. Anyone that has an answer for this....I would love to hear!! It seems that others are having similar problems, and I know that we are only a short time till one of us figures it out. Quote Link to comment Share on other sites More sharing options...
guntersammet Posted November 4, 2004 Share Posted November 4, 2004 There is a little bug in the description of the install. You need to move the "update bundle contents" in categories.php a few lines down. It should look like this: if ($action == 'insert_product') { $insert_sql_data = array('products_date_added' => 'now()'); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_PRODUCTS, $sql_data_array); $products_id = tep_db_insert_id(); tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$current_category_id . "')"); } elseif ($action == 'update_product') { $update_sql_data = array('products_last_modified' => 'now()'); $sql_data_array = array_merge($sql_data_array, $update_sql_data); tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'"); } // update bundle contents if ($HTTP_POST_VARS['products_bundle'] == 'yes') { tep_db_query("DELETE FROM products_bundles WHERE bundle_id = '" . $products_id . "'"); for ($i=0, $n=6; $i<$n; $i++) { if (isset($HTTP_POST_VARS['subproduct_' . $i . '_qty']) && $HTTP_POST_VARS['subproduct_' . $i . '_qty'] > 0) { tep_db_query("INSERT INTO products_bundles (bundle_id, subproduct_id, subproduct_qty) VALUES ('" . $products_id . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_id'] . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_qty'] . "')"); } } } $languages = tep_get_languages(); Also noticed a little typo in the if statement. It should read: if ($HTTP_POST_VARS['products_bundle'] == 'yes') { AND NOT if ($HTTP_POST_VARS['products_bundle'] = 'yes') { HTH Gunter Quote Link to comment Share on other sites More sharing options...
Dennisra Posted June 10, 2005 Share Posted June 10, 2005 Can you help with this: some of my bundles contain up to 40 products. How can I add more than the default 6 allowed? Quote Link to comment Share on other sites More sharing options...
Dennisra Posted June 10, 2005 Share Posted June 10, 2005 as for more than 6 subproducts: in categories.php, find CODE function fillCodes() { for (var n=0;n<6;n++) { and change the "6". then find all occurences of (there are two) and change the 6 CODE for ($i=0, $n=6; $i<$n; $i++) { Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.