Sandro Luis Posted February 3, 2003 Share Posted February 3, 2003 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 More sharing options...
Guest Posted February 3, 2003 Share Posted February 3, 2003 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 More sharing options...
Ajeh Posted February 3, 2003 Share Posted February 3, 2003 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 More sharing options...
Guest Posted February 3, 2003 Share Posted February 3, 2003 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 More sharing options...
Ajeh Posted February 3, 2003 Share Posted February 3, 2003 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 More sharing options...
Guest Posted February 3, 2003 Share Posted February 3, 2003 I was using this for reserving a book in a library so everything has to work like OSC does normally but without prices. :) Link to comment Share on other sites More sharing options...
toolcrazy Posted February 4, 2003 Share Posted February 4, 2003 What about using Linda's Free Shipping and Payments v3.1 and just enter eveything as 0. Just a suggestion. Steve ------------------------- Link to comment Share on other sites More sharing options...
Ajeh Posted February 4, 2003 Share Posted February 4, 2003 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 More sharing options...
anand Posted March 12, 2003 Share Posted March 12, 2003 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 More sharing options...
Guest Posted March 13, 2003 Share Posted March 13, 2003 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 More sharing options...
Ajeh Posted March 13, 2003 Share Posted March 13, 2003 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 More sharing options...
Gisele Posted April 7, 2003 Share Posted April 7, 2003 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 More sharing options...
Ajeh Posted April 7, 2003 Share Posted April 7, 2003 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 More sharing options...
Gisele Posted April 7, 2003 Share Posted April 7, 2003 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 More sharing options...
Ajeh Posted April 7, 2003 Share Posted April 7, 2003 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 More sharing options...
Gisele Posted April 7, 2003 Share Posted April 7, 2003 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 More sharing options...
Gisele Posted April 8, 2003 Share Posted April 8, 2003 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 More sharing options...
Ajeh Posted April 8, 2003 Share Posted April 8, 2003 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 More sharing options...
Guest Posted June 1, 2003 Share Posted June 1, 2003 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 More sharing options...
Ajeh Posted June 1, 2003 Share Posted June 1, 2003 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 More sharing options...
Guest Posted June 1, 2003 Share Posted June 1, 2003 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 More sharing options...
Ajeh Posted June 2, 2003 Share Posted June 2, 2003 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 More sharing options...
hijinx Posted June 3, 2003 Share Posted June 3, 2003 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 More sharing options...
Ajeh Posted June 3, 2003 Share Posted June 3, 2003 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 More sharing options...
Sandro Luis Posted August 21, 2003 Author Share Posted August 21, 2003 I think this topic is very helpfull. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.