Sj-2 Posted March 5, 2004 Share Posted March 5, 2004 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, John Link to comment Share on other sites More sharing options...
Guest Posted March 6, 2004 Share Posted March 6, 2004 You can hide anything until logon simply by using: <?php if (tep_session_is_registered('customer_id')) { STUFF_YOU_WISH_TO_HIDE } ?> 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. Matti Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.