Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

nicholaszen

Members
  • Content count

    36
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Nicholaszen
  • Website
  1. Hi Todd, that file worked like a blast.. thanks man.. ! :D
  2. Just tried to do it hard code.. but also doesn't work.. really don't know what to do.. or what I'm doing wrong..
  3. Hi Todd, I've put the exact names in the configuration admin interface (created with the files of Tone).. or do you think I need to hard code it, like in your example above.. ? I will try that.. maybe that would work better..
  4. Hi, I've a problem downloading all the attributes, for example if I've the following attributes: - size - color - type - extra - other In the $attributes_options_select I've filled in all the above attributes: size, color, type, extra, other But for some reason I can only download the 'size' attribute and all other attributes doesn't download.. I want to download this so I can make a default file, which I can easily update.. Is there something I'm doing wrong or forgot to do.. because I really can't get it working.. Hope someone could help me out.. BTW I'm using Easy Populate 2.76d
  5. nicholaszen

    NEW: Anti Robot Registration Validation

    I'm having the same problem with the size of the image..t's working.. but very small..
  6. nicholaszen

    Multi-Stores Multiple Shops Support

    Is there anyone out there who found a solution for the shared cart.. I know many have requested for this.. but still no one found it..?? I saw somewhere it's something with customers_basket_stores_id in classes/shopping_cart.php .. I hope someone could help me out.. because I really like this contrib.. but also really need a shared cart...
  7. nicholaszen

    FAQDesk v1.01.0 Support

    Hi I just installed this great contrib.. And it seems to work fine.. on the frontpage. I could see everything work.. and on the back side.. I see the links and every page seemed to work.. ONLY the faqdesk.php gives me a blank page for some reason.. I really can't see what's the problem.. The other contrib I'm using is multi-stores v1_9 could there be a conflict??
  8. nicholaszen

    rss.php fixes to get a valid feed

    Hi, the contrib works really good, but I can't get the images into it... How can I let that work? Thank u!
  9. nicholaszen

    Master Products - MS2

    Hi, for some reason I can't get the admin/categories.php to get it work... :( I've looked at this forum and have spent for more then a week to work.. but I really can't see what's the problem.. I know I did something wrong... but can't figure out what.. :'( Could you please help me... and see what I've done wrong... I see the buttons and everything.. but everytime I click on it.. It isn't doing anything, but reloading the page... :unsure: I think one of the other contribs is getting in the way, but not knowing which one and how I can fix it... Could you please help me... :'( Here is a part of the page... <?php // BOF Wolfen featured sets case 'setflag_featured': if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) { if (isset($HTTP_GET_VARS['pID'])) { tep_set_product_featured($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']); } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_GET_VARS['cPath'] . '&pID=' . $HTTP_GET_VARS['pID'])); break; case 'setflag_categories_featured': if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) { if (isset($HTTP_GET_VARS['cID'])) { tep_set_categories_featured($HTTP_GET_VARS['cID'], $HTTP_GET_VARS['flag']); } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); } } if ($categories['parent_id'] == '0') { tep_redirect(tep_href_link(FILENAME_CATEGORIES)); } else { tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath)); } // tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_GET_VARS['cPath'])); break; // EOF Wolfen featured sets case 'insert_category': case 'update_category': if (isset($HTTP_POST_VARS['categories_id'])) $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']); $distributors_id = tep_db_prepare_input($HTTP_POST_VARS['distributors_id']); //rmh M-S_multi-stores $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']); $sql_data_array = array('distributors_id' => $distributors_id, //rmh M-S_multi-stores 'sort_order' => $sort_order); if ($action == 'insert_category') { $insert_sql_data = array('parent_id' => $current_category_id, // BOF Wolfen featured sets 'date_added' => 'now()', 'categories_featured' => tep_db_prepare_input($HTTP_POST_VARS['categories_featured']), 'categories_featured_until' => tep_db_prepare_input($HTTP_POST_VARS['categories_featured_until'])); // EOF Wolfen featured sets $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_CATEGORIES, $sql_data_array); $categories_id = tep_db_insert_id(); } elseif ($action == 'update_category') { // BOF Wolfen featured sets $update_sql_data = array('last_modified' => 'now()', 'categories_featured' => tep_db_prepare_input($HTTP_POST_VARS['categories_featured']), 'categories_featured_until' => tep_db_prepare_input($HTTP_POST_VARS['categories_featured_until'])); // EOF Wolfen featured sets $sql_data_array = array_merge($sql_data_array, $update_sql_data); tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "'"); } $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $categories_name_array = $HTTP_POST_VARS['categories_name']; $language_id = $languages[$i]['id']; $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id])); if ($action == 'insert_category') { $insert_sql_data = array('categories_id' => $categories_id, 'language_id' => $languages[$i]['id']); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array); } elseif ($action == 'update_category') { tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$languages[$i]['id'] . "'"); } } if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_CATS)) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } //rmh M-S_multi-stores begin if (isset($HTTP_POST_VARS['stores_id'])) { $stores_id = tep_db_prepare_input($HTTP_POST_VARS['stores_id']); tep_db_query("delete from " . TABLE_CATEGORIES_TO_STORES . " where categories_id = '" . (int)$categories_id . "'"); for ($i=0, $n=sizeof($stores_id); $i<$n; $i++) { if (isset($HTTP_POST_VARS['stores_id'])) tep_db_query("insert into " . TABLE_CATEGORIES_TO_STORES . " (categories_id, stores_id) values ('" . (int)$categories_id . "', '" . (int)$stores_id[$i] . "')"); } } //rmh M-S_multi-stores end if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id)); break; case 'delete_category_confirm': if (isset($HTTP_POST_VARS['categories_id'])) { $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']); $categories = tep_get_category_tree($categories_id, '', array(0), '', true); //rmh M-S_multi-stores $products = array(); $products_delete = array(); for ($i=0, $n=sizeof($categories); $i<$n; $i++) { $product_ids_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$categories[$i]['id'] . "'"); while ($product_ids = tep_db_fetch_array($product_ids_query)) { $products[$product_ids['products_id']]['categories'][] = $categories[$i]['id']; } } reset($products); while (list($key, $value) = each($products)) { $category_ids = ''; for ($i=0, $n=sizeof($value['categories']); $i<$n; $i++) { $category_ids .= "'" . (int)$value['categories'][$i] . "', "; } $category_ids = substr($category_ids, 0, -2); $check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$key . "' and categories_id not in (" . $category_ids . ")"); $check = tep_db_fetch_array($check_query); if ($check['total'] < '1') { $products_delete[$key] = $key; } } // removing categories can be a lengthy process tep_set_time_limit(0); for ($i=0, $n=sizeof($categories); $i<$n; $i++) { tep_remove_category($categories[$i]['id']); } reset($products_delete); while (list($key) = each($products_delete)) { tep_remove_product($key); } } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath)); break; case 'delete_product_confirm': if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['product_categories']) && is_array($HTTP_POST_VARS['product_categories'])) { $product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $product_categories = $HTTP_POST_VARS['product_categories']; for ($i=0, $n=sizeof($product_categories); $i<$n; $i++) { tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "' and categories_id = '" . (int)$product_categories[$i] . "'"); } $product_categories_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "'"); $product_categories = tep_db_fetch_array($product_categories_query); if ($product_categories['total'] == '0') { tep_remove_product($product_id); } } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath)); break; case 'move_category_confirm': if (isset($HTTP_POST_VARS['categories_id']) && ($HTTP_POST_VARS['categories_id'] != $HTTP_POST_VARS['move_to_category_id'])) { $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']); $new_parent_id = tep_db_prepare_input($HTTP_POST_VARS['move_to_category_id']); $path = explode('_', tep_get_generated_category_path_ids($new_parent_id)); if (in_array($categories_id, $path)) { $messageStack->add_session(ERROR_CANNOT_MOVE_CATEGORY_TO_PARENT, 'error'); tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id)); } else { tep_db_query("update " . TABLE_CATEGORIES . " set parent_id = '" . (int)$new_parent_id . "', last_modified = now() where categories_id = '" . (int)$categories_id . "'"); if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $new_parent_id . '&cID=' . $categories_id)); } } break; case 'move_product_confirm': $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $new_parent_id = tep_db_prepare_input($HTTP_POST_VARS['move_to_category_id']); $duplicate_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$new_parent_id . "'"); $duplicate_check = tep_db_fetch_array($duplicate_check_query); if ($duplicate_check['total'] < 1) tep_db_query("update " . TABLE_PRODUCTS_TO_CATEGORIES . " set categories_id = '" . (int)$new_parent_id . "' where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$current_category_id . "'"); if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $new_parent_id . '&pID=' . $products_id)); break; //Master Products case 'insert_master': case 'update_master': if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) { $action = 'new_master'; } else { if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']); $products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']); $products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null'; $products_master_status = '1'; $sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']), 'products_bundle' => tep_db_prepare_input($HTTP_POST_VARS['products_bundle']), 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']), 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']), 'products_cost' => tep_db_prepare_input($HTTP_POST_VARS['products_cost']), 'products_qty_blocks' => (($i=tep_db_prepare_input($HTTP_POST_VARS['products_qty_blocks'])) < 1) ? 1 : $i, //rmh M-S_pricing 'products_date_available' => $products_date_available, 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']), 'products_master_status' => tep_db_prepare_input($HTTP_POST_VARS['products_master_status']), 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']), 'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id'])); if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) { $sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']); } if (isset($HTTP_POST_VARS['products_subimage1']) && tep_not_null($HTTP_POST_VARS['products_subimage1']) && ($HTTP_POST_VARS['products_subimage1'] != 'none')) { $sql_data_array['products_subimage1'] = tep_db_prepare_input($HTTP_POST_VARS['products_subimage1']); } if ($action == 'insert_master') { $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(); //rmh M-S_multi-stores inserted next line tep_db_query("insert into " . TABLE_PRODUCTS_TO_STORES . " (products_id, stores_id) values ('" . (int)$products_id . "', '" . (int)$selected_store_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_master') { $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 . "'"); } $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $language_id = $languages[$i]['id']; $sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]), // BOF Wolfen featured sets 'products_short' => tep_db_prepare_input($HTTP_POST_VARS['products_short'][$language_id]), // EOF Wolfen featured sets 'products_description' => tep_db_prepare_input($HTTP_POST_VARS['products_description'][$language_id]), 'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id])); if ($action == 'insert_master') { $insert_sql_data = array('products_id' => $products_id, 'language_id' => $language_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array); } elseif ($action == 'update_master') { tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'"); } } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id)); } break; // Master Products EOF case 'insert_product': case 'update_product': if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) { $action = 'new_product'; } else { if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']); $products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']); $products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null'; $sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']), 'products_bundle' => tep_db_prepare_input($HTTP_POST_VARS['products_bundle']), 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']), 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']), 'products_cost' => tep_db_prepare_input($HTTP_POST_VARS['products_cost']), 'products_qty_blocks' => (($i=tep_db_prepare_input($HTTP_POST_VARS['products_qty_blocks'])) < 1) ? 1 : $i, //rmh M-S_pricing 'products_date_available' => $products_date_available, 'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']), // BOF Wolfen featured sets 'products_featured' => tep_db_prepare_input($HTTP_POST_VARS['products_featured']), 'products_featured_until' => tep_db_prepare_input($HTTP_POST_VARS['products_featured_until']), // EOF Wolfen featured sets 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']), // Master Products 'products_listing_status' => tep_db_prepare_input($HTTP_POST_VARS['products_listing_status']), 'products_master_status' => tep_db_prepare_input($HTTP_POST_VARS['products_master_status']), 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']), 'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id']), 'products_master' => tep_db_prepare_input($HTTP_POST_VARS['products_master'])); // Master Products EOF if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) { $sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']); } if (isset($HTTP_POST_VARS['products_subimage1']) && tep_not_null($HTTP_POST_VARS['products_subimage1']) && ($HTTP_POST_VARS['products_subimage1'] != 'none')) { $sql_data_array['products_subimage1'] = tep_db_prepare_input($HTTP_POST_VARS['products_subimage1']); } 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(); //rmh M-S_multi-stores inserted next line tep_db_query("insert into " . TABLE_PRODUCTS_TO_STORES . " (products_id, stores_id) values ('" . (int)$products_id . "', '" . (int)$selected_store_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(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $language_id = $languages[$i]['id']; $sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]), 'products_short' => tep_db_prepare_input($HTTP_POST_VARS['products_short'][$language_id]), // Wolfen featured sets 'products_description' => tep_db_prepare_input($HTTP_POST_VARS['products_description'][$language_id]), 'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id])); if ($action == 'insert_product') { $insert_sql_data = array('products_id' => $products_id, 'language_id' => $language_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array); } elseif ($action == 'update_product') { tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'"); } } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id)); } break; case 'copy_to_confirm': if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['categories_id'])) { $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']); if ($HTTP_POST_VARS['copy_as'] == 'link') { if ($categories_id != $current_category_id) { $check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$categories_id . "'"); $check = tep_db_fetch_array($check_query); if ($check['total'] < '1') { tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$categories_id . "')"); } } else { $messageStack->add_session(ERROR_CANNOT_LINK_TO_SAME_CATEGORY, 'error'); } } elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') { // BOF Wolfen featured sets $product_query = tep_db_query("select products_quantity, products_model, products_image, products_subimage1, products_subimage2, products_subimage3, products_subimage4, products_subimage5, products_subimage6, products_price, products_cost, products_qty_blocks, products_date_available, products_weight, products_tax_class_id, products_featured, products_featured_until, distributors_id, manufacturers_id, products_master, products_master_status from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $product = tep_db_fetch_array($product_query); //rmh M-S_multi-stores edited next line tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_image, products_subimage1, products_subimage2, products_subimage3, products_subimage4, products_subimage5, products_subimage6, products_price, products_cost, products_date_added, products_date_available, products_weight, products_status, products_featured, products_featured_until, products_tax_class_id, manufacturers_id, products_master, products_master_status) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_subimage1']) . "', '" . tep_db_input($product['products_subimage2']) . "', '" . tep_db_input($product['products_subimage3']) . "', '" . tep_db_input($product['products_subimage4']) . "', '" . tep_db_input($product['products_subimage5']) . "', '" . tep_db_input($product['products_subimage6']) . "', '" . tep_db_input($product['products_price']) . "', now(), '" . tep_db_input($product['products_cost']) . "', now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_featured'] . "', '" . (int)$product['products_featured_until'] . "', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')" . $product['products_master'] . "', '" . (int)$product['products_master_status'] . "')"); $dup_products_id = tep_db_insert_id(); // Master Products EOF $description_query = tep_db_query("select language_id, products_name, products_description, products_short, products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$products_id . "'"); while ($description = tep_db_fetch_array($description_query)) { tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_short, products_url, products_viewed) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_short']) . "', '" . tep_db_input($description['products_url']) . "', '0')"); } // EOF Wolfen featured sets tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$dup_products_id . "', '" . (int)$categories_id . "')"); $products_id = $dup_products_id; } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $categories_id . '&pID=' . $products_id)); break; case 'new_product_preview': $products_image = new upload('products_image'); $products_image->set_destination(DIR_FS_CATALOG_IMAGES); if ($products_image->parse() && $products_image->save()) { $products_image_name = $products_image->filename; } else { $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : ''); } break; case 'new_master_preview': //rmh M-S_multi-stores begin case 'category_to_stores_confirm': if (isset($HTTP_POST_VARS['categories_id'])) { $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']); $stores_id = tep_db_prepare_input($HTTP_POST_VARS['stores_id']); tep_db_query("delete from " . TABLE_CATEGORIES_TO_STORES . " where categories_id = '" . (int)$categories_id . "'"); for ($i=0, $n=sizeof($stores_id); $i<$n; $i++) { if (isset($HTTP_POST_VARS['stores_id'])) tep_db_query("insert into " . TABLE_CATEGORIES_TO_STORES . " (categories_id, stores_id) values ('" . (int)$categories_id . "', '" . (int)$stores_id[$i] . "')"); } if (isset($HTTP_POST_VARS['rolldown_store']) && ($HTTP_POST_VARS['rolldown_store'] == 'on')) { $categories = tep_get_category_tree($categories_id, '', array(0), '', true); $products = array(); $products_add = array(); for ($i=0, $n=sizeof($categories); $i<$n; $i++) { $product_ids_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$categories[$i]['id'] . "'"); while ($product_ids = tep_db_fetch_array($product_ids_query)) { $products[$product_ids['products_id']]['categories'][] = $categories[$i]['id']; } } reset($products); while (list($key, $value) = each($products)) { $category_ids = ''; for ($i=0, $n=sizeof($value['categories']); $i<$n; $i++) { $category_ids .= "'" . (int)$value['categories'][$i] . "', "; } $category_ids = substr($category_ids, 0, -2); $check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$key . "' and categories_id not in (" . $category_ids . ")"); $check = tep_db_fetch_array($check_query); if ($check['total'] < '1') { $products_add[$key] = $key; tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $categories_id . '&pID=' . $products_id)); break; } } ?>
  10. nicholaszen

    Multi-Stores Multiple Shops Support

    I've just installed this contribution (1.7/1.71)... but having the following problem: 1146 - Table 'domainname.TABLE_CONFIGURATION' doesn't exist select configuration_key as cfgKey, configuration_value as cfgValue from TABLE_CONFIGURATION [TEP STOP] I've read this thread and there was said you need to check if the TABLE_CONFIGURATION was set as 'configuration' (like in my application_top) and yes.. I've haven't changed it and it's still there... So this is very strange... In my database_tables.php I've the following: //rmh M-S_multi-stores *Commented out due to: table selection done in application_top.php* define('TABLE_CONFIGURATION', 'configuration'); But if I change it into: define('TABLE_CONFIGURATION', 'configuration'); I will get an error message that function/generals.php row 8 is fault... What have I done wrong.. Could someone please help me.. Thank you!
  11. I've installed the following contribution: Partita IVA 2.51 & Codice Fiscale http://www.oscommerce.com/community/contributions,1180 and everything seems okay.. till I tested it, by creating a new account... so I filled in every line I had... but when I want to "continue" it tells me... that I've: 1. Incorrect Tax Identification Number. 2. Incorrect VAT Number. BUT if I let these 2 fields blank... there's no problem.. It goes to the create_account_success.php page.... What do you think I've done wrong..!? :'( Cause I really can't find the problem, search everywhere.. in the Italian Oscommerce forum/ Official Oscommerce forum / Dutch Oscommerce forum... looked again at the contribution.. But I really can't find it.... So could you please help me... Thank you....
  12. nicholaszen

    [Contribution] Products Listing

    <?php if ($HTTP_GET_VARS['page'] > 1) $rows = $HTTP_GET_VARS['page'] * 20 - 20; $products_query_raw = "select DISTINCT pd.products_name, p.products_id, p.products_model, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_LANGUAGES . " l where p.products_id = pd.products_id and p.products_id = pd.products_id and l.languages_id = pd.language_id order by pd.products_name ASC"; $products_query = tep_db_query($products_query_raw); while ($products = tep_db_fetch_array($products_query)) { $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } ?> I think there should be changed here above.. but I don't know how... PHP newbie... :blush:
  13. nicholaszen

    [Contribution] Products Listing

    Anyone!? :'( Here is a link how it looks like now... Click here ... And is it possible to make use 2 digits after the comma instead of 4!? Thank you!!!
  14. I really like the following contribution.. which will make a clean HTML page with all your products and prices.. http://www.oscommerce.com/community/contri...roducts+Listing BUT could someone tell me how I could add my tax to it...!?!?! :blush:
  15. nicholaszen

    Newsletter & Subscribtion for MS2

    After I installed this contribution I've the following problem can someone please help me... (without me re-installing everything please) Fatal error: Call to undefined function: tep_get_languages() in /home/httpd/vhosts/mydomain/httpdocs/admin/index.php on line 58
×