Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

OSC 2.1 and showing/hiding prices


Recommended Posts

Hello everyone,


I've got a small question.


I'm using OSC 2.1 for my webshop and wanted to use the 'show prices to logged-in users only' contribution. This doesn't work :(


Can anyone tell me how I can can get the same result (show prices, shopping cart, etc. only to logged in users) but with another contrib or solution?


Thanks in advance,



Link to comment
Share on other sites

You can hide anything until logon simply by using:


if (tep_session_is_registered('customer_id')) {


} ?>


For prices the best place for this is the very last function in catalog/includes/classes/currencies.php:



function display_price($products_price, $products_tax, $quantity = 1) {
if (tep_session_is_registered('customer_id')) {
     return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
   } else {
     return '';


You will need to hide the cart also.



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...