Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Disable Prices


Jamie2006

Recommended Posts

Yes you can do this

 

In catalog/includes/classes/currencies.php ... right down the bottom change:
function display_price($products_price, $products_tax, $quantity = 1) {
return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
}
}
?>
To:
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 may wish to hide the cart also ... column_right.php
if (tep_session_is_registered('customer_id'))include(DIR_WS_BOXES .
'shopping_cart.php');
In catalog/shopping_cart.php, change:
require("includes/application_top.php");
To:
require("includes/application_top.php");
if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}
Where the code has:
} else {
return '';
}
You can put something like:
} else {
return 'Login for price';
}

 

Taken from the Documentation tht comes with the OSC.

There are also contributions for this too

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Link to comment
Share on other sites

Thanks Fimble,

 

I really searched but couldn't find anywhere :'(

 

Yes you can do this

 

In catalog/includes/classes/currencies.php ... right down the bottom change:
function display_price($products_price, $products_tax, $quantity = 1) {
return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
}
}
?>
To:
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 may wish to hide the cart also ... column_right.php
if (tep_session_is_registered('customer_id'))include(DIR_WS_BOXES .
'shopping_cart.php');
In catalog/shopping_cart.php, change:
require("includes/application_top.php");
To:
require("includes/application_top.php");
if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}
Where the code has:
} else {
return '';
}
You can put something like:
} else {
return 'Login for price';
}

 

Taken from the Documentation tht comes with the OSC.

There are also contributions for this too

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...