Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

mittoni

Archived
  • Posts

    9
  • Joined

  • Last visited

Profile Information

mittoni's Achievements

  1. Around line 143 it should read like this: // create an array of products on special, which will be excluded from the pull down menu of products // (when creating a new product on special) $specials_array = array(); $specials_query = tep_db_query("select p.products_id, s.customers_group_id from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s where s.products_id = p.products_id"); while ($specials = tep_db_fetch_array($specials_query)) { $specials_array[] = (int)$specials['products_id'].":".(int)$specials['customers_group_id']; } if(isset($HTTP_GET_VARS['sID']) && $sInfo->customers_group_id!=0){ $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $sInfo->products_id . "' and customers_group_id = '" . $sInfo->customers_group_id . "'"); if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $sInfo->products_price = $customer_group_price['customers_group_price']; } } } $customers_groups_query = tep_db_query("select distinct customers_group_name, customers_group_id from " . TABLE_CUSTOMERS . " order by customers_group_id "); $input_groups=array(); $all_groups=array(); $sde=0; while ($existing_groups = tep_db_fetch_array($customers_groups_query)) { $input_groups[$sde++]=array("id"=>$existing_groups['customers_group_id'], "text"=> $existing_groups['customers_group_name']); $all_groups[$existing_groups['customers_group_id']]=$existing_groups['customers_group_name']; } ?> <tr><form name="new_special" <?php echo 'action="' . tep_href_link(FILENAME_SPECIALS, tep_get_all_get_params(array('action', 'info', 'sID')) . 'action=' . $form_action, 'NONSSL') . '"'; ?> method="post"><?php if ($form_action == 'update') echo tep_draw_hidden_field('specials_id', $HTTP_GET_VARS['sID']); ?> <td><br><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo TEXT_SPECIALS_PRODUCT; ?> </td> <td class="main"><?php echo (isset($sInfo->products_name)) ? $sInfo->products_name . ' <small>(' . $currencies->format($sInfo->products_price) . ')</small>' : tep_draw_products_pull_down('products_id', 'style="font-size:10px"', $specials_array); echo tep_draw_hidden_field('products_price', (isset($sInfo->products_price) ? $sInfo->products_price : '')); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_SPECIALS_GROUPS; ?> </td> <td class="main"><?php echo tep_draw_pull_down_menu('customers_group', $input_groups, (isset($sInfo->customers_group_id)?$sInfo->customers_group_id:''));?> </td> </tr>
  2. BUG FIX Please post bug fixes for future users. This is a terrible mess as it stands, but the contribution of everyone can get it fixed up perfectly. The following in the installation fails SHOULD READ as follows (it did not set $sde=0 and this was causing some minor problems): 1. $sde function not set to 0 in catalog/admin/specials.php Around line 140: Replace $specials_array = array(); $specials_query = tep_db_query("select p.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s where s.products_id = p.products_id"); while ($specials = tep_db_fetch_array($specials_query)) { $specials_array[] = $specials['products_id']; } } With $specials_array = array(); $specials_query = tep_db_query("select p.products_id, s.customers_group_id from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s where s.products_id = p.products_id"); while ($specials = tep_db_fetch_array($specials_query)) { $specials_array[] = (int)$specials['products_id'].":".(int)$specials['customers_group_id']; } $customers_groups_query = tep_db_query("select distinct customers_group_name, customers_group_id from " . TABLE_CUSTOMERS . " order by customers_group_id "); $input_groups=array(); $all_groups=array(); $sde=0; while ($existing_groups = tep_db_fetch_array($customers_groups_query)) { $input_groups[$sde++]=array("id"=>$existing_groups['customers_group_id'], "text"=> $existing_groups['customers_group_name']); $all_groups[$existing_groups['customers_group_id']]=$existing_groups['customers_group_name']; } if(isset($HTTP_GET_VARS['sID']) && $sInfo->customers_group_id!=0){ $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $sInfo->products_id . "' and customers_group_id = '" . $sInfo->customers_group_id . "'"); if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) { $sInfo->products_price = $customer_group_price['customers_group_price']; } }
  3. Your contribution is very much appreciated, personally I plan to use it a great deal. I would like to stress again for anyone to post bug reports and solutions to this thread -- this can help you as the author to simply test and incorporate them into a new release in a few weeks or months if they are correct. No need for a new release to be made available fast, just stable :) ... the approach advocated by the main osc team.
  4. I should also have mentioned, one of the older contributions had the following statement instead of the include('index.php'): header("Location: $forwarder"); This takes it back to pollbooth.php to display the results, then the user can click on continue to go back to the page they were on when they voted! Better to use this.
  5. I'd say the problem is related to catalog/pollcollect.php -- this file includes the application_top.php and then has a buggy statement at the very bottom of the file: include ('index.php'); index.php would then re-include application_top.php and hence duplicate the connection to tep_db_connect(). I simply replaced the include statement at the bottom of pollcollect.php with the following: header("Location: index.php"); exit; Alternatively you could replace with: header("Location: pollbooth.php?op=results&pollid=".$pollid); exit; OR, if you are using SEF URL's: header("Location: pollbooth.php/op/results/pollid/".$pollid); exit; Personally I hate these types of errors, sure they occur because people aren't perfect but when they are posted to a site like this and 100's of people download them it causes all sorts of problems. Great contribution, valuable etc etc but please if you are an author of this contribution - visit this thread in a few weeks time and upload some of the corrections / suggestions to the contrib database.
×
×
  • Create New...