Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Solution to hide prices?


Guest

Recommended Posts

Does anyone have a solution to hide prices from "guest" users?

 

I am setting up a B2B only website and only want to have authorized customers be able to see product prices.

 

I did try the "loginviewprice" contribution; however, I found that it is not compatable with oscommerce-2.2ms2.

Link to comment
Share on other sites

Does anyone have a solution to hide prices from "guest" users?

 

I am setting up a B2B only website and only want to have authorized customers be able to see product prices.

 

I did try the "loginviewprice" contribution; however, I found that it is not compatable with oscommerce-2.2ms2.

 

 

you could hack the currencies->display_price function to return nothing when the customer_id is not registered i.e. he is not logged on.

Treasurer MFC

Link to comment
Share on other sites

This is to the end of catalog/includes/classes/currencies.php:

 

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

 

Matti

Link to comment
Share on other sites

  • 1 month later...

This works great but I have found that it will still show the price in the shopping cart even if not logged in. I was thinking that a way to fix this would be to disable the shopping cart to non logged in customers. I know it would be a mod to the shopping_cart.php but I just can't seem to get it right. :o

Any Ideas???

 

~Steel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...