Enkurs Posted June 16, 2005 Posted June 16, 2005 I want the display_price() function to use sppc module to echo "no price" or something like that for the customer group that accounts default to when created. can anyone help me get this right? /catalog/includes/classes/currencies.php function display_price($products_price, $products_tax, $quantity = 1) { if (!tep_session_is_registered('customer_id')) { return DONT_SHOW_PRICE; } ///////////////////////this needs to work better////////////////////////////// // 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; } //dont care if $customer_group_id = '0' atm cause it dont/isnt if ($customer_group_id == "Default") //or '0' or whatever works { return DONT_SHOW_PRICE; //$temp="asd"; //return gettype($temp); //return gettype($sppc_customer_group_id); //its null whats goign on? } /////////////////////////////////////////////////////////////////////////////// else { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } } and where do oscommerce get the names for month and weekdays from? apache server? windows? mysql? php 4.3.11? the language on my site is all in swedish except for the month and days. Thankful for any assistance.
Jan Zonjee Posted June 16, 2005 Posted June 16, 2005 Aren't you looking to replicate a contribution called Prices for Logged-In Users Only? I don't think using the display_price function will do the trick you are after without nasty side-effects. where do oscommerce get the names for month and weekdays from? apache server? windows? mysql? php 4.3.11? PHP, I suggest searching for setlocale in this forum and/or check the php website.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.