_:ne7e689b62fde4a75bf70c6d730800f7fxb37
<http://schema.org/text>
"Do you know where, I tried putting it above this: Line 202\n\n   for ($n = 0; $n &lt; count($products_options); $n++) {\n\t  $products_options_array[] = array('id' =&gt; $products_options[$n]['products_options_values_id'], 'text' =&gt; $products_options[$n]['products_options_values_name']);\n\t  if ($products_options[$n]['options_values_price'] != '0') {\n\t\t$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options[$n]['price_prefix'] . $currencies-&gt;display_price($products_options[$n]['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';\n\t  }\n\t}\n\n\n \nand here is my product_listing.php file. Thank you so much for your time with my help and everyone elses. I really appreciate it Jan.\n\n&lt;?php\n/*\n $Id: product_listing.php,v 1.44 2003/06/09 22:49:59 hpdl Exp $\n osCommerce, Open Source E-Commerce Solutions\n http://www.oscommerce.com\n Copyright (c) 2003 osCommerce\n Released under the GNU General Public License\n*/\n$new_products=array();\n$new_p_id=array();\n?&gt;\n&lt;script language=\"javascript\"&gt;&lt;!--\nfunction popupWindow(url) {\n window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res\nizable=yes,copyhistory=no,width=290,height=290,screenX=290,screenY=290,top=150,le\nft=150');\n}\n//--&gt;&lt;/script&gt;\n\t\t   &lt;table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"&gt;\n\t\t\t&lt;tr&gt;&lt;td&gt;&lt;?=tep_image(DIR_WS_IMAGES.'m30.gif')?&gt;&lt;/td&gt;\n\t\t\t\t&lt;td class=\"bg15\" width=\"100%\" height=\"30\"&gt;       &lt;span class=\"tx4\"&gt;&lt;?=$breadcrumb-&gt;trail(' » ')?&gt;&lt;/span&gt;&lt;/td&gt;\n\t\t\t\t&lt;td&gt;&lt;?=tep_image(DIR_WS_IMAGES.'m31.gif')?&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t\t&lt;tr&gt;&lt;td height=\"16\" colspan=\"3\"&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t   &lt;/table&gt;\n\t\t   &lt;table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"&gt;\n\t\t\t&lt;tr&gt;&lt;td width=\"100%\"&gt;\n\n&lt;?\n $listing_split = new splitPageResults($listing_sql, /*MAX_DISPLAY_SEARCH_RESULTS*/100, 'p.products_id');\n if ( ($listing_split-&gt;number_of_rows &gt; 0) &amp;&amp; ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {\n?&gt;\n&lt;table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\"&gt;\n &lt;tr&gt;\n&lt;td class=\"smallText\"&gt;&lt;?php echo $listing_split-&gt;display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?&gt;&lt;/td&gt;\n&lt;td class=\"smallText\" align=\"right\"&gt;&lt;?php echo TEXT_RESULT_PAGE . ' ' . $listing_split-&gt;display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?&gt;&lt;/td&gt;\n &lt;/tr&gt;\n&lt;/table&gt;\n&lt;?php\n }\n $list_box_contents = array();\n for ($col=0, $n=sizeof($column_list); $col&lt;$n; $col++) {\nswitch ($column_list[$col]) {\n  case 'PRODUCT_LIST_MODEL':\n\t$lc_text = TABLE_HEADING_MODEL;\n\t$lc_align = '';\n\tbreak;\n  case 'PRODUCT_LIST_NAME':\n\t$lc_text = TABLE_HEADING_PRODUCTS;\n\t$lc_align = '';\n\tbreak;\n  case 'PRODUCT_LIST_MANUFACTURER':\n\t$lc_text = TABLE_HEADING_MANUFACTURER;\n\t$lc_align = '';\n\tbreak;\n  case 'PRODUCT_LIST_PRICE':\n\t$lc_text = TABLE_HEADING_PRICE;\n\t$lc_align = 'right';\n\tbreak;\n  case 'PRODUCT_LIST_QUANTITY':\n\t$lc_text = TABLE_HEADING_QUANTITY;\n\t$lc_align = 'right';\n\tbreak;\n  case 'PRODUCT_LIST_WEIGHT':\n\t$lc_text = TABLE_HEADING_WEIGHT;\n\t$lc_align = 'right';\n\tbreak;\n  case 'PRODUCT_LIST_IMAGE':\n\t$lc_text = TABLE_HEADING_IMAGE;\n\t$lc_align = 'center';\n\tbreak;\n  case 'PRODUCT_LIST_BUY_NOW':\n\t$lc_text = TABLE_HEADING_BUY_NOW;\n\t$lc_align = 'center';\n\tbreak;\n}\nif ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') &amp;&amp; ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {\n  $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);\n}\n$list_box_contents[0][] = array('align' =&gt; $lc_align,\n\t\t\t\t\t\t\t\t'params' =&gt; 'class=\"productListing-heading\"',\n\t\t\t\t\t\t\t\t'text' =&gt; ' ' . $lc_text . ' ');\n }\nif ($listing_split-&gt;number_of_rows &gt; 0) {\n\n$rows = 0;\n$listing_query = tep_db_query($listing_split-&gt;sql_query);\n// BOF Separate Pricing per Customer\n$no_of_listings = tep_db_num_rows($listing_query);\n// global variable (session) $sppc_customer_group_id -&gt; local variable customer_group_id\n\n if(isset($_SESSION['sppc_customer_group_id']) &amp;&amp; $_SESSION['sppc_customer_group_id'] != '0') {\n $customer_group_id = $_SESSION['sppc_customer_group_id'];\n } else {\n  $customer_group_id = '0';\n }\n\nwhile ($_listing = tep_db_fetch_array($listing_query)) {\n$listing[] = $_listing;\n$list_of_prdct_ids[] = $_listing['products_id'];\n}\n// next part is a debug feature, when uncommented it will print the info that this module receives\n/*\n  echo '&lt;pre&gt;';\n  print_r($listing);\n  echo '&lt;/pre&gt;';\n*/\n\n// get all product prices for products with the particular customer_group_id\n// however not necessary for customer_group_id = 0\nif ($customer_group_id != '0') {\n $pg_query = tep_db_query(\"select pg.products_id, customers_group_price as price from \" . TABLE_PRODUCTS_GROUPS . \" pg where products_id in (\" . implode(',', $list_of_prdct_ids) . \") and pg.customers_group_id = '\" . $customer_group_id . \"'\");\n//   $no_of_pg_products = tep_db_num_rows($pg_query);\nwhile ($pg_array = tep_db_fetch_array($pg_query)) {\n$new_prices[] = array ('products_id' =&gt; $pg_array['products_id'], 'products_price' =&gt; $pg_array['price'], 'specials_new_products_price' =&gt; '', 'final_price' =&gt; $pg_array['price']);\n}\nfor ($x = 0; $x &lt; $no_of_listings; $x++) {\n// replace products prices with those from customers_group table\n  if(!empty($new_prices)) {\n\tfor ($i = 0; $i &lt; count($new_prices); $i++) {\n\t\tif( $listing[$x]['products_id'] == $new_prices[$i]['products_id'] ) {\n\t\t\t$listing[$x]['products_price'] = $new_prices[$i]['products_price'];\n\t\t\t$listing[$x]['final_price'] = $new_prices[$i]['final_price'];\n\t\t  }\n\t  }\n\t} // end if(!empty($new_prices)\n$listing[$x]['specials_new_products_price'] = ''; // makes sure that a retail specials price doesn't carry over to another customer group\n$listing[$x]['final_price'] = $listing[$x]['products_price']; // final price should not be the retail special price\n  } // end for ($x = 0; $x &lt; $no_of_listings; $x++)\n} // end if ($customer_group_id != '0')\n\n// an extra query is needed for all the specials\n\n$specials_query = tep_db_query(\"select products_id, specials_new_products_price from \" . TABLE_SPECIALS . \" where products_id in (\" . implode(',', $list_of_prdct_ids) . \") and status = '1' and customers_group_id = '\" . $customer_group_id . \"'\");\nwhile ($specials_array = tep_db_fetch_array($specials_query)) {\n$new_s_prices[] = array ('products_id' =&gt; $specials_array['products_id'], 'products_price' =&gt; '', 'specials_new_products_price' =&gt; $specials_array['specials_new_products_price'] , 'final_price' =&gt; $specials_array['specials_new_products_price']);\n}\n\n// add the correct specials_new_products_price and replace final_price\nfor ($x = 0; $x &lt; $no_of_listings; $x++) {\nif(!empty($new_s_prices)) {\n\tfor ($i = 0; $i &lt; count($new_s_prices); $i++) {\n\t\tif( $listing[$x]['products_id'] == $new_s_prices[$i]['products_id'] ) {\n\t\t$listing[$x]['specials_new_products_price'] = $new_s_prices[$i]['specials_new_products_price'];\n\t\t$listing[$x]['final_price'] = $new_s_prices[$i]['final_price'];\n\t\t}\n\t}\n  } // end if(!empty($new_s_prices)\n} // end for ($x = 0; $x &lt; $no_of_listings; $x++)\n\n//\twhile ($listing = tep_db_fetch_array($listing_query)) { (was original code)\nfor ($x = 0; $x &lt; $no_of_listings; $x++) {\n  $rows++;\n  if (($rows/2) == floor($rows/2)) {\n\t$list_box_contents[] = array('params' =&gt; 'class=\"productListing-even\"');\n  } else {\n\t$list_box_contents[] = array('params' =&gt; 'class=\"productListing-odd\"');\n  }\n  $cur_row = sizeof($list_box_contents) - 1;\n  for ($col=0, $n=sizeof($column_list); $col&lt;$n; $col++) {\n\t$lc_align = '';\n\tswitch ($column_list[$col]) {\n\t  case 'PRODUCT_LIST_MODEL':\n\t\t$lc_align = '';\n $lc_text = ' ' . $listing[$x]['products_model'] . ' ';\n\t\tbreak;\n\t  case 'PRODUCT_LIST_NAME':\n\t\t$lc_align = '';\n\t\tif (isset($HTTP_GET_VARS['manufacturers_id'])) {\n\t\t  $lc_text = '&lt;a href=\"' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&amp;products_id=' . $listing[$x]['products_id']) . '\"&gt;' . $listing[$x]['products_name'] . '&lt;/a&gt;';\n\t\t} else {\n\t\t  $lc_text = ' &lt;a href=\"' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&amp;' : '') . 'products_id=' . $listing[$x]['products_id']) . '\"&gt;' . $listing[$x]['products_name'] . '&lt;/a&gt; ';\n\t\t}\n\t\tbreak;\n\t  case 'PRODUCT_LIST_MANUFACTURER':\n\t\t$lc_align = '';\n\t\t$lc_text = ' &lt;a href=\"' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing[$x]['manufacturers_id']) . '\"&gt;' . $listing[$x]['manufacturers_name'] . '&lt;/a&gt; ';\n\t\tbreak;\n\t  case 'PRODUCT_LIST_PRICE':\n\t\t$lc_align = 'right';\n\n\t\tif (tep_not_null($listing[$x]['specials_new_products_price'])) {\n\t\t  $lc_text = ' &lt;s&gt;' .  $currencies-&gt;display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '&lt;/s&gt;  &lt;span class=\"productSpecialPrice\"&gt;' . $currencies-&gt;display_price($listing[$x]['specials_new_products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . '&lt;/span&gt; ';\n\t\t} else {\n\t\t  $lc_text = ' ' . $currencies-&gt;display_price($listing[$x]['products_price'], tep_get_tax_rate($listing[$x]['products_tax_class_id'])) . ' ';\n\t\t}\n\t\tbreak;\n\t  case 'PRODUCT_LIST_QUANTITY':\n\t\t$lc_align = 'right';\n\t\t$lc_text = ' ' . $listing[$x]['products_quantity'] . ' ';\n\t\tbreak;\n\t  case 'PRODUCT_LIST_WEIGHT':\n\t\t$lc_align = 'right';\n\t\t$lc_text = ' ' . $listing[$x]['products_weight'] . ' ';\n\t\tbreak;\n\t  case 'PRODUCT_LIST_IMAGE':\n\t\t$lc_align = 'center';\n\t\tif (isset($HTTP_GET_VARS['manufacturers_id'])) {\n\t\t  $lc_text = '&lt;a href=\"' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&amp;products_id=' . $listing[$x]['products_id']) . '\"&gt;' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '&lt;/a&gt;';\n\t\t} else {\n\t\t  $lc_text = ' &lt;a href=\"' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&amp;' : '') . 'products_id=' . $listing[$x]['products_id']) . '\"&gt;' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '&lt;/a&gt; ';\n\t\t}\n\t\tbreak;\n\t  case 'PRODUCT_LIST_BUY_NOW':\n\t\t$lc_align = 'center';\n\t\t$lc_text = '&lt;a href=\"' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&amp;products_id=' . $listing[$x]['products_id']) . '\"&gt;' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '&lt;/a&gt; '; // EOF Separate Pricing per Customer\n\n\t\tbreak;\n\t}\n\t$list_box_contents[$cur_row][] = array('align' =&gt; $lc_align,'params' =&gt; 'class=\"productListing-data\"','text'  =&gt; $lc_text);\n\t$product_contents[] = $lc_text;\n  }\n  $product_query = tep_db_query(\"select products_description, products_id from \" . TABLE_PRODUCTS_DESCRIPTION . \" where products_id = '\" . (int)$listing['products_id'] . \"' and language_id = '\" . (int)$languages_id . \"'\");\n  $product = tep_db_fetch_array($product_query);\n\n  array_push($new_products,$product['products_description']);\n  array_push($new_p_id,$product['products_id']);\n}\n?&gt;\n\n\n\n&lt;?\n$col=0;\n$row=0;\nfor ($i=1;$i&lt;count($list_box_contents);$i++) {\n\t$j=$list_box_contents[$i];\nif ($row!=0) echo '\n\t\t\t\t &lt;table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"&gt;\n\t\t\t\t  &lt;tr&gt;&lt;td height=\"14\"&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t\t\t  &lt;tr&gt;&lt;td height=\"1\" width=\"100%\" bgcolor=\"#A9CD6B\"&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t\t\t  &lt;tr&gt;&lt;td height=\"14\"&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t\t\t &lt;/table&gt;';\n?&gt;\n\t\t\t\t &lt;table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"&gt;\n\t\t\t\t  &lt;tr&gt;&lt;td width=\"20\"&gt;&lt;?php echo tep_draw_separator('spacer.gif', '20', '1'); ?&gt;&lt;/td&gt;\n\t\t\t\t\t  &lt;td align=\"center\" valign=\"top\"&gt;&lt;?=$j[0][text]?&gt;&lt;/td&gt;\n\t\t\t\t\t  &lt;td width=\"28\"&gt;&lt;?php echo tep_draw_separator('spacer.gif', '28', '1'); ?&gt;&lt;/td&gt;\n\t\t\t\t\t  &lt;td width=\"100%\" valign=\"top\"&gt;\n\t\t\t\t\t\t &lt;table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"&gt;\n\t\t\t\t\t\t  &lt;tr&gt;&lt;td&gt;&lt;?=$j[1][text]?&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t\t\t\t\t  &lt;tr&gt;&lt;td height=\"11\"&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t\t\t\t\t  &lt;tr&gt;&lt;td&gt;&lt;?=preg_replace('/\\s\\S*$/i', '', substr($new_products[$i-1], 0, 160))?&gt;...&lt;/td&gt;&lt;/tr&gt;\n\t\t\t\t\t\t  &lt;tr&gt;&lt;td height=\"6\"&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t\t\t\t\t  &lt;tr&gt;&lt;td class=\"tx5\"&gt;&lt;?=$j[2][text]?&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t\t\t\t\t  &lt;tr&gt;&lt;td height=\"17\"&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t\t\t\t\t  &lt;tr&gt;&lt;td&gt;&lt;a href=\"&lt;?=tep_href_link('product_info.php?products_id='.$new_p_id[$i-1])?&gt;\"&gt;&lt;?=tep_image_button(\"button_details.gif\");?&gt;&lt;/a&gt;  &lt;a href=\"&lt;?= tep_href_link(\"products_new.php\",\"action=buy_now&amp;products_id=\".$new_p_id[$i-1])?&gt;\"&gt;&lt;?=tep_image_button(\"button_add_to_cart.gif\");?&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t\t\t\t\t &lt;/table&gt;\n\t\t\t\t\t   &lt;/td&gt;\n\t\t\t\t\t   &lt;td width=\"36\"&gt;&lt;?php echo tep_draw_separator('spacer.gif', '36', '1'); ?&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t\t\t &lt;/table&gt;\n&lt;?\n$row++;\n}\n/*\tnew productListingBox($list_box_contents);  */\n } else {\n$list_box_contents = array();\n$list_box_contents[0] = array('params' =&gt; 'class=\"productListing-odd\"');\n$list_box_contents[0][] = array('params' =&gt; 'class=\"productListing-data\"');\n//\tnew productListingBox($list_box_contents);\n }\n if ( ($listing_split-&gt;number_of_rows &gt; 0) &amp;&amp; ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {\n?&gt;\n&lt;table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\"&gt;\n &lt;tr&gt;\n&lt;td class=\"smallText\"&gt;&lt;?php echo $listing_split-&gt;display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?&gt;&lt;/td&gt;\n&lt;td class=\"smallText\" align=\"right\"&gt;&lt;?php echo TEXT_RESULT_PAGE . ' ' . $listing_split-&gt;display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?&gt;&lt;/td&gt;\n &lt;/tr&gt;\n&lt;/table&gt;\n&lt;?php\n }\n?&gt;\n\n\t\t\t\t&lt;/td&gt;\n\t\t\t\t&lt;td width=\"21\"&gt;&lt;?php echo tep_draw_separator('spacer.gif', '21', '1'); ?&gt;&lt;/td&gt;&lt;/tr&gt;\n\t\t   &lt;/table&gt;\n\n"
<https://forums.oscommerce.com/topic/53436-seperate-pricing-per-customer-v35/?page=173>