_:n23fcd63c62e9415c8f29b83dd37ab358xb11
<http://schema.org/text>
"Hopefully someone with brains in here can help with this \nWhat I am trying to do is get SPPC to use prices from two extra price columns I have in the products table (special_price_2 &amp; Special_price_3) rather than let it get the prices from the  -customers_group_price from \" . TABLE_PRODUCTS_GROUPS-\nI have tried changing if ($customer_group_id \n&gt; 0\n) to if ($customer_group_id \n= 1\n)\nand \"\nselect customers_group_price from \" . TABLE_PRODUCTS_GROUPS\n  to  \"\nselect\n \nspecial_price_2 from \" . TABLE_PRODUCTS\nbut it then fails because of \nand customers_group_id =  '\" . $customer_group_id . \nnot being in the table.\nIf i am thinking correctly and remove the \nand customers_group_id =  '\" . $customer_group_id .\n it should then work?\nCan anyone give me the correct syntax for the line after removing this part as i beleive it does not need to look up the customer_group_id as it gets this from the customers account table and i am setting the if ($customer_group_id = 1)\n \n \n \n  \n\n// BOF Separate Pricing per Customer\n  if ($customer_group_id &gt; 0) { // only need to check products_groups if customer is not retail\n    $scustomer_group_price_query = tep_db_query(\"select customers_group_price from \" . TABLE_PRODUCTS_GROUPS . \" where products_id = '\" . (int)$HTTP_GET_VARS['products_id']. \"' and customers_group_id =  '\" . $customer_group_id . \"'\");\n    if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) {\n\t  $product_info['products_price']= $scustomer_group_price['customers_group_price'];\n   \t  }\n  } // end if ($customer_group_id &gt; 0)\n// EOF Separate Pricing per Customer\n  $products_price = '&lt;del&gt;' . $currencies-&gt;display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '&lt;/del&gt; &lt;span class=\"productSpecialPrice\"&gt;' . $currencies-&gt;display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '&lt;/span&gt;';\n   } else {\n// BOF Separate Pricing per Customer\n  if ($customer_group_id &gt; 0) { // only need to check products_groups if customer is not retail\n    $scustomer_group_price_query = tep_db_query(\"select customers_group_price from \" . TABLE_PRODUCTS_GROUPS . \" where products_id = '\" . (int)$HTTP_GET_VARS['products_id']. \"' and customers_group_id =  '\" . $customer_group_id . \"'\");\n    if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) {\n                   $product_info['products_price']= $scustomer_group_price['customers_group_price'];\n               }\n           } // end if ($customer_group_id &gt; 0)\n// EOF Separate Pricing per Customer\n\n\n"
<https://forums.oscommerce.com/topic/53436-seperate-pricing-per-customer-v35/?page=235&tab=comments#comment-1620780>