Jump to content

invasi0n

Members
  • Content count

    157
  • Joined

  • Last visited

Everything posted by invasi0n

  1. invasi0n

    Seperate Pricing Per Customer v3.5

    Hello Jan, I was wondering if you have ever considered to merge SPPC and Hide products from customer groups for SPPC. "Hide products" could be difficult to install at this time because it is not based on RC2a. Thanks.
  2. invasi0n

    Who's Online Enhancement 1.4

    Ah, yes I noticed those links but Dnsstuff is considered by many, a serious website.
  3. invasi0n

    Who's Online Enhancement 1.4

    Hello, Can you please tell us what's the other website? I have the previous version and I can't find other website that logs customers info. Thank you for your work.
  4. invasi0n

    [Contribution] Database Manager

    Hello, I just tried this contribution with safe_mode ON and I get this error: Fatal error: Maximum execution time of 60 seconds exceeded in F:\xampp\htdocs\... Database size is 1.8 MB. I use firefox and JavaScript is enabled. If I turn safe_mode Off, it works without problems.
  5. invasi0n

    cDynamic Meta Tags

    Hi, I just tried this contribution with php5 (safe mode on) and mysql 5, and everytime i edit, change status or add a product, the following appears: Warning: Invalid argument supplied for foreach() in F:\xampp\htdocs\test\admin\includes\reset_meta_cache.php on line 36 Warning: Cannot modify header information - headers already sent by (output started at F:\xampp\htdocs\test\admin\includes\reset_meta_cache.php:36) in F:\xampp\htdocs\test\admin\includes\functions\general.php on line 67 The problem seems to be here: # DO NOT ALTER OR EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING # foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) { unlink($filename_page); } Thanks.
  6. Hi, I couldn't get it work because lightbox.css was missing but now everything works great. Thanks. :thumbsup:
  7. invasi0n

    [Contribution] Database Manager

    I understand now. Thanks.
  8. invasi0n

    [Contribution] Database Manager

    Hi, I downloaded the contribution and i think everything works perfect. There's just one thing that I don't understand... You said that we have to let the script to do its job, and do not click on anything, but screenshot_restore_1.gif shows a Submit button. What is its use? Thanks.
  9. invasi0n

    Seperate Pricing Per Customer v3.5

    Great! Thank You very much. :thumbsup:
  10. Hi, Sorry for opening a new one, but I can't find the thread for this great contribution. The following problems occurred while trying to put together this contribution and RC2a: In catalog/admin/categories.php it says: **REPLACE** $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']); $sql_data_array = array('sort_order' => $sort_order); Current code in that file is: $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']); $sql_data_array = array('sort_order' => (int)$sort_order); In catalog/admin/categories.php it says: **REPLACE** $sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']), 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']), 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']), 'products_date_available' => $products_date_available, 'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']), 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_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'])); Current code is: $sql_data_array = array('products_quantity' => (int)tep_db_prepare_input($HTTP_POST_VARS['products_quantity']), 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']), 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']), 'products_date_available' => $products_date_available, 'products_weight' => (float)tep_db_prepare_input($HTTP_POST_VARS['products_weight']), 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']), 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']), 'manufacturers_id' => (int)tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id'])); In catalog/index.php it says: **REPLACE** // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { . . . if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { Current code: // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category // BOF Separate Pricing Per Customer if ($status_product_prices_table == true) { . . . if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { In catalog/includes/boxes/whats_new.php it says: **REPLACE** if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { Current code: if ($random_product = tep_random_select("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) { In catalog/includes/modules/new_products.php it says: if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { // BOF Separate Pricing per Customer $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit ". MAX_DISPLAY_NEW_PRODUCTS); } // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } Current code: $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) left join " . TABLE_CATEGORIES . " c using(categories_id) where c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } In catalog/advanced_search_result.php it says: **REPLACE** if ($status_tmp_product_prices_table == true) { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; } elseif ($status_tmp_special_prices_table == true) { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id , " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; } else { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; } // EOF Separate Pricing Per Customer Current code: if ($status_tmp_product_prices_table == true) { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . $product_prices_table . " as tmp_pp using(products_id)"; } elseif ($status_tmp_special_prices_table == true) { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id "; } else { $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id) "; } // EOF Separate Pricing Per Customer In catalog/product_info.php it says: **REPLACE** $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); // BOF Separate Price per Customer if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } // EOF Separate Price per Customer Current code: $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); // BOF Separate Pricing per Customer if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } // EOF Separate Pricing per Customer In catalog/product_reviews.php it says: **REPLACE** $product_info_query = tep_db_query("select p.products_id, p.products_model, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); if (!tep_db_num_rows($product_info_query)) { tep_redirect(tep_href_link(FILENAME_REVIEWS)); } else { $product_info = tep_db_fetch_array($product_info_query); } // BOF Separate Pricing Per Customer // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } Current code: $product_info_query = tep_db_query("select p.products_id, p.products_model, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); if (!tep_db_num_rows($product_info_query)) { tep_redirect(tep_href_link(FILENAME_REVIEWS)); } else { // BOF Separate Pricing Per Customer // global variable (session) $sppc_customer_group_id -> local variable customer_group_id if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } Everything else is perfect. Any help is highly appreciated. Thank you.
  11. invasi0n

    Seperate Pricing Per Customer v3.5

    Thanks for your reply, I made the modification in catalog/includes/classes/shopping_cart.php, and for catalog/includes/modules/new_products.php I use your file. But I really can't see where should I click to see the new admin/product_attributes.php
  12. invasi0n

    Seperate Pricing Per Customer v3.5

    The problems I have are the followings: In catalog/includes/classes/shopping_cart.php I cannot find $this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } else { $this->total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); Rc2a has this code: $this->total += $currencies->calculate_price($attribute_price['options_values_price'], $products_tax, $qty); } else { $this->total -= $currencies->calculate_price($attribute_price['options_values_price'], $products_tax, $qty); In catalog/includes/modules/new_products.php cannot find: $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } $row = 0; $col = 0; $info_box_contents = array(); while ($new_products = tep_db_fetch_array($new_products_query)) { $new_products['products_name'] = tep_get_products_name($new_products['products_id']); RC2a has the following code: $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } $row = 0; $col = 0; $info_box_contents = array(); while ($new_products = tep_db_fetch_array($new_products_query)) { And in catalog/admin/product_attributes.php almost everything is different. All other files are ok, i think there's no need to make any change.
  13. invasi0n

    Seperate Pricing Per Customer v3.5

    Hi, I'm trying to add Separate Pricing Per Customer 4.2.0 to RC2a but there are some problems with: catalog/admin/product_attributes.php catalog/includes/classes/shopping_cart.php catalog/includes/modules/new_products.php I think this wonderful contribution needs an update. Thanks.
  14. I'm sorry but I've made a mistake here. What you have to replace in catalog/includes/languages/english/product_info.php is define('TEXT_FREE_GIFT', 'Free gift with $' . $product_gift['threshold'] . ' purchase.'); with define('TEXT_FREE_GIFT', 'Free gift with ' . $currencies->display_price($product_gift['threshold'], tep_get_tax_rate($product_gift['products_tax_class_id'])) . ' purchase.');
  15. invasi0n

    Who's Online Enhancement 1.4

    If you don't want the admin to be considered a real customer search for: // Subtract Bots and Me from Real Customers. Only subtract me once as Dupes will remove others $total_cust = $total_sess - $total_bots - ($total_admin > 1? 1 : $total_admin); // $total_cust = $total_sess - $total_dupes - $total_bots - ($total_admin > 1? 1 : $total_admin); and Replace with: // Subtract Bots and Me from Real Customers. Only subtract me once as Dupes will remove others // $total_cust = $total_sess - $total_bots - ($total_admin > 1? 1 : $total_admin); $total_cust = $total_sess - $total_dupes - $total_bots - ($total_admin > 1? 1 : $total_admin);
  16. invasi0n

    Who's Online Enhancement 1.4

    I think the contribution is not working well. I think it should not consider the admin a real customer.
  17. Hello, I've done exactly what Harald Ponce de Leon said here and everything works just fine with one exception, the FAQ System. The problem is that the Admin side (faq_manager.php) is like dead. I can't edit, add, delete faqs anymore. Anyone knows where the problem could be? Here is admin/faq_manager.php <?php /* FAQ system for OSC 2.2 MS2 v2.1 22.02.2005 Originally Created by: http://adgrafics.com admin@adgrafics.net Updated by: http://www.webandpepper.ch osc@webandpepper.ch v2.0 (03.03.2004) Last Modified: http://shopandgo.caesium55.com timmhaas@web.de v2.1 (22.02.2005) Released under the GNU General Public License osCommerce, Open Source E-Commerce Solutions Copyright (c) 2004 osCommerce */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/faq.php'); require(DIR_WS_FUNCTIONS . '/faq.php'); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo FAQ_SYSTEM; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"> <table border=0 width="100%"> <?php switch($faq_action) { case "Added": $data = browse_faq($language,$HTTP_GET_VARS); $no = 1; if (sizeof($data) > 0) { while (list($key, $val) = each($data)) { $no++; } }; $title = FAQ_ADD . ' #' . $no; echo tep_draw_form('',FILENAME_FAQ_MANAGER, 'faq_action=AddSure'); include('faq_form.php'); break; case "AddSure": function add_faq ($data) { $query = "INSERT INTO " . TABLE_FAQ . " VALUES(null, '$data[visible]', '$data[v_order]', '$data[question]', '$data[answer]', NOW(''),'$data[faq_language]')"; tep_db_query($query); unset($HTTP_POST_VARS); } if ($v_order && $answer && $question) { if ((INT)$v_order) { add_faq($HTTP_POST_VARS); $data = browse_faq($language,$HTTP_GET_VARS); $title = FAQ_CREATED . ' ' . FAQ_ADD_QUEUE . ' ' . $v_order; include('faq_list.php'); } else { $error = 20; } } else { $error = 80; } break; case "Edit": if ($faq_id) { $edit = read_data($faq_id); $data = browse_faq($language,$HTTP_GET_VARS); $button = array("Update"); $title = FAQ_EDIT_ID . ' ' . $faq_id; echo tep_draw_form('',FILENAME_FAQ_MANAGER, 'faq_action=Update'); echo tep_draw_hidden_field('faq_id', $faq_id); include('faq_form.php'); } else { $error = 80; } break; case "Update": function update_faq ($data) { tep_db_query("UPDATE " . TABLE_FAQ . " SET question='$data[question]', answer='$data[answer]', visible='$data[visible]', v_order=$data[v_order], date = now() WHERE faq_id=$data[faq_id]"); } if ($faq_id && $question && $answer && $v_order) { if ((INT)$v_order) { update_faq($HTTP_POST_VARS); $data = browse_faq($language,$HTTP_GET_VARS); $title = FAQ_UPDATED_ID . ' ' . $faq_id; include('faq_list.php'); } else { $error = 20; } } else { $error = 80; } break; case 'Visible': function tep_set_faq_visible($faq_id, $HTTP_GET_VARS) { if ($HTTP_GET_VARS['visible'] == 1) { return tep_db_query("update " . TABLE_FAQ . " set visible = '0', date = now() where faq_id = '" . $faq_id . "'"); } else{ return tep_db_query("update " . TABLE_FAQ . " set visible = '1', date = now() where faq_id = '" . $faq_id . "'"); } } tep_set_faq_visible($faq_id, $HTTP_GET_VARS); $data = browse_faq($language,$HTTP_GET_VARS); if ($HTTP_GET_VARS['visible'] == 1) { $vivod = FAQ_DEACTIVATED_ID; } else { $vivod = FAQ_ACTIVATED_ID; } $title = $vivod . ' ' . $faq_id; include('faq_list.php'); break; case "Delete": if ($faq_id) { $delete = read_data($faq_id); $data = browse_faq($language,$HTTP_GET_VARS); $title = FAQ_DELETE_CONFITMATION_ID . ' ' . $faq_id; echo ' <tr class="pageHeading"><td>' . $title . '</td></tr> <tr><td class="dataTableContent"><b>' . FAQ_QUESTION . ':</b></td></tr> <tr><td class="dataTableContent">' . $delete[question] . '</td></tr> <tr><td class="dataTableContent"><b>' . FAQ_ANSWER . ':</b></td></tr> <tr><td class="dataTableContent">' . $delete[answer] . '</td></tr> <tr><td align="right"> '; echo tep_draw_form('',FILENAME_FAQ_MANAGER, 'faq_action=DelSure&faq_id='.$val[faq_id]); echo tep_draw_hidden_field('faq_id', $faq_id); echo tep_image_submit('button_delete.gif', IMAGE_DELETE); echo '<a href="' . tep_href_link(FILENAME_FAQ_MANAGER, '', 'NONSSL') . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; echo '</form></td></tr>'; } else { $error = 80; } break; case "DelSure": function delete_faq ($faq_id) { tep_db_query("DELETE FROM " . TABLE_FAQ . " WHERE faq_id=$faq_id"); } if ($faq_id) { delete_faq($faq_id); $data = browse_faq($language,$HTTP_GET_VARS); $title = FAQ_DELETED_ID . ' ' . $faq_id; include('faq_list.php'); } else { $error = 80; } break; default: $data = browse_faq($language,$HTTP_GET_VARS); $title = FAQ_MANAGER; include('faq_list.php'); break; } if ($error) { $content = error_message($error); echo $content; $data = browse_faq($language,$HTTP_GET_VARS); $no = 1; if (sizeof($data) > 0) { while (list($key, $val) = each($data)) { $no++; } }; $title = FAQ_ADD_QUEUE . ' ' . $no; echo tep_draw_form('',FILENAME_FAQ_MANAGER, 'faq_action=AddSure'); include('faq_form.php'); } ?> </table> </td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  18. To fix that go to catalog/includes/languages/english/product_info.php and Replace: define('TEXT_FREE_GIFT', 'Free gift with $' . $product_gift['threshold'] . ' purchase.'); With define('TEXT_FREE_GIFT', 'Free gift with ' . $currencies->display_price($product_gift['threshold']) . ' purchase.');
  19. invasi0n

    Seperate Pricing Per Customer v3.5

    Hello, I was wondering if there's any possibility to move all the customers from a group to other, not one by one. Is there any solution for this? Something like a bulk edit? Thank you.
  20. invasi0n

    Faq System And Register_globals Fix

    I'm the only one having problems with Faq System after the Register Global Fix?
  21. invasi0n

    Faq System And Register_globals Fix

    Unfortunately faq_manager.php does not contain this line while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { so I have no idea what should be modified...
  22. invasi0n

    Faq System And Register_globals Fix

    I only modified these files but configure.php is untouched.
  23. invasi0n

    Faq System And Register_globals Fix

    @ Brazilianlink Can you tell me please if you have Register_Globals OFF?
  24. invasi0n

    Faq System And Register_globals Fix

    Nobody who use Faq System has this problem?
  25. Hello, I couldn't find the support thread for Hide products from customer groups for SPPC that's why I opened a new one. I need some help with catalog/includes/modules/new_products.php This is the code of my modules/new_products.php. It works perfectly with Separate Pricing Per Customer but I don't know how to modify it for Hide products from customer groups for SPPC <?php /* $Id: new_products.php,v 1.35 2004/02/05 15:50:00 adf Exp $ Randomize New Products adapted for Separate Pricing Per Customer 2006/04/29 $Id: new_products.php,v 1.34 2003/06/09 22:49:58 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- new_products //--> <?php if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { // start random new products // deleted all reference to specials, only NULL as specials_new_products_price left $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name, NULL as specials_new_products_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p where products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW); } else { // in a category $cats[] = $new_products_category_id; // current catID as starting value // put cat-IDs of all cats nested in current branch into $cats array, go through all subbranches for($i=0;$i<count($cats);$i++) { $categorie_query = tep_db_query("select categories_id from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$cats[$i] . "'"); while ($categorie = tep_db_fetch_array($categorie_query)) { $cats[] = $categorie['categories_id']; } $cats=array_unique($cats); // sort out doubles } $num = (int) MAX_DISPLAY_NEW_PRODUCTS; $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_price, NULL as specials_new_products_price, p.products_tax_class_id, pd.products_name from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p , " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id in (".implode(', ', $cats).") and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW); // end random new products } if (tep_db_num_rows($new_products_query) > 0) { $info_box_contents = array(); $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); new contentBoxHeading($info_box_contents); $row = 0; $col = 0; $pCount = 0; $info_box_contents = array(); $found_products = array(); $num_rows = tep_db_num_rows($new_products_query); if (MAX_DISPLAY_NEW_PRODUCTS > MAX_RANDOM_SELECT_NEW) { // don't allow more new products than will be queried $max_new_products = MAX_RANDOM_SELECT_NEW; } else { $max_new_products = MAX_DISPLAY_NEW_PRODUCTS; } if ($num_rows < $max_new_products) { $max_new_products = $num_rows; } if ($num_rows > 0) { // SPPC code to get correct prices if(!tep_session_is_registered('sppc_customer_group_id')) { $customer_group_id = '0'; } else { $customer_group_id = $sppc_customer_group_id; } while ($_new_products = tep_db_fetch_array($new_products_query)) { $new_products[] = $_new_products; $list_of_prdct_ids[] = $_new_products['products_id']; } $select_list_of_prdct_ids = "products_id = '".$list_of_prdct_ids[0]."' "; if ($num_rows > 1) { for ($n = 1; $n < count($list_of_prdct_ids); $n++) { $select_list_of_prdct_ids .= "or products_id = '".$list_of_prdct_ids[$n]."' "; } } // get all customers_group_prices for products with the particular customer_group_id // however not necessary for customer_group_id = 0 if ($customer_group_id != '0') { $pg_query = tep_db_query("select pg.products_id, customers_group_price as price from " . TABLE_PRODUCTS_GROUPS . " pg where (".$select_list_of_prdct_ids.") and pg.customers_group_id = '".$customer_group_id."'"); while ($pg_array = tep_db_fetch_array($pg_query)) { $new_prices[] = array ('products_id' => $pg_array['products_id'], 'products_price' => $pg_array['price'], 'specials_new_products_price' => ''); } for ($x = 0; $x < $num_rows; $x++) { // replace products prices with those from customers_group table if(!empty($new_prices)) { for ($i = 0; $i < count($new_prices); $i++) { if( $new_products[$x]['products_id'] == $new_prices[$i]['products_id'] ) { $new_products[$x]['products_price'] = $new_prices[$i]['products_price']; } } } // end if(!empty($new_prices) } // end for ($x = 0; $x < $num_rows; $x++) } // end if ($customer_group_id != '0') // an extra query is needed for all the specials $specials_query = tep_db_query("select products_id, specials_new_products_price from specials where (".$select_list_of_prdct_ids.") and status = '1' and customers_group_id = '" .$customer_group_id. "' "); while ($specials_array = tep_db_fetch_array($specials_query)) { $new_s_prices[] = array ('products_id' => $specials_array['products_id'], 'specials_new_products_price' => $specials_array['specials_new_products_price']); } // replace NULL with the correct specials_new_products_price if(!empty($new_s_prices)) { for ($x = 0; $x < $num_rows; $x++) { for ($i = 0; $i < count($new_s_prices); $i++) { if( $new_products[$x]['products_id'] == $new_s_prices[$i]['products_id'] ) { $new_products[$x]['specials_new_products_price'] = $new_s_prices[$i]['specials_new_products_price']; } } } } // // end if(!empty($new_s_prices) while ($pCount < $max_new_products) { // choose a random row $random_product = ''; $random_row = tep_rand(0, ($num_rows - 1)); // tep_db_data_seek($new_products_query, $random_row); // $random_product = tep_db_fetch_array($new_products_query); // because the fetch array of the new_products_query has already been done, slightly different // code is used: $random_product = $new_products[$random_row]; // see if found already, if not use else skip $found = 0; for ($ii=0; $ii < $pCount; $ii++) { if ($found_products[$ii] == $random_product['products_id']) { $found = 1; break; } } if ($found == 0) { // keep track of found id's $found_products[$pCount] += $random_product['products_id']; $pCount++; // add to display array // next two queries made obsolete by adapted $new_products_query (products_name) and sppc code (special prices) // $random_product['products_name'] = tep_get_products_name($random_product['products_id']); // $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']); if (tep_not_null($random_product['specials_new_products_price'])) { $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s> '; $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>'; } else { $whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])); } $product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$random_product['products_id'] . "' and language_id = '" . (int)1 . "'"); $product = tep_db_fetch_array($product_query); $random_product['products_description'] = $product['products_description']; $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="25%" align="center" valign="top"', 'text' => '<table class="new_product" border="0" width="100%" height="100%" cellspacing="0" cellpadding="0"> <tr> <td class="new_product_title" align="center" valign="midle" height="82" colspan="4"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> </td> </tr> <tr> <td height="12" colspan="4"></td> </tr> <tr> <td class="new_product_price" align="center" valign="top" height="65" colspan="4"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a> </td> </tr> <tr> <td class="new_product_price" height="52" width="3%"></td> <td class="new_product_price" height="52" valign="center">Price: ' . $whats_new_price . ' </td> <td class="new_product_price" height="52" valign="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $random_product['products_id']) . '">Buy Now</a></td> <td class="new_product_price" height="52" width="3%"></td> </tr> </table>'); $col ++; if ($col > 3) { $col = 0; $row ++; } } // found } // while pCount } // num_rows // end random new products new contentBox($info_box_contents); } ?> <!-- new_products_eof //--> Thanks.
×