Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to remove price.


Sandro Luis

Recommended Posts

I would like to use Oscommerce just like a catalog.

How can I disable de prices information.

 

Also i have this warning:

Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.

 

How to disable this messages.

 

thanks

 

Sandro Luis

Brazil

Link to comment
Share on other sites

Taking the prices out of OSC for me has been a long and tedious process. What I have done is remove the majority of the echo statements in every page of the system that refrences the prices, but there are still prices showing up in other parts of the program as a zero price that I am unable to remove as of this date. If there is a better way to do his, I have not heard of it yet.

 

As far as the sessions temp directory goes I use the database to store sessions which is in the configure.php file. If you use this option that error should go away, I have not tried to store sessions in a file so I cant help you there. :)

Link to comment
Share on other sites

You could just edit /includes/classes/currencies.php and change the setting on the last function ... function display_price ... to return ''

 

Now all prices are gone.

 

Then edit the the function in /includes/functions/html_output.php ... tep_image_submit to return ''

 

Now all submit buttons are gone. While the code is still technically there, there is nothing to click on for these submits statements to activate them.

 

Note: If you want the ability to use submit buttons for anything you will need to alter this a bit.

Link to comment
Share on other sites

I wish I would have asked this question a long time ago!

Will your method also take out the zero value prices that appear in the conformation e-mails, order history, and so on?

Link to comment
Share on other sites

If it is just a showcase, where would there be emails and order history?

 

Or, are you turning these off when customer is not logged in? Then want them on when customer logs in?

Link to comment
Share on other sites

Free Shipping and Payment does not hide the prices ... unfortunately :shock:

 

It is meant to hide all the Shipping and/or Payment modules when things are Free or have no weight.

 

You can take a deviation of Free Call for Price, but that may be too elaborate for this.

 

Editing the functions or at least for the prices might be the best route. Then, after that is done, buy something and see if you need to edit the function format in currencies.php as well, or just modify the email going out in checkout_process.php

Link to comment
Share on other sites

  • 1 month later...
You could just edit /includes/classes/currencies.php and change the setting on the last function ...  function display_price ... to return ''

 

Now all prices are gone.

 

Then edit the the function in /includes/functions/html_output.php ... tep_image_submit to return ''

 

Now all submit buttons are gone. While the code is still technically there, there is nothing to click on for these submits statements to activate them.

 

Note: If you want the ability to use submit buttons for anything you will need to alter this a bit.

 

Can you please explain this ? I am sorry but i am new to this. I want to remove the pricing from my catalog as well. But people should be able to use submit and place orders, but price is not used. We would handle the order from there on ourselves.

 

regards,

 

Anand

Link to comment
Share on other sites

Hi,

 

I set this code in currencies.php to:

 

function display_price() {

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

}

}

?>

 

and the prices show as zero...am I suppose to remove the whole return line?

 

I changed this in functions/html_output.php from:

// Outputs a button in the selected language

function tep_image_submit($image, $alt = '', $parameters = '') {

global $language;

 

TO

 

// Outputs a button in the selected language

function tep_image_submit() {

global $language;

 

and it removed the update button but the blank graphic was still there.

Link to comment
Share on other sites

You could just edit /includes/classes/currencies.php and change the setting on the last function ... function display_price ... to return ''

 

Now all prices are gone.

 

Then edit the the function in /includes/functions/html_output.php ... tep_image_submit to return ''

 

Now all submit buttons are gone. While the code is still technically there, there is nothing to click on for these submits statements to activate them.

 

Note: If you want the ability to use submit buttons for anything you will need to alter this a bit.

 

Can you please explain this ? I am sorry but i am new to this. I want to remove the pricing from my catalog as well. But people should be able to use submit and place orders, but price is not used. We would handle the order from there on ourselves.

 

regards,

 

Anand

 

Can you explain that a bit more?

 

How does one buy something without knowing the price?

 

I am not following when you want the prices hidden and when you want the prices to show.

Link to comment
Share on other sites

  • 4 weeks later...

I'm looking at doing this for my cart as we are offering it as an employee incentive program. Employees log into the cart and choose a gift based on their years of service. No pricing to be displayed anywhere.

 

where I'm stuck is hiding the code for the cart contents, checkout etc. that shows 0 for order total and tax.

 

 

 

 

 

 

You could just edit /includes/classes/currencies.php and change the setting on the last function ...  function display_price ... to return ''

 

Now all prices are gone.

 

Then edit the the function in /includes/functions/html_output.php ... tep_image_submit to return ''

 

Now all submit buttons are gone. While the code is still technically there, there is nothing to click on for these submits statements to activate them.

 

Note: If you want the ability to use submit buttons for anything you will need to alter this a bit.

 

Can you please explain this ? I am sorry but i am new to this. I want to remove the pricing from my catalog as well. But people should be able to use submit and place orders, but price is not used. We would handle the order from there on ourselves.

 

regards,

 

Anand

 

Can you explain that a bit more?

 

How does one buy something without knowing the price?

 

I am not following when you want the prices hidden and when you want the prices to show.

Link to comment
Share on other sites

To hide all prices and let checkout happen ... change the /includes/classes/currencies.php and edit the function format and have it return '';

 

Then nothing shows.

Link to comment
Share on other sites

I did that... but when I go into cart contents, displayed is: Sub-Total: $0.00

 

I'm looking at hiding anything where a price would normally display. The employee does not want the employee to know any costs involved.

 

 

 

To hide all prices and let checkout happen ... change the /includes/classes/currencies.php and edit the function format and have it return '';

 

Then nothing shows.

Link to comment
Share on other sites

Edit also: function display_price to return '';

 

Then you will have to touch a couple files to remove the text or define the text as '' as well

Link to comment
Share on other sites

oh... ok... I'll give that a try.

 

Off to create a new topic now :)

 

Edit also: function display_price to return '';

 

Then you will have to touch a couple files to remove the text or define the text as '' as well

Link to comment
Share on other sites

in currencies.php this is what I changed the function format to:

 

function display_price($products_price, $products_tax, $quantity = 1) {

//return $this->format(tep_add_tax($products_price, $products_tax) $quantity);

return "";

 

 

so I also have to edit other files not to print as well right?

 

 

 

oh... ok... I'll give that a try.

 

Off to create a new topic now :)

 

Edit also: function display_price to return '';

 

Then you will have to touch a couple files to remove the text or define the text as '' as well

Link to comment
Share on other sites

You need to edit the two functions in currencies.php

 

Then you can just change the define statements for the words Subtotal, Tax, etc.

 

Or, you may be able to just disable them in the Order Totals

 

I have not played with the disabling settings in Order Totals yet to see if this would acheive what you are asking.

Link to comment
Share on other sites

  • 1 month later...

Now as implied to earlier what about not showing prices unless someone is logged in for example a wholesaler.

Link to comment
Share on other sites

Now as implied to earlier what about not showing prices unless someone is logged in for example a wholesaler.

 

Change the /includes/classes/currencies.php to return '' when the customer is not logged in.

 

This will basically make any call where a price has to be displayed vanish until a person logs in.

Link to comment
Share on other sites

I appreciate the reply but It is a little vague. Am I changing the whole file to just a return??? Please help with some further instructions.

Link to comment
Share on other sites

Two peices are mainly involved in displaying the prices via the currencies.php

 

function currencies() {

function display_price($products_price, $products_tax, $quantity = 1) {

 

If a person is not logged in, then tep_session_is_registered('customer_id') is false.

 

Editing those functions and adding new IF statements based on whether the customer is logged in or not will either return the normal display price when the customer is logged in or return nothing or whatever you have the IF setup for.

Link to comment
Share on other sites

A picture is worth a thousand words...

 

I believe these are the changes required. Find the code in catalog/includes/classes/currencies.php that looks like this (around line 34).

 

// class methods

function format($number, $calculate_currency_value = true, $currency_type = '', $currency_value = '') {

global $currency;

 

if (empty($currency_type)) $currency_type = $currency;

 

and change it to look like this

 

// class methods

function format($number, $calculate_currency_value = true, $currency_type = '', $currency_value = '') {

global $currency;

global $customer_id;

 

// Added to display no pricing if customer not logged in

if (!tep_session_is_registered('customer_id')) return '';

 

if (empty($currency_type)) $currency_type = $currency;

 

 

Then below that, find the following function (should be the last one in the file):

 

function display_price($products_price, $products_tax, $quantity = 1) {

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

 

Change it to the following:

 

function display_price($products_price, $products_tax, $quantity = 1) {

// Added to display no pricing if customer not logged in

global $customer_id;

if (!tep_session_is_registered('customer_id')) return '';

 

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

 

This will display no pricing unless someone is logged in. It doesn't stop someone from adding to the cart, but at least they can't see pricing.

Link to comment
Share on other sites

Edit your application_top.php and add a case statement at the top of the shopping cart actions for when not logged in to do nothing.

 

Example:

 

case (!tep_session_is_registered('customer_id')):

 // do nothing

 break;

Link to comment
Share on other sites

  • 2 months later...

Archived

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

×
×
  • Create New...